Nordic Semiconductor nRF5 AirFuel SDK
version 2.2.0
|
Data Structures | |
struct | ble_wpts_evt_t |
WPT Service event. More... | |
struct | ble_wpts_init_t |
WPT Service init structure. More... | |
struct | ble_wpts_s |
WPT Service status structure. More... | |
Typedefs | |
typedef struct ble_wpts_s | ble_wpts_t |
WPT Service status structure. | |
typedef void(* | ble_wpts_evt_handler_t) (ble_wpts_t *p_wpts, ble_wpts_evt_t *p_evt) |
WPT Service event handler type. More... | |
Functions | |
uint32_t | ble_wpts_init (ble_wpts_t *p_wpts, const ble_wpts_init_t *p_wpts_init) |
Initialize the WPT Service. More... | |
void | ble_wpts_on_ble_evt (ble_wpts_t *p_wpts, ble_evt_t *p_ble_evt) |
WPT Service BLE stack event handler. More... | |
uint32_t | ble_wpts_alert_send (ble_wpts_t *p_wpts, pru_alert_t *p_alert) |
Sends PRU alert if notification has been enabled. More... | |
uint32_t | ble_wpts_pru_static_set (ble_wpts_t *p_wpts, pru_static_t *p_pru_static) |
Sets value of the PRU Static Parameter characteristic. More... | |
uint32_t | ble_wpts_pru_dynamic_set (ble_wpts_t *p_wpts, pru_dynamic_t *p_pru_dynamic) |
Sets value of the PRU Dynamic Parameter characteristic. More... | |
API implementation | |
static void | pru_static_encode (ble_wpts_t *p_wpt, const pru_static_t *p_pru_static, uint8_t *p_encoded_buffer) |
Encode PRU Static Parameter structure. More... | |
static void | pru_dynamic_encode (ble_wpts_t *p_wpt, const pru_dynamic_t *p_pru_dynamic, uint8_t *p_encoded_buffer) |
Encode PRU Dynamic Parameter structure. More... | |
static uint32_t | pru_control_char_add (ble_wpts_t *p_wpt, const ble_wpts_init_t *p_wpts_init) |
Add PRU Control characteristic. More... | |
static uint32_t | ptu_static_char_add (ble_wpts_t *p_wpt, const ble_wpts_init_t *p_wpts_init) |
Add PTU Static Parameter characteristic. More... | |
static uint32_t | pru_alert_char_add (ble_wpts_t *p_wpt, const ble_wpts_init_t *p_wpts_init) |
Add PRU Alert characteristic. More... | |
static uint32_t | pru_static_char_add (ble_wpts_t *p_wpt, const ble_wpts_init_t *p_wpts_init) |
Add PRU Static Parameter characteristic. More... | |
static uint32_t | pru_dynamic_char_add (ble_wpts_t *p_wpt, const ble_wpts_init_t *p_wpts_init) |
Add PRU Dynamic Parameter characteristic. More... | |
typedef void(* ble_wpts_evt_handler_t) (ble_wpts_t *p_wpts, ble_wpts_evt_t *p_evt) |
WPT Service event handler type.
[in] | p_wpts | WPT Service structure. |
[in] | p_evt | WPT Service event. |
Definition at line 60 of file ble_wpts.h.
enum ble_wpts_evt_type_t |
< WPT Service event type.
Definition at line 30 of file ble_wpts.h.
uint32_t ble_wpts_init | ( | ble_wpts_t * | p_wpts, |
const ble_wpts_init_t * | p_wpts_init | ||
) |
Initialize the WPT Service.
[out] | p_wpts | WPT Service structure. This structure will have to be supplied by the application. It will be initialized by this function, and will later be used to identify this particular service instance. |
[in] | p_wpts_init | Information needed to initialize the service. |
Definition at line 642 of file ble_wpts.c.
void ble_wpts_on_ble_evt | ( | ble_wpts_t * | p_wpts, |
ble_evt_t * | p_ble_evt | ||
) |
WPT Service BLE stack event handler.
Handles all events from the BLE stack of interest to the WPT Service.
[in] | p_wpts | WPT Service structure. |
[in] | p_ble_evt | Event received from the BLE stack. |
Definition at line 196 of file ble_wpts.c.
uint32_t ble_wpts_alert_send | ( | ble_wpts_t * | p_wpts, |
pru_alert_t * | p_alert | ||
) |
Sends PRU alert if notification has been enabled.
The application calls this function to send a PRU alert. If notification has been enabled, the alert data is encoded and sent to the client.
[in] | p_wpts | WPT Service structure. |
[in] | p_alert | PRU alert value. |
Definition at line 703 of file ble_wpts.c.
uint32_t ble_wpts_pru_static_set | ( | ble_wpts_t * | p_wpts, |
pru_static_t * | p_pru_static | ||
) |
Sets value of the PRU Static Parameter characteristic.
[in] | p_wpts | WPT Service structure. |
[in] | p_pru_static | PRU Static Parameter characteristic structure. |
Definition at line 769 of file ble_wpts.c.
uint32_t ble_wpts_pru_dynamic_set | ( | ble_wpts_t * | p_wpts, |
pru_dynamic_t * | p_pru_dynamic | ||
) |
Sets value of the PRU Dynamic Parameter characteristic.
[in] | p_wpts | WPT Service structure. |
[in] | p_pru_dynamic | PRU dynamic data. |
Sets value of the PRU Dynamic Parameter characteristic.
Definition at line 790 of file ble_wpts.c.
|
static |
Encode PRU Static Parameter structure.
[in] | p_wpt | PRU Service structure. |
[in] | p_pru_static | Static parameter structure to be encoded. |
[out] | p_encoded_buffer | Buffer where the encoded data will be written. |
Definition at line 226 of file ble_wpts.c.
|
static |
Encode PRU Dynamic Parameter structure.
[in] | p_wpt | PRU Service structure. |
[in] | p_pru_dynamic | Dynamic parameter structure to be encoded. |
[out] | p_encoded_buffer | Buffer where the encoded data will be written. |
Definition at line 284 of file ble_wpts.c.
|
static |
Add PRU Control characteristic.
[in] | p_wpt | PRU Service structure. |
[in] | p_wpts_init | Information needed to initialize the service. |
Definition at line 386 of file ble_wpts.c.
|
static |
Add PTU Static Parameter characteristic.
[in] | p_wpt | PRU Service structure. |
[in] | p_wpts_init | Information needed to initialize the service. |
Definition at line 437 of file ble_wpts.c.
|
static |
Add PRU Alert characteristic.
[in] | p_wpt | PRU Service structure. |
[in] | p_wpts_init | Information needed to initialize the service. |
Definition at line 489 of file ble_wpts.c.
|
static |
Add PRU Static Parameter characteristic.
[in] | p_wpt | PRU Service structure. |
[in] | p_wpts_init | Information needed to initialize the service. |
Definition at line 545 of file ble_wpts.c.
|
static |
Add PRU Dynamic Parameter characteristic.
[in] | p_wpt | PRU Service structure. |
[in] | p_wpts_init | Information needed to initialize the service. |
Definition at line 598 of file ble_wpts.c.