7#ifndef BT_NUS_CLIENT_H_
8#define BT_NUS_CLIENT_H_
21#include <zephyr/bluetooth/gatt.h>
22#include <zephyr/bluetooth/conn.h>
int bt_nus_handles_assign(struct bt_gatt_dm *dm, struct bt_nus_client *nus)
Assign handles to the NUS Client instance.
int bt_nus_client_send(struct bt_nus_client *nus, const uint8_t *data, uint16_t len)
Send data to the server.
int bt_nus_client_init(struct bt_nus_client *nus, const struct bt_nus_client_init_param *init_param)
Initialize the NUS Client module.
int bt_nus_subscribe_receive(struct bt_nus_client *nus)
Request the peer to start sending notifications for the TX Characteristic.
void(* sent)(struct bt_nus_client *nus, uint8_t err, const uint8_t *data, uint16_t len)
Data sent callback.
Definition: nus_client.h:73
uint8_t(* received)(struct bt_nus_client *nus, const uint8_t *data, uint16_t len)
Data received callback.
Definition: nus_client.h:62
void(* unsubscribed)(struct bt_nus_client *nus)
TX notifications disabled callback.
Definition: nus_client.h:81
NUS Client callback structure.
Definition: nus_client.h:49
uint16_t tx_ccc
Definition: nus_client.h:43
uint16_t rx
Definition: nus_client.h:33
uint16_t tx
Definition: nus_client.h:38
Handles on the connected peer device that are needed to interact with the device.
Definition: nus_client.h:28
struct bt_nus_client_cb cb
Definition: nus_client.h:112
NUS Client initialization structure.
Definition: nus_client.h:109
struct bt_nus_client_handles handles
Definition: nus_client.h:96
struct bt_conn * conn
Definition: nus_client.h:88
struct bt_gatt_subscribe_params tx_notif_params
Definition: nus_client.h:99
atomic_t state
Definition: nus_client.h:91
struct bt_nus_client_cb cb
Definition: nus_client.h:105
struct bt_gatt_write_params rx_write_params
Definition: nus_client.h:102
NUS Client structure.
Definition: nus_client.h:85