Skip to content

Commit eaa2bf0

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

File tree

1 file changed

+44
-4
lines changed
  • include/zephyr/bluetooth/audio

1 file changed

+44
-4
lines changed

include/zephyr/bluetooth/audio/vocs.h

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
/**
2+
* @file
3+
* @brief Bluetooth Volume Offset Control Service (VOCS) APIs.
4+
*/
5+
16
/*
2-
* Copyright (c) 2020 Nordic Semiconductor ASA
7+
* Copyright (c) 2020-2024 Nordic Semiconductor ASA
38
*
49
* SPDX-License-Identifier: Apache-2.0
510
*/
@@ -36,13 +41,30 @@
3641
extern "C" {
3742
#endif
3843

39-
/** Volume Offset Control Service Error codes */
44+
/**
45+
* @name Volume Offset Control Service Error codes
46+
* @{
47+
*/
48+
/**
49+
* The Change_Counter operand value does not match the Change_Counter field value of the Volume
50+
* Offset State characteristic.
51+
*/
4052
#define BT_VOCS_ERR_INVALID_COUNTER 0x80
53+
/** An invalid opcode has been used in a control point procedure. */
4154
#define BT_VOCS_ERR_OP_NOT_SUPPORTED 0x81
55+
/** An operand value used in a control point procedure is outside the permissible range. */
4256
#define BT_VOCS_ERR_OUT_OF_RANGE 0x82
57+
/** @} */
4358

59+
/**
60+
* @name Volume Offset Control Service offset limits
61+
* @{
62+
*/
63+
/** Minimum offset value */
4464
#define BT_VOCS_MIN_OFFSET -255
65+
/** Maximum offset value */
4566
#define BT_VOCS_MAX_OFFSET 255
67+
/** @} */
4668

4769
/** @brief Opaque Volume Offset Control Service instance. */
4870
struct bt_vocs;
@@ -190,14 +212,32 @@ typedef void (*bt_vocs_description_cb)(struct bt_vocs *inst, int err,
190212
*/
191213
typedef void (*bt_vocs_discover_cb)(struct bt_vocs *inst, int err);
192214

215+
/**
216+
* @brief Struct to hold the Volume Offset Control Service callbacks
217+
*
218+
* These can be registered for usage with bt_vocs_client_cb_register() or bt_vocs_register()
219+
* depending on the role.
220+
*/
193221
struct bt_vocs_cb {
222+
/** The offset state has changed */
194223
bt_vocs_state_cb state;
224+
/** The location has changed */
195225
bt_vocs_location_cb location;
226+
/** The Description has changed */
196227
bt_vocs_description_cb description;
197228

198-
#if defined(CONFIG_BT_VOCS_CLIENT)
199-
/* Client only */
229+
#if defined(CONFIG_BT_VOCS_CLIENT) || defined(__DOXYGEN__)
230+
/**
231+
* The discovery procedure has completed
232+
*
233+
* Only settable for the client and requires enabling@kconfig{CONFIG_BT_VOCS_CLIENT}.
234+
*/
200235
bt_vocs_discover_cb discover;
236+
/**
237+
* The set offset procedure has completed
238+
*
239+
* Only settable for the client and requires enabling@kconfig{CONFIG_BT_VOCS_CLIENT}.
240+
*/
201241
bt_vocs_set_offset_cb set_offset;
202242
#endif /* CONFIG_BT_VOCS_CLIENT */
203243
};

0 commit comments

Comments
 (0)