AIROC™ BTSDK v4.0 - Documentation | ||||
This section contains the API's that are common for both target and controller functionality. More...
Functions | |
void | wiced_bt_avrc_register (UINT16 mtu, UINT16 mtu_br, UINT8 sec_mask) |
Function wiced_bt_avrc_register. More... | |
uint16_t | wiced_bt_avrc_open (uint8_t *p_handle, wiced_bt_avrc_conn_cb_t *p_ccb, wiced_bt_device_address_t peer_addr) |
Function wiced_bt_avrc_open. More... | |
uint16_t | wiced_bt_avrc_close (uint8_t handle) |
Function wiced_bt_avrc_close. More... | |
uint16_t | wiced_bt_avrc_open_browse (uint8_t handle, uint8_t conn_role) |
Function wiced_bt_avrc_open_browse. More... | |
uint16_t | wiced_bt_avrc_close_browse (uint8_t handle) |
Function wiced_bt_avrc_close_browse. More... | |
uint16_t | wiced_bt_avrc_set_buffer_pool (uint16_t buffer_size, uint16_t buffer_count) |
Function wiced_bt_avrc_set_buffer_pool. More... | |
uint16_t | wiced_bt_avrc_msg_req (uint8_t handle, uint8_t label, uint8_t ctype, BT_HDR *p_pkt) |
Function wiced_bt_avrc_msg_req. More... | |
uint16_t | wiced_bt_avrc_unit_cmd (uint8_t handle, uint8_t label) |
Function wiced_bt_avrc_unit_cmd. More... | |
uint16_t | wiced_bt_avrc_sub_cmd (uint8_t handle, uint8_t label, uint8_t page) |
Function wiced_bt_avrc_sub_cmd. More... | |
uint16_t | wiced_bt_avrc_pass_cmd (uint8_t handle, uint8_t label, wiced_bt_avrc_msg_pass_t *p_msg) |
Function wiced_bt_avrc_pass_cmd. More... | |
uint16_t | wiced_bt_avrc_pass_rsp (uint8_t handle, uint8_t label, wiced_bt_avrc_msg_pass_t *p_msg) |
Function wiced_bt_avrc_pass_rsp. More... | |
uint16_t | wiced_bt_avrc_vendor_cmd (uint8_t handle, uint8_t label, wiced_bt_avrc_msg_vendor_t *p_msg) |
Function wiced_bt_avrc_vendor_cmd. More... | |
uint16_t | wiced_bt_avrc_vendor_rsp (uint8_t handle, uint8_t label, wiced_bt_avrc_msg_vendor_t *p_msg) |
Function wiced_bt_avrc_vendor_rsp. More... | |
uint8_t | wiced_bt_avrc_set_trace_level (uint8_t new_level) |
wiced_bt_avrc_sts_t | wiced_bt_avrc_parse_command (wiced_bt_avrc_msg_t *p_msg, wiced_bt_avrc_command_t *p_result, uint8_t *p_buf, uint16_t buf_len) |
Function wiced_bt_avrc_parse_command. More... | |
wiced_bt_avrc_sts_t | wiced_bt_avrc_parse_response (wiced_bt_avrc_msg_t *p_msg, wiced_bt_avrc_response_t *p_result, uint8_t *p_buf, uint16_t buf_len) |
Function wiced_bt_avrc_parse_response. More... | |
wiced_bt_avrc_sts_t | wiced_bt_avrc_bld_command (wiced_bt_avrc_command_t *p_cmd, BT_HDR **pp_pkt) |
Function wiced_bt_avrc_bld_command. More... | |
wiced_bt_avrc_sts_t | wiced_bt_avrc_bld_response (uint8_t handle, wiced_bt_avrc_response_t *p_rsp, BT_HDR **pp_pkt) |
Function wiced_bt_avrc_bld_response. More... | |
wiced_bool_t | wiced_bt_avrc_is_valid_avc_type (uint8_t pdu_id, uint8_t ctype) |
wiced_bool_t | wiced_bt_avrc_is_valid_player_attr (uint8_t attr) |
uint16_t | wiced_bt_avrc_get_ctrl_mtu (void) |
uint16_t | wiced_bt_avrc_get_data_mtu (void) |
This section contains the API's that are common for both target and controller functionality.
wiced_bt_avrc_sts_t wiced_bt_avrc_bld_command | ( | wiced_bt_avrc_command_t * | p_cmd, |
BT_HDR ** | pp_pkt | ||
) |
Function wiced_bt_avrc_bld_command.
Build AVRCP command
[out] | pp_pkt | : Pointer to pointer to the built command |
[in] | p_cmd | : Pointer to the structure to build the command from |
wiced_bt_avrc_sts_t wiced_bt_avrc_bld_response | ( | uint8_t | handle, |
wiced_bt_avrc_response_t * | p_rsp, | ||
BT_HDR ** | pp_pkt | ||
) |
Function wiced_bt_avrc_bld_response.
Build AVRCP response
[out] | pp_pkt | : Pointer to pointer to the built response |
[in] | handle | : Connection handle |
[in] | p_rsp | : Pointer to the structure to build the response from |
uint16_t wiced_bt_avrc_close | ( | uint8_t | handle | ) |
Function wiced_bt_avrc_close.
Close AVRCP connection
[in] | handle | : Handle of connection to close |
uint16_t wiced_bt_avrc_close_browse | ( | uint8_t | handle | ) |
Function wiced_bt_avrc_close_browse.
Close AVRCP browsing connection
[in] | handle | : Connection handle |
uint16_t wiced_bt_avrc_msg_req | ( | uint8_t | handle, |
uint8_t | label, | ||
uint8_t | ctype, | ||
BT_HDR * | p_pkt | ||
) |
Function wiced_bt_avrc_msg_req.
Send an AVRC message
[in] | handle | : Connection handle |
[in] | label | : Transaction label |
[in] | ctype | : Message type (see AVRC message types) |
[in] | p_pkt | : Pointer to the buffer holding the AVRC message |
uint16_t wiced_bt_avrc_open | ( | uint8_t * | p_handle, |
wiced_bt_avrc_conn_cb_t * | p_ccb, | ||
wiced_bt_device_address_t | peer_addr | ||
) |
Function wiced_bt_avrc_open.
Open AVRC connection (as intiator or acceptor); register notification callbacks.
The connection role may be AVRC controller or target.
The connection remains available to the application until wiced_bt_avrc_close() is called.
On receiving AVRC_CLOSE_IND_EVT, acceptor connections remain in acceptor mode (no need to re-open the connection)
[out] | p_handle | : Connection handle (valid if AVRC_SUCCESS is returned) |
[in] | p_ccb | : AVRC connection control block (callbacks and role configuration) |
[in] | peer_addr | : Peer device address (if initiator) |
uint16_t wiced_bt_avrc_open_browse | ( | uint8_t | handle, |
uint8_t | conn_role | ||
) |
Function wiced_bt_avrc_open_browse.
Open AVRCP browsing connection, either as initiator or acceptor.
[in] | handle | : Connection handle (obtained from wiced_bt_avrc_open) |
[in] | conn_role | : Initiator or acceptor of the connection (see AVRC connection roles) |
wiced_bt_avrc_sts_t wiced_bt_avrc_parse_command | ( | wiced_bt_avrc_msg_t * | p_msg, |
wiced_bt_avrc_command_t * | p_result, | ||
uint8_t * | p_buf, | ||
uint16_t | buf_len | ||
) |
Function wiced_bt_avrc_parse_command.
Parse incoming AVRCP command message.
[out] | p_result | : Pointer to the parsed command |
[in] | p_msg | : Pointer to the message to parse |
[in] | p_buf | : Pointer to the buffer for parsing avrc messages |
[in] | buf_len | : Size of the buffer |
wiced_bt_avrc_sts_t wiced_bt_avrc_parse_response | ( | wiced_bt_avrc_msg_t * | p_msg, |
wiced_bt_avrc_response_t * | p_result, | ||
uint8_t * | p_buf, | ||
uint16_t | buf_len | ||
) |
Function wiced_bt_avrc_parse_response.
Parse incoming AVRCP response message.
[out] | p_result | : Pointer to the parsed response |
[in] | p_msg | : Pointer to the message to parse |
[in] | p_buf | : Pointer to the buffer for parsing avrc messages |
[in] | buf_len | : Size of the buffer |
uint16_t wiced_bt_avrc_pass_cmd | ( | uint8_t | handle, |
uint8_t | label, | ||
wiced_bt_avrc_msg_pass_t * | p_msg | ||
) |
Function wiced_bt_avrc_pass_cmd.
Send a PASS THROUGH command to the peer device. This function can only be called for controller role connections. Any response message from the peer is passed back through the wiced_bt_avrc_msg_cback_t callback function.
[in] | handle | : Connection handle |
[in] | label | : Transaction label |
[in] | p_msg | : Pointer to the pass through command |
uint16_t wiced_bt_avrc_pass_rsp | ( | uint8_t | handle, |
uint8_t | label, | ||
wiced_bt_avrc_msg_pass_t * | p_msg | ||
) |
Function wiced_bt_avrc_pass_rsp.
Send a PASS THROUGH response to the peer device. This function can only be called for target role connections. This function must be called when a PASS THROUGH command message is received from the peer through the wiced_bt_avrc_msg_cback_t callback function.
[in] | handle | : Connection handle |
[in] | label | : Transaction label |
[in] | p_msg | : Pointer to the pass through response |
Function wiced_bt_avrc_register.
This function initializes AVRCP and prepares the protocol stack for its use.
This function must be called once by the system or platform using AVRCP before the other functions of the API an be used
[in] | mtu | : Control Channel MTU (Min Value = 48, default value = L2CAP MTU) |
[in] | mtu_br | : Browsing Channel MTU (Min Value = 335, default value = L2CAP MTU) |
[in] | sec_mask | : Security requirement mask |
uint16_t wiced_bt_avrc_set_buffer_pool | ( | uint16_t | buffer_size, |
uint16_t | buffer_count | ||
) |
Function wiced_bt_avrc_set_buffer_pool.
If buffer_size > 0 and there's no private pool for re-assembly, this function allocates a private buffer pool for re-assembling incoming messages If buffer_size = 0 and there's a private buffer pool for re-assembly, this function deallocates the private buffer pool for re-assembling incoming messages
[in] | buffer_size | : buffer size for the private pool |
[in] | buffer_count | : the number of buffers in this new pool |
Note : This API will create separate private pool so please increase max_number_of_buffer_pools by one (in wiced_bt_cfg_settings_t structure).
uint16_t wiced_bt_avrc_sub_cmd | ( | uint8_t | handle, |
uint8_t | label, | ||
uint8_t | page | ||
) |
Function wiced_bt_avrc_sub_cmd.
Send a SUBUNIT INFO command to the peer device. This function can only be called for controller role connections. Any response message from the peer is passed back through the wiced_bt_avrc_msg_cback_t callback function.
[in] | handle | : Connection handle |
[in] | label | : Transaction label |
[in] | page | : Specifies which subunit table is requested. For AVRCP it is typically zero. Value range is 0-7. |
uint16_t wiced_bt_avrc_unit_cmd | ( | uint8_t | handle, |
uint8_t | label | ||
) |
Function wiced_bt_avrc_unit_cmd.
Send a UNIT INFO command to the peer device. This function can only be called for controller role connections. Any response message from the peer is passed back through the wiced_bt_avrc_msg_cback_t callback function.
[in] | handle | : Connection handle |
[in] | label | : Transaction label |
uint16_t wiced_bt_avrc_vendor_cmd | ( | uint8_t | handle, |
uint8_t | label, | ||
wiced_bt_avrc_msg_vendor_t * | p_msg | ||
) |
Function wiced_bt_avrc_vendor_cmd.
Send a VENDOR DEPENDENT command to the peer device. This function can only be called for controller role connections. Any response message from the peer is passed back through the wiced_bt_avrc_msg_cback_t callback function.
[in] | handle | : Connection handle |
[in] | label | : Transaction label |
[in] | p_msg | : Pointer to the vendor dependent command |
uint16_t wiced_bt_avrc_vendor_rsp | ( | uint8_t | handle, |
uint8_t | label, | ||
wiced_bt_avrc_msg_vendor_t * | p_msg | ||
) |
Function wiced_bt_avrc_vendor_rsp.
Send a VENDOR DEPENDENT response to the peer device. This function can only be called for target role connections. This function must be called when a VENDOR DEPENDENT command message is received from the peer through the wiced_bt_avrc_msg_cback_t callback function.
[in] | handle | : Connection handle |
[in] | label | : Transaction label |
[in] | p_msg | : Pointer to the vendor dependent response |