bluetooth: audio: Add API to get VCP service ATT handles

This is needed for upper tester.

Signed-off-by: Piotr Narajowski <piotr.narajowski@codecoup.pl>
This commit is contained in:
Piotr Narajowski 2023-09-04 14:22:27 +02:00 committed by Carles Cufí
parent 8e5898f039
commit 54126ec4e5
2 changed files with 29 additions and 29 deletions

View File

@ -36,4 +36,33 @@ struct vcs_control_vol {
uint8_t volume;
} __packed;
struct bt_vcp_vol_ctlr {
struct vcs_state state;
uint8_t flags;
uint16_t start_handle;
uint16_t end_handle;
uint16_t state_handle;
uint16_t control_handle;
uint16_t flag_handle;
struct bt_gatt_subscribe_params state_sub_params;
struct bt_gatt_discover_params state_sub_disc_params;
struct bt_gatt_subscribe_params flag_sub_params;
struct bt_gatt_discover_params flag_sub_disc_params;
bool cp_retried;
bool busy;
struct vcs_control_vol cp_val;
struct bt_gatt_write_params write_params;
struct bt_gatt_read_params read_params;
struct bt_gatt_discover_params discover_params;
struct bt_uuid_16 uuid;
struct bt_conn *conn;
uint8_t vocs_inst_cnt;
struct bt_vocs *vocs[CONFIG_BT_VOCS_CLIENT_MAX_INSTANCE_COUNT];
uint8_t aics_inst_cnt;
struct bt_aics *aics[CONFIG_BT_AICS_CLIENT_MAX_INSTANCE_COUNT];
};
#endif /* ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_VCP_INTERNAL_*/

View File

@ -28,35 +28,6 @@ LOG_MODULE_REGISTER(bt_vcp_vol_ctlr, CONFIG_BT_VCP_VOL_CTLR_LOG_LEVEL);
#include "common/bt_str.h"
struct bt_vcp_vol_ctlr {
struct vcs_state state;
uint8_t flags;
uint16_t start_handle;
uint16_t end_handle;
uint16_t state_handle;
uint16_t control_handle;
uint16_t flag_handle;
struct bt_gatt_subscribe_params state_sub_params;
struct bt_gatt_discover_params state_sub_disc_params;
struct bt_gatt_subscribe_params flag_sub_params;
struct bt_gatt_discover_params flag_sub_disc_params;
bool cp_retried;
bool busy;
struct vcs_control_vol cp_val;
struct bt_gatt_write_params write_params;
struct bt_gatt_read_params read_params;
struct bt_gatt_discover_params discover_params;
struct bt_uuid_16 uuid;
struct bt_conn *conn;
uint8_t vocs_inst_cnt;
struct bt_vocs *vocs[CONFIG_BT_VCP_VOL_CTLR_MAX_VOCS_INST];
uint8_t aics_inst_cnt;
struct bt_aics *aics[CONFIG_BT_VCP_VOL_CTLR_MAX_AICS_INST];
};
/* Callback functions */
static struct bt_vcp_vol_ctlr_cb *vcp_vol_ctlr_cb;