Bluetooth: GATT: Move clear_ccc_cfg for reuse
Move the clear_ccc_cfg function further up to be re-used without a forward declaration in bt_gatt_service_unregister. Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
parent
43d6fc0fcb
commit
2919eac891
1 changed files with 7 additions and 7 deletions
|
@ -947,6 +947,13 @@ static void sc_process(struct k_work *work)
|
|||
atomic_set_bit(sc->flags, SC_INDICATE_PENDING);
|
||||
}
|
||||
|
||||
static void clear_ccc_cfg(struct bt_gatt_ccc_cfg *cfg)
|
||||
{
|
||||
bt_addr_le_copy(&cfg->peer, BT_ADDR_LE_ANY);
|
||||
cfg->id = 0U;
|
||||
cfg->value = 0U;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_BT_SETTINGS_CCC_STORE_ON_WRITE)
|
||||
static struct gatt_ccc_store {
|
||||
struct bt_conn *conn_list[CONFIG_BT_MAX_CONN];
|
||||
|
@ -1442,13 +1449,6 @@ struct bt_gatt_attr *bt_gatt_attr_next(const struct bt_gatt_attr *attr)
|
|||
return next;
|
||||
}
|
||||
|
||||
static void clear_ccc_cfg(struct bt_gatt_ccc_cfg *cfg)
|
||||
{
|
||||
bt_addr_le_copy(&cfg->peer, BT_ADDR_LE_ANY);
|
||||
cfg->id = 0U;
|
||||
cfg->value = 0U;
|
||||
}
|
||||
|
||||
static struct bt_gatt_ccc_cfg *find_ccc_cfg(const struct bt_conn *conn,
|
||||
struct _bt_gatt_ccc *ccc)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue