nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches

◆ bt_nus_init()

int bt_nus_init ( struct bt_nus_cb * callbacks)

#include <include/bluetooth/services/nus.h>

Initialize the NUS Service.

Initializes the module with the given callbacks, used when:

  • The RX characteristic is written to by a remote device.
  • The TX characteristic notification state changes.
  • The notification has been sent to a remote device.
Note
The GATT service is defined and registered statically at compile time.
Parameters
[in]callbacksStruct containing pointers to callback functions. Can be NULL if no callbacks are defined.
Return values
0If initialization is successful. Otherwise, a negative value is returned.