![]() |
nRF Connect SDK Bare Metal API 2.0.99
|
Nordic UART Service Client service. More...
Data Structures | |
| struct | ble_nus_client_handles |
| Handles of the connected peer device, as provided by a discovery. More... | |
| struct | ble_nus_client_evt |
| Nordic UART Service Client event structure. More... | |
| struct | ble_nus_client_config |
| struct | ble_nus_client |
| NUS Client structure. More... | |
Macros | |
| #define | BLE_NUS_CLIENT_DEF(_name) |
| Macro for defining a ble_nus_client instance. | |
| #define | BLE_NUS_UUID_BASE |
| #define | BLE_UUID_NUS_SERVICE 0x0001 |
| #define | BLE_UUID_NUS_RX_CHARACTERISTIC 0x0002 |
| #define | BLE_UUID_NUS_TX_CHARACTERISTIC 0x0003 |
| #define | BLE_NUS_CLIENT_MAX_DATA_LEN_CALC(mtu_size) |
| Macro for calculating the maximum length of data (in bytes) that can be transmitted to the peer by the Nordic UART service, given the ATT MTU size. | |
| #define | BLE_NUS_CLIENT_MAX_DATA_LEN (BLE_NUS_CLIENT_MAX_DATA_LEN_CALC(CONFIG_NRF_SDH_BLE_GATT_MAX_MTU_SIZE)) |
| Maximum length of data (in bytes) that can be transmitted to the peer by the Nordic UART service. | |
Typedefs | |
| typedef void(* | ble_nus_client_evt_handler_t) (struct ble_nus_client *ble_nus_c, const struct ble_nus_client_evt *evt) |
| Nordic UART Service Client event handler type. | |
Enumerations | |
| enum | ble_nus_client_evt_type { BLE_NUS_CLIENT_EVT_DISCOVERY_COMPLETE , BLE_NUS_CLIENT_EVT_TX_DATA , BLE_NUS_CLIENT_EVT_DISCONNECTED , BLE_NUS_CLIENT_EVT_ERROR } |
| NUS Client event type. More... | |
Functions | |
| uint32_t | ble_nus_client_init (struct ble_nus_client *nus_client, const struct ble_nus_client_config *nus_client_config) |
| Initialize the Nordic UART client service. | |
| void | ble_nus_client_on_db_disc_evt (struct ble_nus_client *nus_client, const struct ble_db_discovery_evt *evt) |
| Handle events from the Database Discovery library. | |
| void | ble_nus_client_on_ble_evt (const ble_evt_t *ble_evt, void *ble_nus_client) |
| Bluetooth LE event handler for the Nordic UART Service Client. | |
| uint32_t | ble_nus_client_tx_notif_enable (struct ble_nus_client *nus_client) |
| Request the peer to start sending notification of TX characteristic. | |
| uint32_t | ble_nus_client_tx_notif_disable (struct ble_nus_client *nus_client) |
| Request the peer to stop sending notification of TX characteristic. | |
| uint32_t | ble_nus_client_string_send (struct ble_nus_client *nus_client, const uint8_t *string, uint16_t length) |
| Send a string to the server. | |
| uint32_t | ble_nus_client_handles_assign (struct ble_nus_client *nus_client, uint16_t conn_handle, const struct ble_nus_client_handles *peer_handles) |
| Assign handles to this instance of the service. | |
Nordic UART Service Client service.