diff --git a/include/zephyr/bluetooth/audio/micp.h b/include/zephyr/bluetooth/audio/micp.h index e5cbf523be02340..54ed73e97446cfd 100644 --- a/include/zephyr/bluetooth/audio/micp.h +++ b/include/zephyr/bluetooth/audio/micp.h @@ -20,6 +20,7 @@ */ #include +#include <../../subsys/bluetooth/audio/micp_internal.h> #include diff --git a/subsys/bluetooth/audio/micp_internal.h b/subsys/bluetooth/audio/micp_internal.h new file mode 100644 index 000000000000000..a68aaca7cdf8311 --- /dev/null +++ b/subsys/bluetooth/audio/micp_internal.h @@ -0,0 +1,36 @@ +/** @file + * @brief Internal APIs for Bluetooth MICP. + */ + +/* + * Copyright (c) 2020 Bose Corporation + * Copyright (c) 2020 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#ifndef ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_MICP_INTERNAL_ +#define ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_MICP_INTERNAL_ + +#include +#include + +struct bt_micp_mic_ctlr { + uint16_t start_handle; + uint16_t end_handle; + uint16_t mute_handle; + struct bt_gatt_subscribe_params mute_sub_params; + struct bt_gatt_discover_params mute_sub_disc_params; + + bool busy; + uint8_t mute_val_buf[1]; /* Mute value is a single octet */ + struct bt_gatt_write_params write_params; + struct bt_gatt_read_params read_params; + struct bt_gatt_discover_params discover_params; + struct bt_conn *conn; + + uint8_t aics_inst_cnt; + struct bt_aics *aics[CONFIG_BT_AICS_CLIENT_MAX_INSTANCE_COUNT]; +}; + +#endif /* ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_MICP_INTERNAL_ */ diff --git a/subsys/bluetooth/audio/micp_mic_ctlr.c b/subsys/bluetooth/audio/micp_mic_ctlr.c index 3599287fdd5e4ec..55fa6c3c5db306d 100644 --- a/subsys/bluetooth/audio/micp_mic_ctlr.c +++ b/subsys/bluetooth/audio/micp_mic_ctlr.c @@ -19,9 +19,10 @@ #include #include #include - #include +#include "micp_internal.h" + LOG_MODULE_REGISTER(bt_micp_mic_ctlr, CONFIG_BT_MICP_MIC_CTLR_LOG_LEVEL); #include "common/bt_str.h" @@ -29,24 +30,6 @@ LOG_MODULE_REGISTER(bt_micp_mic_ctlr, CONFIG_BT_MICP_MIC_CTLR_LOG_LEVEL); /* Callback functions */ static struct bt_micp_mic_ctlr_cb *micp_mic_ctlr_cb; -struct bt_micp_mic_ctlr { - uint16_t start_handle; - uint16_t end_handle; - uint16_t mute_handle; - struct bt_gatt_subscribe_params mute_sub_params; - struct bt_gatt_discover_params mute_sub_disc_params; - - bool busy; - uint8_t mute_val_buf[1]; /* Mute value is a single octet */ - struct bt_gatt_write_params write_params; - struct bt_gatt_read_params read_params; - struct bt_gatt_discover_params discover_params; - struct bt_conn *conn; - - uint8_t aics_inst_cnt; - struct bt_aics *aics[CONFIG_BT_MICP_MIC_CTLR_MAX_AICS_INST]; -}; - static struct bt_micp_mic_ctlr mic_ctlrs[CONFIG_BT_MAX_CONN]; static struct bt_uuid *mics_uuid = BT_UUID_MICS;