![]() |
nRF Connect SDK Bare Metal API 2.0.99
|
| uint32_t ble_nus_data_send | ( | struct ble_nus * | nus, |
| uint8_t * | data, | ||
| uint16_t * | length, | ||
| uint16_t | conn_handle ) |
#include <ble_nus.h>
Send data on the NUS TX characteristic as a notification.
Sends data if the notification bit in the CCCD is set for conn_handle.
| [in] | nus | Pointer to the Nordic UART Service structure. |
| [in] | data | Data to be sent. |
| [in,out] | length | In: Length of the data. Out: Number of bytes sent. |
| [in] | conn_handle | Connection handle of the destination client. |
| NRF_SUCCESS | On success. |
| NRF_ERROR_NULL | If nus, data, or length are NULL. |
| NRF_ERROR_INVALID_STATE | If the peer has not enabled TX notifications (CCCD not set for notifications). |