Nordic Semiconductor nRF5 AirFuel SDK
version 2.2.0
|
#include <stdint.h>
#include <string.h>
#include "ble_wpts.h"
#include "ble_wpts_common.h"
#include "nordic_common.h"
Go to the source code of this file.
Functions | |
API implementation | |
void | ble_wpts_on_ble_evt (ble_wpts_t *p_wpt, ble_evt_t *p_ble_evt) |
WPT Service BLE stack event handler. More... | |
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... | |
uint32_t | ble_wpts_init (ble_wpts_t *p_wpt, const ble_wpts_init_t *p_wpts_init) |
Initialize the WPT Service. More... | |
uint32_t | ble_wpts_alert_send (ble_wpts_t *p_wpt, 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_wpt, 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) |
Transfer latest read sensor data to characteristic attributes. More... | |
Static functions and variables | |
const ble_gatts_rw_authorize_reply_params_t | m_auth_reply |
static void | on_connect (ble_wpts_t *p_wpt, ble_evt_t *p_ble_evt) |
Connect event handler. More... | |
static void | on_disconnect (ble_wpts_t *p_wpt, ble_evt_t *p_ble_evt) |
Disconnect event handler. More... | |
static void | on_pru_control_write (ble_wpts_t *p_wpts, ble_gatts_evt_write_t *p_evt_write) |
Handle write events to the PRU Control characteristic. More... | |
static void | on_ptu_static_parameter_write (ble_wpts_t *p_wpts, ble_gatts_evt_write_t *p_evt_write) |
Handle write events to the PTU Static Parameter characteristic. More... | |
static void | on_pru_alert_cccd_write (ble_wpts_t *p_wpts, ble_gatts_evt_write_t *p_evt_write) |
Handle write events to the PRU Alert CCCD. More... | |
static void | on_write (ble_wpts_t *p_wpt, ble_evt_t *p_ble_evt) |
Write event handler. More... | |
|
static |
Connect event handler.
[in] | p_wpt | PRU Service structure. |
[in] | p_ble_evt | Event received from the BLE stack. |
Definition at line 45 of file ble_wpts.c.
|
static |
Disconnect event handler.
[in] | p_wpt | PRU Service structure. |
[in] | p_ble_evt | Event received from the BLE stack. |
Definition at line 55 of file ble_wpts.c.
|
static |
Handle write events to the PRU Control characteristic.
[in] | p_wpts | PRU Service structure. |
[in] | p_evt_write | Write event received from the BLE stack. |
Definition at line 66 of file ble_wpts.c.
|
static |
Handle write events to the PTU Static Parameter characteristic.
[in] | p_wpts | PRU Service structure. |
[in] | p_evt_write | Write event received from the BLE stack. |
Definition at line 96 of file ble_wpts.c.
|
static |
Handle write events to the PRU Alert CCCD.
[in] | p_wpts | PRU Service structure. |
[in] | p_evt_write | Write event received from the BLE stack. |
Definition at line 140 of file ble_wpts.c.
|
static |
Write event handler.
[in] | p_wpt | PRU Service structure. |
[in] | p_ble_evt | Event received from the BLE stack. |
Definition at line 171 of file ble_wpts.c.
const ble_gatts_rw_authorize_reply_params_t m_auth_reply |
Constant authorize response, we only need authorization to get a hold of the read event.
Definition at line 34 of file ble_wpts.c.