diff --git a/include/zble_module.h b/include/zble_module.h index 881bf22..30e6182 100644 --- a/include/zble_module.h +++ b/include/zble_module.h @@ -33,5 +33,6 @@ void zble_module_reglistener(zble_event_listener_t event_listener); void zble_module_start_adv(); void zble_module_stop_adv(); bool zble_module_is_connected(); +bool zble_module_disconnect(); int32_t zble_module_get_mtu_size(); \ No newline at end of file diff --git a/src/zble_module.c b/src/zble_module.c index 963ef8a..022230f 100644 --- a/src/zble_module.c +++ b/src/zble_module.c @@ -448,4 +448,9 @@ void zble_module_init(zble_module_cfg_t *cfg) // zble_module_start_adv(); } -int32_t zble_module_get_mtu_size() { return m_mtu_size; } \ No newline at end of file +int32_t zble_module_get_mtu_size() { return m_mtu_size; } + +bool zble_module_disconnect(){ + ble_conn_state_for_each_connected(disconnect, NULL); + return true; +} \ No newline at end of file