mgmt: Add function to unregister GATT service
This adds a possibility to unregister GATT SMP service. Using this function, device can disable Firmware Update functionality, if not needed. Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This commit is contained in:
parent
a34d14b03c
commit
9a69cfbf19
2 changed files with 12 additions and 0 deletions
|
@ -25,6 +25,13 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
int smp_bt_register(void);
|
int smp_bt_register(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Unregisters the SMP Bluetooth service.
|
||||||
|
*
|
||||||
|
* @return 0 on success; negative error code on failure.
|
||||||
|
*/
|
||||||
|
int smp_bt_unregister(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -176,6 +176,11 @@ int smp_bt_register(void)
|
||||||
return bt_gatt_service_register(&smp_bt_svc);
|
return bt_gatt_service_register(&smp_bt_svc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int smp_bt_unregister(void)
|
||||||
|
{
|
||||||
|
return bt_gatt_service_unregister(&smp_bt_svc);
|
||||||
|
}
|
||||||
|
|
||||||
static int smp_bt_init(struct device *dev)
|
static int smp_bt_init(struct device *dev)
|
||||||
{
|
{
|
||||||
ARG_UNUSED(dev);
|
ARG_UNUSED(dev);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue