Bluetooth: Host: Add const prefix for UUID

Add const prefix for service uuid and char uuid.

Since Service UUID and Char UUID should not change in the service
definition, they are most reasonably defined as rodata, also for
save some ram footprint.

The field `attr->user_data` type is `void *`, as this PR change
all Service UUID to rodata, so there must add (void *) to avoid warning.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
This commit is contained in:
Lingao Meng 2023-12-05 17:52:21 +08:00 committed by Fabio Baltieri
commit 786b9a0ad4
35 changed files with 81 additions and 79 deletions

View file

@ -31,7 +31,7 @@ LOG_MODULE_REGISTER(bt_micp_mic_ctlr, CONFIG_BT_MICP_MIC_CTLR_LOG_LEVEL);
static struct bt_micp_mic_ctlr_cb *micp_mic_ctlr_cb;
static struct bt_micp_mic_ctlr mic_ctlrs[CONFIG_BT_MAX_CONN];
static struct bt_uuid *mics_uuid = BT_UUID_MICS;
static const struct bt_uuid *mics_uuid = BT_UUID_MICS;
static uint8_t mute_notify_handler(struct bt_conn *conn,
struct bt_gatt_subscribe_params *params,