Igtimi Yachtbot Firmware
|
#include "uTrack.h"
#include "utBluetoothAudio.h"
#include "utHAL.h"
#include <stdlib.h>
Data Structures | |
struct | BT_ModeHandler |
struct | BTDeviceData |
Macros | |
#define | BLUETOOTH_AUDIO_RX_BUFFER_SIZE 128 |
#define | RESPONSE_BUFFER_LENGTH 150 |
#define | ABS_MAX_CHANNELS 1 |
#define | MAX_WRITE_RETRIES 10 |
#define | RETRY_RATE_TIMER 15.0f * 60.0f |
#define | MAX_DEVICE_LISTING 6 |
#define | INQUIRY_RESULTS_WAIT_MS 10000 |
#define | MAX_INQUIRY_IDS 6 |
Enumerations | |
enum | BT_ModeType { MODE_OFF , MODE_PAIRING , MODE_RUNNING , MODE_MAX } |
enum | BTState { BT_ON , LISTING , SINGLE_LINK , SINGLE_SCO , DOUBLE_LINK , MULTI_SCO , RECORDING , ERROR , BTSTATEMAX } |
enum | BTConnectionState { CLOSED = 0 , REQUEST_CLOSE , WAIT_CLOSE , REQUEST_OPEN , WAIT_OPEN , OPEN , BTCON_MAX } |
enum | BTPairState { NOT_PAIRED , LOOKING , REQUEST_PROFILE , WAIT_PROFILE , REQUEST_PAIR , WAIT_PAIR , PAIRED } |
Functions | |
bool | utBluetoothAudio_isRecording (void) |
void | utBTAudio_UpdateTimestamp (UT_DateTime timestamp) |
bool | utBTAudio_Notify (UT_DeviceMessage state) |
bool | BT_Audio_On (void) |
void | utBTAudio_OnOff (bool isOn, bool stayOn) |
void | utBTAudio_BeginRecording (void) |
void | utBTAudio_EndRecording (void) |
Variables | |
u32 | startTimeBTA |
Is a profile for Audio via bluetooth (HFP-AG).
See also utI2S_3287.c
#define ABS_MAX_CHANNELS 1 |
The maximum number of audio channels the current implementation supports.
\TODO usrChannels #1104
#define BLUETOOTH_AUDIO_RX_BUFFER_SIZE 128 |
Receive buffer for the Bluetooth Audio module.
#define RESPONSE_BUFFER_LENGTH 150 |
The maximum length, in bytes, of the buffer handling command responses from the BT module.
The response buffer must be at least 131 bytes for the Jabra headsets, but other devices, such as the WT32, may hve a longer SDP response string.
bool BT_Audio_On | ( | void | ) |
Returns the on/off status of the module
void |
void utBTAudio_BeginRecording | ( | void | ) |
Tell the state engine to start writing audio to file as soon as it has data
void |
void utBTAudio_EndRecording | ( | void | ) |
Tell the state engine to stop writing audio
void |
bool utBTAudio_Notify | ( | UT_DeviceMessage | state | ) |
The Notify function passes a message to the software module, informing it of expected module state. It returns a value that is considered a response to a query about the specified state.
state | A state message. |
void utBTAudio_OnOff | ( | bool | isOn, |
bool | stayOn | ||
) |
OnOff turns this software module on or off.
isOn | Whether to turn on or off. |
stayOn | Whether to leave the software module on after the power is turned off. |
void utBTAudio_UpdateTimestamp | ( | UT_DateTime | timestamp | ) |
Updates the timestamp that will be written in the current audio file metadata.
timestamp | The new timestamp. |