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

◆ bt_nus_init()

int bt_nus_init ( struct bt_nus_cb callbacks)

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

Initialize the service.

This function registers a GATT service with two characteristics, TX and RX. A remote device that is connected to this service can send data to the RX Characteristic. When the remote enables notifications, it is notified when data is sent to the TX Characteristic.

Parameters
[in]callbacksStruct with function pointers to callbacks for service events. If no callbacks are needed, this parameter can be NULL.
Return values
0If initialization is successful. Otherwise, a negative value is returned.