File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -622,6 +622,15 @@ static inline const char *bt_gatt_err_to_str(int gatt_err)
622622 */
623623void bt_gatt_cb_register (struct bt_gatt_cb * cb );
624624
625+ /** @brief Unregister GATT callbacks.
626+ *
627+ * Unregister callbacks for monitoring the state of GATT. The callback
628+ * struct should be one that was previously registered.
629+ *
630+ * @param cb Callback struct.
631+ */
632+ void bt_gatt_cb_unregister (struct bt_gatt_cb * cb );
633+
625634/** @brief Register GATT authorization callbacks.
626635 *
627636 * Register callbacks to perform application-specific authorization of GATT
Original file line number Diff line number Diff line change @@ -1628,6 +1628,11 @@ void bt_gatt_cb_register(struct bt_gatt_cb *cb)
16281628 sys_slist_append (& callback_list , & cb -> node );
16291629}
16301630
1631+ void bt_gatt_cb_unregister (struct bt_gatt_cb * cb )
1632+ {
1633+ sys_slist_find_and_remove (& callback_list , & cb -> node );
1634+ }
1635+
16311636#if defined(CONFIG_BT_GATT_DYNAMIC_DB )
16321637static void db_changed (void )
16331638{
You can’t perform that action at this time.
0 commit comments