Skip to content
Commit 2712b329 authored by Rubin Gerritsen's avatar Rubin Gerritsen Committed by David Leach
Browse files

Bluetooth: Document that bt_disable() doesn't touch callbacks



A naive implementation would look like

```c
void bt_init()
{
  bt_le_conn_cb_register();
  bt_enable();
}
```

When the app later adds the possibility to enable and disable
Bluetooth, it may happen that the application developer calls
`bt_init()` instead of `bt_enable()`. This results in invalid
behavior. This kind of bug is currently a bit harder to debug
as the callback register APIs do not reject registering a
callback twice.

Improving the API documentation is the first step towards making
this a bit more user friendly.

Signed-off-by: default avatarRubin Gerritsen <rubin.gerritsen@nordicsemi.no>
parent 6070e693
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment