Skip to content

Commit fedd23f

Browse files
kartbenMaureenHelm
authored andcommitted
bluetooth: a2dp: Add missing Doxygen comments
Added missing Doxygen comments to various macros. Signed-off-by: Benjamin Cabé <[email protected]>
1 parent f9b42bc commit fedd23f

File tree

2 files changed

+62
-22
lines changed

2 files changed

+62
-22
lines changed

include/zephyr/bluetooth/a2dp-codec.h

Lines changed: 61 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,36 +26,76 @@
2626
extern "C" {
2727
#endif
2828

29-
/* Sampling Frequency */
30-
#define A2DP_SBC_SAMP_FREQ_16000 BIT(7)
31-
#define A2DP_SBC_SAMP_FREQ_32000 BIT(6)
32-
#define A2DP_SBC_SAMP_FREQ_44100 BIT(5)
33-
#define A2DP_SBC_SAMP_FREQ_48000 BIT(4)
29+
/**
30+
* @name Sampling Frequency
31+
* @{
32+
*/
33+
#define A2DP_SBC_SAMP_FREQ_16000 BIT(7) /**< 16 kHz */
34+
#define A2DP_SBC_SAMP_FREQ_32000 BIT(6) /**< 32 kHz */
35+
#define A2DP_SBC_SAMP_FREQ_44100 BIT(5) /**< 44.1 kHz */
36+
#define A2DP_SBC_SAMP_FREQ_48000 BIT(4) /**< 48 kHz */
37+
/** @} */
3438

35-
/* Channel Mode */
36-
#define A2DP_SBC_CH_MODE_MONO BIT(3)
37-
#define A2DP_SBC_CH_MODE_DUAL BIT(2)
38-
#define A2DP_SBC_CH_MODE_STREO BIT(1)
39-
#define A2DP_SBC_CH_MODE_JOINT BIT(0)
39+
/**
40+
* @name Channel Mode
41+
* @{
42+
*/
43+
#define A2DP_SBC_CH_MODE_MONO BIT(3) /**< Mono */
44+
#define A2DP_SBC_CH_MODE_DUAL BIT(2) /**< Dual Channel */
45+
#define A2DP_SBC_CH_MODE_STREO BIT(1) /**< Stereo */
46+
#define A2DP_SBC_CH_MODE_JOINT BIT(0) /**< Joint Stereo */
47+
/** @} */
4048

41-
/* Block Length */
42-
#define A2DP_SBC_BLK_LEN_4 BIT(7)
43-
#define A2DP_SBC_BLK_LEN_8 BIT(6)
44-
#define A2DP_SBC_BLK_LEN_12 BIT(5)
45-
#define A2DP_SBC_BLK_LEN_16 BIT(4)
49+
/**
50+
* @name Block Length
51+
* @{
52+
*/
53+
#define A2DP_SBC_BLK_LEN_4 BIT(7) /**< 4 blocks */
54+
#define A2DP_SBC_BLK_LEN_8 BIT(6) /**< 8 blocks */
55+
#define A2DP_SBC_BLK_LEN_12 BIT(5) /**< 12 blocks */
56+
#define A2DP_SBC_BLK_LEN_16 BIT(4) /**< 16 blocks */
57+
/** @} */
4658

47-
/* Subbands */
48-
#define A2DP_SBC_SUBBAND_4 BIT(3)
49-
#define A2DP_SBC_SUBBAND_8 BIT(2)
59+
/**
60+
* @name Subbands
61+
* @{
62+
*/
63+
#define A2DP_SBC_SUBBAND_4 BIT(3) /**< 4 subbands */
64+
#define A2DP_SBC_SUBBAND_8 BIT(2) /**< 8 subbands */
65+
/** @} */
5066

51-
/* Allocation Method */
52-
#define A2DP_SBC_ALLOC_MTHD_SNR BIT(1)
53-
#define A2DP_SBC_ALLOC_MTHD_LOUDNESS BIT(0)
67+
/**
68+
* @name Bit pool Allocation Method
69+
* @{
70+
*/
71+
#define A2DP_SBC_ALLOC_MTHD_SNR BIT(1) /**< Allocate based on loudness of the subband signal */
72+
#define A2DP_SBC_ALLOC_MTHD_LOUDNESS BIT(0) /**< Allocate based on the signal-to-noise ratio */
73+
/** @} */
5474

75+
/**
76+
* Gets the sampling rate from a codec preset
77+
* @param preset Codec preset
78+
*/
5579
#define BT_A2DP_SBC_SAMP_FREQ(preset) ((preset->config[0] >> 4) & 0x0f)
80+
/**
81+
* Gets the channel mode from a codec preset
82+
* @param preset Codec preset
83+
*/
5684
#define BT_A2DP_SBC_CHAN_MODE(preset) ((preset->config[0]) & 0x0f)
85+
/**
86+
* Gets the block length from a codec preset
87+
* @param preset Codec preset
88+
*/
5789
#define BT_A2DP_SBC_BLK_LEN(preset) ((preset->config[1] >> 4) & 0x0f)
90+
/**
91+
* Gets the number subbands from a codec preset
92+
* @param preset Codec preset
93+
*/
5894
#define BT_A2DP_SBC_SUB_BAND(preset) ((preset->config[1] >> 2) & 0x03)
95+
/**
96+
* Gets the bitpool allocation method from a codec preset
97+
* @param preset Codec preset
98+
*/
5999
#define BT_A2DP_SBC_ALLOC_MTHD(preset) ((preset->config[1]) & 0x03)
60100

61101
/** @brief SBC Codec */

include/zephyr/bluetooth/a2dp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/** @file
2-
* @brief Advance Audio Distribution Profile header.
2+
* @brief Advanced Audio Distribution Profile header.
33
*/
44

55
/*

0 commit comments

Comments
 (0)