Infineon Logo AIROC BTSDK v4.2 - 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_msg_t
 AVRC received messages to sent to the upper layer. More...
 
struct  wiced_bt_avrc_config_t
 AVRC connection configuration structure; used when calling wiced_bt_avrc_open() to configure the AVRC connection and register the callbacks. More...
 

Macros

#define AVRC_SUPF_CT_CAT1   0x0001
 Supported categories. More...
 
#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
 AVRC success.
 
#define AVRC_META_FAIL   AVRC_FAIL
 AVRC fail.
 
#define AVRC_METADATA_CMD   0x0000
 AVRC metadata command.
 
#define AVRC_METADATA_RESP   0x0001
 AVRC metadata response.
 
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
 
#define AVRC_BUSY   0x12
 busy with another operation
 
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.
 

Typedefs

typedef uint8_t wiced_bt_avrc_ctrl_evt_t
 wiced_bt_avrc_ctrl_evt_e
 
typedef uint8_t wiced_bt_avrc_ctype_t
 wiced_bt_avrc_ctype_e
 
typedef void( wiced_bt_avrc_ctrl_cback_t )(uint8_t handle, wiced_bt_avrc_ctrl_evt_t event, uint16_t result, wiced_bt_avrc_xmit_buf_t *p_buf, wiced_bt_device_address_t peer_addr)
 AVRC control callback function. More...
 
typedef void( wiced_bt_avrc_msg_cback_t )(wiced_bt_avrc_msg_t *p_msg)
 AVRC data callback function. More...
 

Enumerations

enum  wiced_bt_avrc_ctrl_evt_e {
  AVRC_OPEN_IND_EVT, AVRC_CLOSE_IND_EVT, AVRC_CONG_IND_EVT, AVRC_UNCONG_IND_EVT,
  AVRC_BROWSE_OPEN_IND_EVT, AVRC_BROWSE_CLOSE_IND_EVT, AVRC_BROWSE_CONG_IND_EVT, AVRC_BROWSE_UNCONG_IND_EVT,
  AVRC_CMD_TIMEOUT_EVT, AVRC_APP_BUFFER_TX_EVT
}
 AVRC CTRL events. More...
 
enum  wiced_bt_avrc_ctype_e {
  AVRC_CMD_CTRL = 0, AVRC_CMD_STATUS, AVRC_CMD_SPEC_INQ, AVRC_CMD_NOTIF,
  AVRC_CMD_GEN_INQ, AVRC_RSP_NOT_IMPL = 8, AVRC_RSP_ACCEPT, AVRC_RSP_REJ,
  AVRC_RSP_IN_TRANS, AVRC_RSP_IMPL_STBL, AVRC_RSP_CHANGED, AVRC_RSP_INTERIM = 15
}
 AVRC ctype events. More...
 

Functions

uint16_t wiced_bt_avrc_init (uint16_t mtu, uint16_t mtu_br)
 This function initializes AVRCP and prepares the protocol stack for its use. More...
 
uint16_t wiced_bt_avrc_open (uint8_t *p_handle, wiced_bt_avrc_config_t *p_config, wiced_bt_device_address_t peer_addr)
 Open AVRC connection (as intiator or acceptor); register notification callbacks. More...
 
uint16_t wiced_bt_avrc_close (uint8_t handle)
 Close AVRCP connection. More...
 
uint16_t wiced_bt_avrc_open_browse (uint8_t handle, uint8_t conn_role)
 Open AVRCP browsing connection, either as initiator or acceptor. More...
 
uint16_t wiced_bt_avrc_close_browse (uint8_t handle)
 Close AVRCP browsing connection. More...
 
uint16_t wiced_bt_avrc_send_metadata_msg (uint8_t handle, uint8_t label, wiced_bt_avrc_ctype_t ctype, wiced_bt_avrc_xmit_buf_t *p_cmdbuf)
 Send an AVRC vendor dependent messages. More...
 
uint16_t wiced_bt_avrc_send_unit_cmd (uint8_t handle, uint8_t label)
 Send a UNIT INFO command to the peer device. More...
 
uint16_t wiced_bt_avrc_send_subunit_cmd (uint8_t handle, uint8_t label, uint8_t page)
 Send a SUBUNIT INFO command to the peer device. More...
 
uint16_t wiced_bt_avrc_send_passthrough_cmd (uint8_t handle, uint8_t label, wiced_bt_avrc_pass_thru_cmd_t *p_msg)
 Send a PASS THROUGH command to the peer device. More...
 
uint16_t wiced_bt_avrc_send_passthrough_rsp (uint8_t handle, uint8_t label, wiced_bt_avrc_ctype_t ctype, wiced_bt_avrc_pass_thru_cmd_t *p_msg)
 Send a PASS THROUGH response to the peer device. More...
 
uint16_t wiced_bt_avrc_send_vendor_cmd (uint8_t handle, uint8_t label, wiced_bt_avrc_cmd_t *p_msg)
 Send a VENDOR DEPENDENT command to the peer device. More...
 
uint16_t wiced_bt_avrc_send_vendor_rsp (uint8_t handle, uint8_t label, wiced_bt_avrc_rsp_t *p_msg)
 Send a VENDOR DEPENDENT response to the peer device. More...
 
uint8_t wiced_bt_avrc_set_trace_level (uint8_t new_level)
 Sets the trace level for AVRC. More...
 
wiced_bt_avrc_sts_t wiced_bt_avrc_bld_metadata_cmd (wiced_bt_avrc_metadata_cmd_t *p_cmd, wiced_bt_avrc_xmit_buf_t *p_xmit_buf)
 Build AVRCP metadata command. More...
 
wiced_bt_avrc_sts_t wiced_bt_avrc_bld_metadata_response (wiced_bt_avrc_metadata_rsp_t *p_rsp, wiced_bt_avrc_xmit_buf_t *p_rspbuf)
 Build AVRCP metadata response. More...
 
wiced_bt_avrc_sts_t wiced_bt_avrc_bld_browse_command (wiced_bt_avrc_browse_cmd_t *p_cmd, wiced_bt_avrc_xmit_buf_t *p_xmit_buf)
 Build AVRCP Browse response. More...
 
wiced_bt_avrc_sts_t wiced_bt_avrc_bld_browse_response (wiced_bt_avrc_browse_rsp_t *p_rsp, wiced_bt_avrc_xmit_buf_t *p_rspbuf)
 Build AVRCP Browse response. More...
 
uint16_t wiced_bt_avrc_send_browse_data (uint8_t handle, uint8_t label, wiced_bt_avrc_ctype_t ctype, wiced_bt_avrc_xmit_buf_t *p_xmit_buf)
 send the Browsing data More...
 
wiced_bool_t wiced_bt_avrc_is_valid_avc_type (uint8_t pdu_id, wiced_bt_avrc_ctype_t ctype)
 Check if correct AVRC message type is specified. More...
 
wiced_bool_t wiced_bt_avrc_is_valid_player_attr (uint8_t attr)
 Check if the given attrib value is a valid one. More...
 
uint16_t wiced_bt_avrc_get_ctrl_mtu (void)
 This function gets the control MTU. More...
 
uint16_t wiced_bt_avrc_get_data_mtu (void)
 This function gets the data MTU. More...
 
wiced_bool_t avrc_is_valid_player_attrib_value (uint8_t attrib, uint8_t value)
 This function validates player attribute id and value. More...
 
int avrc_read_attr_entry_from_stream (uint8_t *p_attr_stream, uint16_t stream_len, wiced_bt_avrc_attr_entry_t *p_attr)
 This function parse the avrc attribute. More...
 
int avrc_read_full_name_from_stream (uint8_t *p_name_stream, uint16_t stream_len, wiced_bt_avrc_full_name_t *p_name)
 This function parse the string with charset_id received in buffer. More...
 
int avrc_read_browse_item_from_stream (uint8_t *p_item_stream, uint16_t stream_len, wiced_bt_avrc_item_t *p_rsp)
 This function parse the response for browsable item player/folder/media. More...
 
int avrc_read_name_from_stream (uint8_t *p_name_stream, uint16_t stream_len, wiced_bt_avrc_name_t *p_name)
 This function parse the string received in buffer. More...
 
wiced_bool_t wiced_bt_avrc_set_browse_drb (uint8_t handle, tDRB *p_drb, uint16_t payload_len, wiced_bt_l2cap_drb_release_cb *p_unreg_cb)
 This function set the data receive buffer in stack. More...
 

Detailed Description

Bluetooth AVRCP Application Programming Interface.