Skip to content

Commit e647773

Browse files
Thalleynashif
authored andcommitted
Bluetooth: VCP: Add missing documentation in vcp.h
Add missing documentation for some defintions in vcp.h Signed-off-by: Emil Gydesen <[email protected]>
1 parent 14caa79 commit e647773

File tree

1 file changed

+52
-7
lines changed
  • include/zephyr/bluetooth/audio

1 file changed

+52
-7
lines changed

include/zephyr/bluetooth/audio/vcp.h

Lines changed: 52 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
/**
2+
* @file
3+
* @brief Bluetooth Volume Control Profile (VCP) APIs.
4+
*/
5+
16
/*
2-
* Copyright (c) 2020-2022 Nordic Semiconductor ASA
7+
* Copyright (c) 2020-2024 Nordic Semiconductor ASA
38
*
49
* SPDX-License-Identifier: Apache-2.0
510
*/
@@ -17,6 +22,9 @@
1722
*
1823
* @ingroup bluetooth
1924
* @{
25+
*
26+
* The Volume Control Profile (VCP) provides procedures to control the volume level and mute state
27+
* on audio devices.
2028
*/
2129

2230
#include <stdint.h>
@@ -30,21 +38,48 @@
3038
extern "C" {
3139
#endif
3240

41+
/**
42+
* Defines the maximum number of Volume Offset Control service instances for the
43+
* Volume Control Profile Volume Renderer
44+
*/
3345
#if defined(CONFIG_BT_VCP_VOL_REND)
3446
#define BT_VCP_VOL_REND_VOCS_CNT CONFIG_BT_VCP_VOL_REND_VOCS_INSTANCE_COUNT
35-
#define BT_VCP_VOL_REND_AICS_CNT CONFIG_BT_VCP_VOL_REND_AICS_INSTANCE_COUNT
3647
#else
3748
#define BT_VCP_VOL_REND_VOCS_CNT 0
49+
#endif /* CONFIG_BT_VCP_VOL_REND */
50+
51+
/**
52+
* Defines the maximum number of Audio Input Control service instances for the
53+
* Volume Control Profile Volume Renderer
54+
*/
55+
#if defined(CONFIG_BT_VCP_VOL_REND)
56+
#define BT_VCP_VOL_REND_AICS_CNT CONFIG_BT_VCP_VOL_REND_AICS_INSTANCE_COUNT
57+
#else
3858
#define BT_VCP_VOL_REND_AICS_CNT 0
3959
#endif /* CONFIG_BT_VCP_VOL_REND */
4060

41-
/** Volume Control Service Error codes */
61+
/**
62+
* @name Volume Control Service Error codes
63+
* @{
64+
*/
65+
/**
66+
* The Change_Counter operand value does not match the Change_Counter field value of the Volume
67+
* State characteristic.
68+
*/
4269
#define BT_VCP_ERR_INVALID_COUNTER 0x80
70+
/** An invalid opcode has been used in a control point procedure. */
4371
#define BT_VCP_ERR_OP_NOT_SUPPORTED 0x81
72+
/** @} */
4473

45-
/** Volume Control Service Mute Values */
74+
/**
75+
* @name Volume Control Service Mute Values
76+
* @{
77+
*/
78+
/** The volume state is unmuted */
4679
#define BT_VCP_STATE_UNMUTED 0x00
80+
/** The volume state is muted */
4781
#define BT_VCP_STATE_MUTED 0x01
82+
/** @} */
4883

4984
/** @brief Opaque Volume Control Service instance. */
5085
struct bt_vcp_vol_ctlr;
@@ -115,6 +150,11 @@ int bt_vcp_vol_rend_included_get(struct bt_vcp_included *included);
115150
*/
116151
int bt_vcp_vol_rend_register(struct bt_vcp_vol_rend_register_param *param);
117152

153+
/**
154+
* @brief Struct to hold the Volume Renderer callbacks
155+
*
156+
* These can be registered for usage with bt_vcp_vol_rend_register().
157+
*/
118158
struct bt_vcp_vol_rend_cb {
119159
/**
120160
* @brief Callback function for Volume Control Service volume state.
@@ -223,6 +263,11 @@ int bt_vcp_vol_rend_unmute(void);
223263
*/
224264
int bt_vcp_vol_rend_mute(void);
225265

266+
/**
267+
* @brief Struct to hold the Volume Controller callbacks
268+
*
269+
* These can be registered for usage with bt_vcp_vol_ctlr_cb_register().
270+
*/
226271
struct bt_vcp_vol_ctlr_cb {
227272
/**
228273
* @brief Callback function for Volume Control Profile volume state.
@@ -350,13 +395,13 @@ struct bt_vcp_vol_ctlr_cb {
350395
*/
351396
void (*vol_set)(struct bt_vcp_vol_ctlr *vol_ctlr, int err);
352397

353-
/* Volume Offset Control Service callbacks */
398+
/** Volume Offset Control Service callbacks */
354399
struct bt_vocs_cb vocs_cb;
355400

356-
/* Audio Input Control Service callbacks */
401+
/** Audio Input Control Service callbacks */
357402
struct bt_aics_cb aics_cb;
358403

359-
/** Internally used field for list handling */
404+
/** @internal Internally used field for list handling */
360405
sys_snode_t _node;
361406
};
362407

0 commit comments

Comments
 (0)