Android TV Voice Service implementation. More...
Data Structures | |
struct | ble_atvv_evt_get_caps_t |
ATVV Service BLE_ATVV_EVT_GET_CAPS event data. More... | |
struct | ble_atvv_evt_mic_open_t |
ATVV Service BLE_ATVV_EVT_MIC_OPEN event data. More... | |
struct | ble_atvv_evt_t |
ATVV Service event structure. More... | |
struct | ble_atvv_s |
ATVV Service structure. More... | |
Macros | |
#define | BLE_ATVV_DEF(_name) |
Macro for defining a ble_atvv instance. More... | |
#define | BLE_ATVV_MAX_DATA_LEN (BLE_GATT_MTU_SIZE_DEFAULT - OPCODE_LENGTH - HANDLE_LENGTH) |
Maximum length of data (in bytes) that can be transmitted to the peer by the ATVV Service module. | |
#define | BLE_UUID_ATV_BASE |
#define | BLE_UUID_ATV_CTL_CHARACTERISTIC 0x0004 |
#define | BLE_UUID_ATV_RX_CHARACTERISTIC 0x0003 |
#define | BLE_UUID_ATV_SERVICE 0x0001 |
#define | BLE_UUID_ATV_TX_CHARACTERISTIC 0x0002 |
Typedefs | |
typedef void(* | ble_atvv_evt_handler_t )(ble_atvv_evt_t const *p_evt) |
ATVV Service event handler type. | |
Enumerations | |
enum | ble_atvv_ctl_type_t { BLE_ATVV_CTL_AUDIO_STOP = ATVV_CTL_AUDIO_STOP, BLE_ATVV_CTL_AUDIO_START = ATVV_CTL_AUDIO_START, BLE_ATVV_CTL_START_SEARCH = ATVV_CTL_START_SEARCH, BLE_ATVV_CTL_AUDIO_SYNC = ATVV_CTL_AUDIO_SYNC, BLE_ATVV_CTL_GET_CAPS_RESP = ATVV_CTL_GET_CAPS_RESP, BLE_ATVV_CTL_MIC_OPEN_ERROR = ATVV_CTL_MIC_OPEN_ERROR } |
ATVV Service control message types. More... | |
enum | ble_atvv_error_code_t |
Error codes. | |
enum | ble_atvv_evt_type_t { BLE_ATVV_EVT_ENABLED, BLE_ATVV_EVT_DISABLED, BLE_ATVV_EVT_MIC_OPEN, BLE_ATVV_EVT_MIC_CLOSE, BLE_ATVV_EVT_GET_CAPS } |
ATVV Service event types. More... | |
enum | ble_atvv_frame_size_t |
Frame size. | |
enum | ble_atvv_rx_char_size_t |
Transmit characteristic size. | |
enum | ble_atvv_supported_codecs_t |
Supported codecs. | |
enum | ble_atvv_used_codec_t |
Used codec. | |
Functions | |
ret_code_t | ble_atvv_ctl_send (ble_atvv_t const *p_atvv, uint16_t conn_handle, ble_atvv_ctl_type_t type, void *p_param) |
Function for sending control and error messages to the peer. More... | |
ret_code_t | ble_atvv_frame_data_transmit (ble_atvv_t const *p_atvv, uint8_t const *p_frame_data, uint16_t len, uint16_t conn_handle) |
Function for transmitting frame data. More... | |
ret_code_t | ble_atvv_init (ble_atvv_t *p_atvv, ble_atvv_evt_handler_t p_evt_handler) |
Function for initializing the ATVV Service. More... | |
void | ble_atvv_on_ble_evt (ble_evt_t const *p_ble_evt, void *p_context) |
Function for handling BLE events of the ATVV Service. More... | |
Android TV Voice Service implementation.
#define BLE_ATVV_DEF | ( | _name | ) |
Macro for defining a ble_atvv instance.
_name | Name of the instance. |
#define BLE_UUID_ATV_BASE |
Used vendor-specific UUID.
#define BLE_UUID_ATV_CTL_CHARACTERISTIC 0x0004 |
16-bit UUID of the CTL Characteristic.
#define BLE_UUID_ATV_RX_CHARACTERISTIC 0x0003 |
16-bit UUID of the RX Characteristic.
#define BLE_UUID_ATV_SERVICE 0x0001 |
16-bit UUID of the ATVV Service.
#define BLE_UUID_ATV_TX_CHARACTERISTIC 0x0002 |
16-bit UUID of the TX Characteristic.
enum ble_atvv_ctl_type_t |
ATVV Service control message types.
enum ble_atvv_evt_type_t |
ATVV Service event types.
Enumerator | |
---|---|
BLE_ATVV_EVT_ENABLED |
Service enabled (CCCDs written). |
BLE_ATVV_EVT_DISABLED |
Service disabled (CCCDs written, or disconnect). |
BLE_ATVV_EVT_MIC_OPEN |
Open mic command received. |
BLE_ATVV_EVT_MIC_CLOSE |
Close mic command received. |
BLE_ATVV_EVT_GET_CAPS |
Get capability command received. Respond with ble_atvv_ctl_send. |
ret_code_t ble_atvv_ctl_send | ( | ble_atvv_t const * | p_atvv, |
uint16_t | conn_handle, | ||
ble_atvv_ctl_type_t | type, | ||
void * | p_param | ||
) |
Function for sending control and error messages to the peer.
[in] | p_atvv | ATVV Service structure. This structure must be supplied by the application. It is initialized by this function and will later be used to identify this particular service instance. |
[in] | type | Control message type. |
[in] | conn_handle | Connection handle to use for message transmission. |
[in] | p_param | Depends on the type parameter: "uint16_t frame_count" for BLE_ATVV_CTL_AUDIO_SYNC "ble_atvv_error_code_t error" for BLE_ATVV_CTL_MIC_OPEN_ERROR Otherwise, this parameter is ignored. |
ret_code_t ble_atvv_frame_data_transmit | ( | ble_atvv_t const * | p_atvv, |
uint8_t const * | p_frame_data, | ||
uint16_t | len, | ||
uint16_t | conn_handle | ||
) |
Function for transmitting frame data.
[out] | p_atvv | ATVV Service structure. This structure must be supplied by the application. It is initialized by this function and will later be used to identify this particular service instance. |
[in] | p_frame_data | Frame data to transmit. |
[in] | len | Length of frame data. |
[in] | conn_handle | Connection handle to use for message transmission. |
ret_code_t ble_atvv_init | ( | ble_atvv_t * | p_atvv, |
ble_atvv_evt_handler_t | p_evt_handler | ||
) |
Function for initializing the ATVV Service.
[out] | p_atvv | ATVV Service structure. This structure must be supplied by the application. It is initialized by this function and will later be used to identify this particular service instance. |
[in] | p_evt_handler | Event handler callback. |
void ble_atvv_on_ble_evt | ( | ble_evt_t const * | p_ble_evt, |
void * | p_context | ||
) |
Function for handling BLE events of the ATVV Service.
[in] | p_ble_evt | Event received from the SoftDevice. |
[in] | p_context | ATVV Service structure. |