nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches
nus.h File Reference
#include <zephyr/types.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/bluetooth/gatt.h>

Go to the source code of this file.

Data Structures

struct  bt_nus_cb
 Pointers to the callback functions for service events. More...
 

Macros

#define BT_UUID_NUS_VAL    BT_UUID_128_ENCODE(0x6e400001, 0xb5a3, 0xf393, 0xe0a9, 0xe50e24dcca9e)
 UUID of the NUS Service.
 
#define BT_UUID_NUS_TX_VAL    BT_UUID_128_ENCODE(0x6e400003, 0xb5a3, 0xf393, 0xe0a9, 0xe50e24dcca9e)
 UUID of the TX Characteristic.
 
#define BT_UUID_NUS_RX_VAL    BT_UUID_128_ENCODE(0x6e400002, 0xb5a3, 0xf393, 0xe0a9, 0xe50e24dcca9e)
 UUID of the RX Characteristic.
 
#define BT_UUID_NUS_SERVICE   BT_UUID_DECLARE_128(BT_UUID_NUS_VAL)
 
#define BT_UUID_NUS_RX   BT_UUID_DECLARE_128(BT_UUID_NUS_RX_VAL)
 
#define BT_UUID_NUS_TX   BT_UUID_DECLARE_128(BT_UUID_NUS_TX_VAL)
 

Enumerations

enum  bt_nus_send_status { BT_NUS_SEND_STATUS_ENABLED , BT_NUS_SEND_STATUS_DISABLED }
 NUS send status. More...
 

Functions

int bt_nus_init (struct bt_nus_cb *callbacks)
 Initialize the service.
 
int bt_nus_send (struct bt_conn *conn, const uint8_t *data, uint16_t len)
 Send data.
 
static uint32_t bt_nus_get_mtu (struct bt_conn *conn)
 Get maximum data length that can be used for bt_nus_send.