|
| 1 | +/** |
| 2 | + * @file |
| 3 | + * @brief Bluetooth Microphone Control Profile (MICP) APIs. |
| 4 | + */ |
| 5 | + |
1 | 6 | /* |
2 | | - * Copyright (c) 2020-2022 Nordic Semiconductor ASA |
| 7 | + * Copyright (c) 2020-2024 Nordic Semiconductor ASA |
3 | 8 | * |
4 | 9 | * SPDX-License-Identifier: Apache-2.0 |
5 | 10 | */ |
|
29 | 34 | extern "C" { |
30 | 35 | #endif |
31 | 36 |
|
| 37 | +/** |
| 38 | + * Defines the maximum number of Microphone Control Service instances for the |
| 39 | + * Microphone Control Profile Microphone Device |
| 40 | + */ |
32 | 41 | #if defined(CONFIG_BT_MICP_MIC_DEV) |
33 | 42 | #define BT_MICP_MIC_DEV_AICS_CNT CONFIG_BT_MICP_MIC_DEV_AICS_INSTANCE_COUNT |
34 | 43 | #else |
35 | 44 | #define BT_MICP_MIC_DEV_AICS_CNT 0 |
36 | 45 | #endif /* CONFIG_BT_MICP_MIC_DEV */ |
37 | 46 |
|
38 | | -/** Application error codes */ |
| 47 | +/** |
| 48 | + * @name Application error codes |
| 49 | + * @{ |
| 50 | + */ |
| 51 | +/** Mute/unmute commands are disabled. */ |
39 | 52 | #define BT_MICP_ERR_MUTE_DISABLED 0x80 |
| 53 | +/** @} */ |
40 | 54 |
|
41 | | -/** Microphone Control Profile mute states */ |
| 55 | +/** |
| 56 | + * @name Microphone Control Profile mute states |
| 57 | + * @{ |
| 58 | + */ |
| 59 | +/** The microphone state is unmuted */ |
42 | 60 | #define BT_MICP_MUTE_UNMUTED 0x00 |
| 61 | +/** The microphone state is muted */ |
43 | 62 | #define BT_MICP_MUTE_MUTED 0x01 |
| 63 | +/** The microphone state is disabled and cannot be muted or unmuted */ |
44 | 64 | #define BT_MICP_MUTE_DISABLED 0x02 |
| 65 | +/** @} */ |
45 | 66 |
|
46 | 67 | /** @brief Opaque Microphone Controller instance. */ |
47 | 68 | struct bt_micp_mic_ctlr; |
48 | 69 |
|
49 | 70 | /** @brief Register parameters structure for Microphone Control Service */ |
50 | 71 | struct bt_micp_mic_dev_register_param { |
51 | | -#if defined(CONFIG_BT_MICP_MIC_DEV_AICS) |
| 72 | +#if defined(CONFIG_BT_MICP_MIC_DEV_AICS) || defined(__DOXYGEN__) |
52 | 73 | /** Register parameter structure for Audio Input Control Services */ |
53 | 74 | struct bt_aics_register_param aics_param[BT_MICP_MIC_DEV_AICS_CNT]; |
54 | 75 | #endif /* CONFIG_BT_MICP_MIC_DEV_AICS */ |
@@ -98,6 +119,11 @@ int bt_micp_mic_dev_register(struct bt_micp_mic_dev_register_param *param); |
98 | 119 | */ |
99 | 120 | int bt_micp_mic_dev_included_get(struct bt_micp_included *included); |
100 | 121 |
|
| 122 | +/** |
| 123 | + * @brief Struct to hold the Microphone Device callbacks |
| 124 | + * |
| 125 | + * These can be registered for usage with bt_micp_mic_dev_register(). |
| 126 | + */ |
101 | 127 | struct bt_micp_mic_dev_cb { |
102 | 128 | /** |
103 | 129 | * @brief Callback function for Microphone Device mute. |
@@ -141,6 +167,11 @@ int bt_micp_mic_dev_mute_disable(void); |
141 | 167 | */ |
142 | 168 | int bt_micp_mic_dev_mute_get(void); |
143 | 169 |
|
| 170 | +/** |
| 171 | + * @brief Struct to hold the Microphone Controller callbacks |
| 172 | + * |
| 173 | + * These can be registered for usage with bt_micp_mic_ctlr_cb_register(). |
| 174 | + */ |
144 | 175 | struct bt_micp_mic_ctlr_cb { |
145 | 176 | /** |
146 | 177 | * @brief Callback function for Microphone Control Profile mute. |
@@ -188,7 +219,7 @@ struct bt_micp_mic_ctlr_cb { |
188 | 219 | struct bt_aics_cb aics_cb; |
189 | 220 | #endif /* CONFIG_BT_MICP_MIC_CTLR_AICS */ |
190 | 221 |
|
191 | | - /** Internally used field for list handling */ |
| 222 | + /** @internal Internally used field for list handling */ |
192 | 223 | sys_snode_t _node; |
193 | 224 | }; |
194 | 225 |
|
|
0 commit comments