Infineon Logo AIROC BTSDK v4.6 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
wiced_bt_avrc.h File Reference

Bluetooth AVRCP Application Programming Interface. More...

Data Structures

struct  wiced_bt_avrc_conn_cb_t
 AVRC connection control block; used when calling wiced_bt_avrc_open() to configure the AVRC connection and register for callbacks. More...
 

Macros

#define AVRC_SUPF_CT_CAT1   0x0001 /* Category 1 */
 
#define AVRC_SUPF_CT_CAT2   0x0002 /* Category 2 */
 
#define AVRC_SUPF_CT_CAT3   0x0004 /* Category 3 */
 
#define AVRC_SUPF_CT_CAT4   0x0008 /* Category 4 */
 
#define AVRC_SUPF_CT_BROWSE   0x0040 /* Browsing */
 
#define AVRC_SUPF_TG_CAT1   0x0001 /* Category 1 */
 
#define AVRC_SUPF_TG_CAT2   0x0002 /* Category 2 */
 
#define AVRC_SUPF_TG_CAT3   0x0004 /* Category 3 */
 
#define AVRC_SUPF_TG_CAT4   0x0008 /* Category 4 */
 
#define AVRC_SUPF_TG_APP_SETTINGS   0x0010 /* Player Application Settings */
 
#define AVRC_SUPF_TG_GROUP_NAVI   0x0020 /* Group Navigation */
 
#define AVRC_SUPF_TG_BROWSE   0x0040 /* Browsing */
 
#define AVRC_SUPF_TG_MULTI_PLAYER   0x0080 /* Muliple Media Player */
 
#define AVRC_META_SUCCESS   AVRC_SUCCESS
 
#define AVRC_META_FAIL   AVRC_FAIL
 
#define AVRC_METADATA_CMD   0x0000
 
#define AVRC_METADATA_RESP   0x0001
 
AVRC result codes.

#define AVRC_SUCCESS   0
 Function successful.
 
#define AVRC_NO_RESOURCES   1
 Not enough resources.
 
#define AVRC_BAD_HANDLE   2
 Bad handle.
 
#define AVRC_PID_IN_USE   3
 PID already in use.
 
#define AVRC_NOT_OPEN   4
 Connection not open.
 
#define AVRC_MSG_TOO_BIG   5
 the message length exceed the MTU of the browsing channel
 
#define AVRC_FAIL   0x10
 generic failure
 
#define AVRC_BAD_PARAM   0x11
 bad parameter
 
AVRC Control Role

#define AVRC_CT_TARGET   1
 AVRC target.
 
#define AVRC_CT_CONTROL   2
 AVRC controller.
 
#define AVRC_CT_PASSIVE   4
 AVRC role determined by peer device.
 
AVRC Connection Role

#define AVRC_CONN_INITIATOR   0
 AVRC initiator.
 
#define AVRC_CONN_ACCEPTOR   1
 AVRC acceptor.
 
AVRC CTRL events

#define AVRC_OPEN_IND_EVT   0
 AVRC_OPEN_IND_EVT event is sent when the connection is successfully opened. More...
 
#define AVRC_CLOSE_IND_EVT   1
 AVRC_CLOSE_IND_EVT event is sent when a connection is closed. More...
 
#define AVRC_CONG_IND_EVT   2
 AVRC_CONG_IND_EVT event indicates that AVCTP is congested and cannot send any more messages. More...
 
#define AVRC_UNCONG_IND_EVT   3
 AVRC_UNCONG_IND_EVT event indicates that AVCTP is uncongested and ready to send messages. More...
 
#define AVRC_BROWSE_OPEN_IND_EVT   4
 AVRC_BROWSE_OPEN_IND_EVT event is sent when the browse channel is successfully opened. More...
 
#define AVRC_BROWSE_CLOSE_IND_EVT   5
 AVRC_BROWSE_CLOSE_IND_EVT event is sent when a browse channel is closed. More...
 
#define AVRC_BROWSE_CONG_IND_EVT   6
 AVRC_BROWSE_CONG_IND_EVT event indicates that AVCTP browse channel is congested and cannot send any more messages. More...
 
#define AVRC_BROWSE_UNCONG_IND_EVT   7
 AVRC_BROWSE_UNCONG_IND_EVT event indicates that AVCTP browse channel is uncongested and ready to send messages. More...
 
#define AVRC_CMD_TIMEOUT_EVT   8
 AVRC_CMD_TIMEOUT_EVT event indicates timeout waiting for AVRC command response from the peer.
 

Typedefs

typedef void( wiced_bt_avrc_ctrl_cback_t )(uint8_t handle, uint8_t event, uint16_t result, wiced_bt_device_address_t peer_addr)
 Function wiced_bt_avrc_ctrl_cback_t. More...
 
typedef void( wiced_bt_avrc_msg_cback_t )(uint8_t handle, uint8_t label, uint8_t opcode, wiced_bt_avrc_msg_t *p_msg)
 Function wiced_bt_avrc_msg_cback_t. More...
 

Functions

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)
 

Detailed Description

Bluetooth AVRCP Application Programming Interface.

Macro Definition Documentation

#define AVRC_BROWSE_CLOSE_IND_EVT   5

AVRC_BROWSE_CLOSE_IND_EVT event is sent when a browse channel is closed.

This event can result from a call to wiced_bt_avrc_close(), wiced_bt_avrc_close_browse() or when the peer closes the connection. It is also sent when a connection attempted through wiced_bt_avrc_openBrowse() fails.

#define AVRC_BROWSE_CONG_IND_EVT   6

AVRC_BROWSE_CONG_IND_EVT event indicates that AVCTP browse channel is congested and cannot send any more messages.

#define AVRC_BROWSE_OPEN_IND_EVT   4

AVRC_BROWSE_OPEN_IND_EVT event is sent when the browse channel is successfully opened.

This eventis sent in response to an wiced_bt_avrc_open() or wiced_bt_avrc_open_browse() .

#define AVRC_BROWSE_UNCONG_IND_EVT   7

AVRC_BROWSE_UNCONG_IND_EVT event indicates that AVCTP browse channel is uncongested and ready to send messages.

#define AVRC_CLOSE_IND_EVT   1

AVRC_CLOSE_IND_EVT event is sent when a connection is closed.

This event can result from a call to wiced_bt_avrc_close() or when the peer closes the connection. It is also sent when a connection attempted through wiced_bt_avrc_open() fails.

#define AVRC_CONG_IND_EVT   2

AVRC_CONG_IND_EVT event indicates that AVCTP is congested and cannot send any more messages.

#define AVRC_OPEN_IND_EVT   0

AVRC_OPEN_IND_EVT event is sent when the connection is successfully opened.

This eventis sent in response to an wiced_bt_avrc_open().

#define AVRC_UNCONG_IND_EVT   3

AVRC_UNCONG_IND_EVT event indicates that AVCTP is uncongested and ready to send messages.

Typedef Documentation

typedef void( wiced_bt_avrc_ctrl_cback_t)(uint8_t handle, uint8_t event, uint16_t result, wiced_bt_device_address_t peer_addr)

Function wiced_bt_avrc_ctrl_cback_t.

AVRC control callback function.

Parameters
[in]handle: Connection handle
[in]event: AVRC event (see AVRC events)
[in]result: Result code (see AVRC result codes)
[in]peer_addr: Peer device address
Returns
Nothing
typedef void( wiced_bt_avrc_msg_cback_t)(uint8_t handle, uint8_t label, uint8_t opcode, wiced_bt_avrc_msg_t *p_msg)

Function wiced_bt_avrc_msg_cback_t.

AVRC message callback function. It is executed when AVCTP has a message packet ready for the application. The implementation of this callback function must copy the wiced_bt_avrc_msg_t structure passed to it as it is not guaranteed to remain after the callback function exits.

Parameters
[in]handle: Connection handle
[in]label: Message label
[in]opcode: Message opcode (see AVRC opcodes)
[in]p_msg: AVRC message
Returns
Nothing