Zephyr API Documentation 4.2.99
A Scalable Open Source RTOS
|
Audio Video Remote Control Profile header. More...
Go to the source code of this file.
Data Structures | |
struct | bt_avrcp_unit_info_rsp |
struct | bt_avrcp_subunit_info_rsp |
struct | bt_avrcp_passthrough_rsp |
struct | bt_avrcp_get_cap_rsp |
struct | bt_avrcp_folder_name |
get folder name (response) More... | |
struct | bt_avrcp_set_browsed_player_rsp |
Set browsed player response structure. More... | |
struct | bt_avrcp_ct_cb |
struct | bt_avrcp_tg_cb |
Macros | |
#define | BT_AVRCP_COMPANY_ID_SIZE (3) |
#define | BT_AVRCP_COMPANY_ID_BLUETOOTH_SIG (0x001958) |
#define | BT_AVRCP_PASSTHROUGH_GET_STATE(payload) |
#define | BT_AVRCP_PASSTHROUGH_GET_OPID(payload) |
Functions | |
int | bt_avrcp_connect (struct bt_conn *conn) |
Connect AVRCP. | |
int | bt_avrcp_disconnect (struct bt_conn *conn) |
Disconnect AVRCP. | |
struct net_buf * | bt_avrcp_create_pdu (struct net_buf_pool *pool) |
Allocate a net_buf for AVRCP PDU transmission, reserving headroom for AVRCP, AVRCTP, L2CAP, and ACL headers. | |
int | bt_avrcp_browsing_connect (struct bt_conn *conn) |
Connect AVRCP browsing channel. | |
int | bt_avrcp_browsing_disconnect (struct bt_conn *conn) |
Disconnect AVRCP browsing channel. | |
int | bt_avrcp_ct_register_cb (const struct bt_avrcp_ct_cb *cb) |
Register callback. | |
int | bt_avrcp_ct_get_cap (struct bt_avrcp_ct *ct, uint8_t tid, uint8_t cap_id) |
Get AVRCP Capabilities. | |
int | bt_avrcp_ct_get_unit_info (struct bt_avrcp_ct *ct, uint8_t tid) |
Get AVRCP Unit Info. | |
int | bt_avrcp_ct_get_subunit_info (struct bt_avrcp_ct *ct, uint8_t tid) |
Get AVRCP Subunit Info. | |
int | bt_avrcp_ct_passthrough (struct bt_avrcp_ct *ct, uint8_t tid, uint8_t opid, uint8_t state, const uint8_t *payload, uint8_t len) |
Send AVRCP Pass Through command. | |
int | bt_avrcp_ct_set_browsed_player (struct bt_avrcp_ct *ct, uint8_t tid, uint16_t player_id) |
Set browsed player. | |
int | bt_avrcp_tg_register_cb (const struct bt_avrcp_tg_cb *cb) |
Register callback. | |
int | bt_avrcp_tg_send_unit_info_rsp (struct bt_avrcp_tg *tg, uint8_t tid, struct bt_avrcp_unit_info_rsp *rsp) |
Send the unit info response. | |
int | bt_avrcp_tg_send_set_browsed_player_rsp (struct bt_avrcp_tg *tg, uint8_t tid, struct net_buf *buf) |
Send the set browsed player response. |
Audio Video Remote Control Profile header.
#define BT_AVRCP_COMPANY_ID_BLUETOOTH_SIG (0x001958) |
#define BT_AVRCP_COMPANY_ID_SIZE (3) |
#define BT_AVRCP_PASSTHROUGH_GET_OPID | ( | payload | ) |
#define BT_AVRCP_PASSTHROUGH_GET_STATE | ( | payload | ) |
enum bt_avrcp_cap_t |
enum bt_avrcp_charset_t |
enum bt_avrcp_ctype_t |
enum bt_avrcp_evt_t |
AVRCP Notification Events.
enum bt_avrcp_opid_t |
AV/C operation ids used in AVRCP passthrough commands.
enum bt_avrcp_rsp_t |
enum bt_avrcp_status_t |
AVRCP status and error codes.
These status codes are used in AVRCP responses to indicate the result of a command.
int bt_avrcp_browsing_connect | ( | struct bt_conn * | conn | ) |
Connect AVRCP browsing channel.
This function is to be called after the AVRCP control channel is established. The API is to be used to establish AVRCP browsing connection between devices.
conn | Pointer to bt_conn structure. |
int bt_avrcp_browsing_disconnect | ( | struct bt_conn * | conn | ) |
Disconnect AVRCP browsing channel.
This function close AVCTP browsing channel L2CAP connection.
conn | Pointer to bt_conn structure. |
int bt_avrcp_connect | ( | struct bt_conn * | conn | ) |
Connect AVRCP.
This function is to be called after the conn parameter is obtained by performing a GAP procedure. The API is to be used to establish AVRCP connection between devices.
conn | Pointer to bt_conn structure. |
struct net_buf * bt_avrcp_create_pdu | ( | struct net_buf_pool * | pool | ) |
Allocate a net_buf for AVRCP PDU transmission, reserving headroom for AVRCP, AVRCTP, L2CAP, and ACL headers.
This function allocates a buffer from the specified pool and reserves sufficient headroom for protocol headers required by AVRCP over Bluetooth.
pool | The buffer pool to allocate from. |
Get AVRCP Capabilities.
This function gets the capabilities supported by remote device.
ct | The AVRCP CT instance. |
tid | The transaction label of the response, valid from 0 to 15. |
cap_id | Specific capability requested, see bt_avrcp_cap_t. |
int bt_avrcp_ct_get_subunit_info | ( | struct bt_avrcp_ct * | ct, |
uint8_t | tid ) |
Get AVRCP Subunit Info.
This function obtains information about the subunit(s) of an AV/C unit. A device with AVRCP may support other subunits than the panel subunit if other profiles co-exist in the device.
ct | The AVRCP CT instance. |
tid | The transaction label of the response, valid from 0 to 15. |
int bt_avrcp_ct_get_unit_info | ( | struct bt_avrcp_ct * | ct, |
uint8_t | tid ) |
Get AVRCP Unit Info.
This function obtains information that pertains to the AV/C unit as a whole.
ct | The AVRCP CT instance. |
tid | The transaction label of the response, valid from 0 to 15. |
int bt_avrcp_ct_passthrough | ( | struct bt_avrcp_ct * | ct, |
uint8_t | tid, | ||
uint8_t | opid, | ||
uint8_t | state, | ||
const uint8_t * | payload, | ||
uint8_t | len ) |
Send AVRCP Pass Through command.
This function send a pass through command to the remote device. Passsthhrough command is used to transfer user operation information from a CT to Panel subunit of TG.
ct | The AVRCP CT instance. |
tid | The transaction label of the response, valid from 0 to 15. |
opid | The user operation id, see bt_avrcp_opid_t. |
state | The button state, see bt_avrcp_button_state_t. |
payload | The payload of the pass through command. Should not be NULL if len is not zero. |
len | The length of the payload. |
int bt_avrcp_ct_register_cb | ( | const struct bt_avrcp_ct_cb * | cb | ) |
Register callback.
Register AVRCP callbacks to monitor the state and interact with the remote device.
cb | The AVRCP CT callback function. |
Set browsed player.
This function sets the browsed player on the remote device.
ct | The AVRCP CT instance. |
tid | The transaction label of the response, valid from 0 to 15. |
player_id | The player ID to be set as browsed player. |
int bt_avrcp_disconnect | ( | struct bt_conn * | conn | ) |
Disconnect AVRCP.
This function close AVCTP L2CAP connection.
conn | Pointer to bt_conn structure. |
int bt_avrcp_tg_register_cb | ( | const struct bt_avrcp_tg_cb * | cb | ) |
Register callback.
Register AVRCP callbacks to monitor the state and interact with the remote device.
cb | The AVRCP TG callback function. |
int bt_avrcp_tg_send_set_browsed_player_rsp | ( | struct bt_avrcp_tg * | tg, |
uint8_t | tid, | ||
struct net_buf * | buf ) |
Send the set browsed player response.
This function is called by the application to send the set browsed player response.
tg | The AVRCP TG instance. |
tid | The transaction label of the response, valid from 0 to 15. |
buf | The response buffer containing the set browsed player response data. |
int bt_avrcp_tg_send_unit_info_rsp | ( | struct bt_avrcp_tg * | tg, |
uint8_t | tid, | ||
struct bt_avrcp_unit_info_rsp * | rsp ) |
Send the unit info response.
This function is called by the application to send the unit info response.
tg | The AVRCP TG instance. |
tid | The transaction label of the response, valid from 0 to 15. |
rsp | The response for UNIT INFO command. |