12#ifndef ZEPHYR_INCLUDE_BLUETOOTH_AVRCP_H_
13#define ZEPHYR_INCLUDE_BLUETOOTH_AVRCP_H_
19#define BT_AVRCP_COMPANY_ID_SIZE (3)
20#define BT_AVRCP_COMPANY_ID_BLUETOOTH_SIG (0x001958)
23typedef enum __packed {
23typedef enum __packed {
…};
29typedef enum __packed {
29typedef enum __packed {
…};
46typedef enum __packed {
46typedef enum __packed {
…};
55typedef enum __packed {
55typedef enum __packed {
…};
67typedef enum __packed {
67typedef enum __packed {
…};
133typedef enum __packed {
133typedef enum __packed {
…};
153#define BT_AVRCP_PASSTHROUGH_GET_STATE(payload) \
154 ((bt_avrcp_button_state_t)(FIELD_GET(BIT(7), ((payload)->byte0))))
153#define BT_AVRCP_PASSTHROUGH_GET_STATE(payload) \ …
155#define BT_AVRCP_PASSTHROUGH_GET_OPID(payload) \
156 ((bt_avrcp_opid_t)(FIELD_GET(GENMASK(6, 0), ((payload)->byte0))))
155#define BT_AVRCP_PASSTHROUGH_GET_OPID(payload) \ …
bt_avrcp_button_state_t
AVRCP button state flag.
Definition avrcp.h:133
@ BT_AVRCP_BUTTON_RELEASED
Definition avrcp.h:135
@ BT_AVRCP_BUTTON_PRESSED
Definition avrcp.h:134
bt_avrcp_ctype_t
AV/C command types.
Definition avrcp.h:46
@ BT_AVRCP_CTYPE_GENERAL_INQUIRY
Definition avrcp.h:51
@ BT_AVRCP_CTYPE_CONTROL
Definition avrcp.h:47
@ BT_AVRCP_CTYPE_STATUS
Definition avrcp.h:48
@ BT_AVRCP_CTYPE_SPECIFIC_INQUIRY
Definition avrcp.h:49
@ BT_AVRCP_CTYPE_NOTIFY
Definition avrcp.h:50
bt_avrcp_opid_t
AV/C operation ids used in AVRCP passthrough commands.
Definition avrcp.h:67
@ BT_AVRCP_OPID_ROOT_MENU
Definition avrcp.h:77
@ BT_AVRCP_OPID_BACKWARD
Definition avrcp.h:119
@ BT_AVRCP_OPID_FORWARD
Definition avrcp.h:118
@ BT_AVRCP_OPID_F4
Definition avrcp.h:127
@ BT_AVRCP_OPID_6
Definition avrcp.h:89
@ BT_AVRCP_OPID_9
Definition avrcp.h:92
@ BT_AVRCP_OPID_DOWN
Definition avrcp.h:70
@ BT_AVRCP_OPID_PAUSE
Definition avrcp.h:113
@ BT_AVRCP_OPID_F3
Definition avrcp.h:126
@ BT_AVRCP_OPID_SOUND_SELECT
Definition avrcp.h:100
@ BT_AVRCP_OPID_4
Definition avrcp.h:87
@ BT_AVRCP_OPID_ENTER
Definition avrcp.h:94
@ BT_AVRCP_OPID_CHANNEL_DOWN
Definition avrcp.h:98
@ BT_AVRCP_OPID_PAGE_DOWN
Definition avrcp.h:105
@ BT_AVRCP_OPID_PREVIOUS_CHANNEL
Definition avrcp.h:99
@ BT_AVRCP_OPID_FAVORITE_MENU
Definition avrcp.h:80
@ BT_AVRCP_OPID_VOLUME_DOWN
Definition avrcp.h:109
@ BT_AVRCP_OPID_REWIND
Definition avrcp.h:115
@ BT_AVRCP_OPID_MUTE
Definition avrcp.h:110
@ BT_AVRCP_OPID_DOT
Definition avrcp.h:93
@ BT_AVRCP_OPID_RIGHT_DOWN
Definition avrcp.h:74
@ BT_AVRCP_OPID_LEFT_DOWN
Definition avrcp.h:76
@ BT_AVRCP_OPID_STOP
Definition avrcp.h:112
@ BT_AVRCP_OPID_FAST_FORWARD
Definition avrcp.h:116
@ BT_AVRCP_OPID_LEFT
Definition avrcp.h:71
@ BT_AVRCP_OPID_DISPLAY_INFORMATION
Definition avrcp.h:102
@ BT_AVRCP_OPID_SETUP_MENU
Definition avrcp.h:78
@ BT_AVRCP_OPID_RIGHT_UP
Definition avrcp.h:73
@ BT_AVRCP_OPID_RECORD
Definition avrcp.h:114
@ BT_AVRCP_OPID_LEFT_UP
Definition avrcp.h:75
@ BT_AVRCP_OPID_F5
Definition avrcp.h:128
@ BT_AVRCP_OPID_F2
Definition avrcp.h:125
@ BT_AVRCP_OPID_INPUT_SELECT
Definition avrcp.h:101
@ BT_AVRCP_OPID_RIGHT
Definition avrcp.h:72
@ BT_AVRCP_OPID_F1
Definition avrcp.h:124
@ BT_AVRCP_OPID_5
Definition avrcp.h:88
@ BT_AVRCP_OPID_PAGE_UP
Definition avrcp.h:104
@ BT_AVRCP_OPID_1
Definition avrcp.h:84
@ BT_AVRCP_OPID_POWER
Definition avrcp.h:107
@ BT_AVRCP_OPID_EXIT
Definition avrcp.h:81
@ BT_AVRCP_OPID_CONTENTS_MENU
Definition avrcp.h:79
@ BT_AVRCP_OPID_7
Definition avrcp.h:90
@ BT_AVRCP_OPID_UP
Definition avrcp.h:69
@ BT_AVRCP_OPID_HELP
Definition avrcp.h:103
@ BT_AVRCP_OPID_SUBPICTURE
Definition avrcp.h:122
@ BT_AVRCP_OPID_8
Definition avrcp.h:91
@ BT_AVRCP_OPID_2
Definition avrcp.h:85
@ BT_AVRCP_OPID_SELECT
Definition avrcp.h:68
@ BT_AVRCP_OPID_CHANNEL_UP
Definition avrcp.h:97
@ BT_AVRCP_OPID_VENDOR_UNIQUE
Definition avrcp.h:129
@ BT_AVRCP_OPID_EJECT
Definition avrcp.h:117
@ BT_AVRCP_OPID_CLEAR
Definition avrcp.h:95
@ BT_AVRCP_OPID_0
Definition avrcp.h:83
@ BT_AVRCP_OPID_PLAY
Definition avrcp.h:111
@ BT_AVRCP_OPID_3
Definition avrcp.h:86
@ BT_AVRCP_OPID_VOLUME_UP
Definition avrcp.h:108
@ BT_AVRCP_OPID_ANGLE
Definition avrcp.h:121
int bt_avrcp_get_subunit_info(struct bt_avrcp *avrcp, uint8_t tid)
Get AVRCP Subunit Info.
int bt_avrcp_get_unit_info(struct bt_avrcp *avrcp, uint8_t tid)
Get AVRCP Unit Info.
bt_avrcp_rsp_t
AV/C response codes.
Definition avrcp.h:55
@ BT_AVRCP_RSP_REJECTED
Definition avrcp.h:58
@ BT_AVRCP_RSP_ACCEPTED
Definition avrcp.h:57
@ BT_AVRCP_RSP_STABLE
For STATUS commands.
Definition avrcp.h:61
@ BT_AVRCP_RSP_INTERIM
Definition avrcp.h:63
@ BT_AVRCP_RSP_NOT_IMPLEMENTED
Definition avrcp.h:56
@ BT_AVRCP_RSP_IMPLEMENTED
For SPECIFIC_INQUIRY and GENERAL_INQUIRY commands.
Definition avrcp.h:60
@ BT_AVRCP_RSP_IN_TRANSITION
Definition avrcp.h:59
@ BT_AVRCP_RSP_CHANGED
Definition avrcp.h:62
int bt_avrcp_passthrough(struct bt_avrcp *avrcp, uint8_t tid, uint8_t opid, uint8_t state, const uint8_t *payload, uint8_t len)
Send AVRCP Pass Through command.
bt_avrcp_cap_t
AVRCP Capability ID.
Definition avrcp.h:23
@ BT_AVRCP_CAP_EVENTS_SUPPORTED
Definition avrcp.h:25
@ BT_AVRCP_CAP_COMPANY_ID
Definition avrcp.h:24
int bt_avrcp_get_cap(struct bt_avrcp *avrcp, uint8_t tid, uint8_t cap_id)
Get AVRCP Capabilities.
struct bt_avrcp * bt_avrcp_connect(struct bt_conn *conn)
Connect AVRCP.
int bt_avrcp_register_cb(const struct bt_avrcp_cb *cb)
Register callback.
bt_avrcp_evt_t
AVRCP Notification Events.
Definition avrcp.h:29
@ BT_AVRCP_EVT_TRACK_CHANGED
Definition avrcp.h:31
@ BT_AVRCP_EVT_TRACK_REACHED_END
Definition avrcp.h:32
@ BT_AVRCP_EVT_PLAYBACK_STATUS_CHANGED
Definition avrcp.h:30
@ BT_AVRCP_EVT_UIDS_CHANGED
Definition avrcp.h:41
@ BT_AVRCP_EVT_VOLUME_CHANGED
Definition avrcp.h:42
@ BT_AVRCP_EVT_BATT_STATUS_CHANGED
Definition avrcp.h:35
@ BT_AVRCP_EVT_PLAYER_APP_SETTING_CHANGED
Definition avrcp.h:37
@ BT_AVRCP_EVT_ADDRESSED_PLAYER_CHANGED
Definition avrcp.h:40
@ BT_AVRCP_EVT_AVAILABLE_PLAYERS_CHANGED
Definition avrcp.h:39
@ BT_AVRCP_EVT_NOW_PLAYING_CONTENT_CHANGED
Definition avrcp.h:38
@ BT_AVRCP_EVT_SYSTEM_STATUS_CHANGED
Definition avrcp.h:36
@ BT_AVRCP_EVT_TRACK_REACHED_START
Definition avrcp.h:33
@ BT_AVRCP_EVT_PLAYBACK_POS_CHANGED
Definition avrcp.h:34
int bt_avrcp_disconnect(struct bt_avrcp *avrcp)
Disconnect AVRCP.
state
Definition parser_state.h:29
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
void(* subunit_info_rsp)(struct bt_avrcp *avrcp, uint8_t tid, struct bt_avrcp_subunit_info_rsp *rsp)
Callback function for bt_avrcp_get_subunit_info().
Definition avrcp.h:219
void(* get_cap_rsp)(struct bt_avrcp *avrcp, uint8_t tid, const struct bt_avrcp_get_cap_rsp *rsp)
Callback function for bt_avrcp_get_cap().
Definition avrcp.h:197
void(* passthrough_rsp)(struct bt_avrcp *avrcp, uint8_t tid, bt_avrcp_rsp_t result, const struct bt_avrcp_passthrough_rsp *rsp)
Callback function for bt_avrcp_passthrough().
Definition avrcp.h:231
void(* connected)(struct bt_avrcp *avrcp)
An AVRCP connection has been established.
Definition avrcp.h:178
void(* disconnected)(struct bt_avrcp *avrcp)
An AVRCP connection has been disconnected.
Definition avrcp.h:187
void(* unit_info_rsp)(struct bt_avrcp *avrcp, uint8_t tid, struct bt_avrcp_unit_info_rsp *rsp)
Callback function for bt_avrcp_get_unit_info().
Definition avrcp.h:208
uint8_t cap_cnt
number of items contained in *cap
Definition avrcp.h:166
uint8_t cap[]
1 or 3 octets each depends on cap_id
Definition avrcp.h:167
uint8_t cap_id
bt_avrcp_cap_t
Definition avrcp.h:165
uint8_t byte0
[7]: state_flag, [6:0]: opid
Definition avrcp.h:159
uint8_t data_len
Definition avrcp.h:160
uint8_t data[]
Definition avrcp.h:161
const uint8_t * extended_subunit_id
contains max_subunit_id items
Definition avrcp.h:150
const uint8_t * extended_subunit_type
contains max_subunit_id items
Definition avrcp.h:149
uint8_t subunit_type
Definition avrcp.h:147
uint8_t max_subunit_id
Definition avrcp.h:148
uint32_t company_id
Definition avrcp.h:143
uint8_t unit_type
Definition avrcp.h:142