NUS is implemented as a Bluetooth LE service, exchanging data treating the NUS characteristics as Serial endpoints: RX characteristic to receive, TX characteristic to send binary packets. This implementation also enables the ability to define multiple instances of the NUS Service, analogous to mutliple serial endpoints, to use each one for different purposes. Unless disabled through Kconfig, NUS instantiates a default instance, similar to what other services do, which allows users not interested in using multiple instances, to not worry about the inherent complexities. Signed-off-by: Luis Ubieda <luisf@croxel.com>
17 lines
461 B
C
17 lines
461 B
C
/*
|
|
* Copyright (c) 2024 Croxel, Inc.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#ifndef ZEPHYR_BLUETOOTH_SERVICES_NUS_INTERNAL_H_
|
|
#define ZEPHYR_BLUETOOTH_SERVICES_NUS_INTERNAL_H_
|
|
|
|
#include <zephyr/bluetooth/services/nus.h>
|
|
#include <zephyr/bluetooth/services/nus/inst.h>
|
|
|
|
struct bt_nus_inst *bt_nus_inst_default(void);
|
|
struct bt_nus_inst *bt_nus_inst_get_from_attr(const struct bt_gatt_attr *attr);
|
|
|
|
#endif /* ZEPHYR_BLUETOOTH_SERVICES_NUS_INTERNAL_H_ */
|