Nordic stack and drivers for the mbed BLE API Modified for HRM1017 for library 0.1.0
Fork of nRF51822 by
Blood Pressure Service
Blood Pressure Service module. More...
Data Structures | |
struct | ble_bps_evt_t |
Blood Pressure Service event. More... | |
struct | ieee_float16_t |
SFLOAT format (IEEE-11073 16-bit FLOAT, defined as a 16-bit vlue with 12-bit mantissa and 4-bit exponent. More... | |
struct | ble_bps_init_t |
Blood Pressure Service init structure. More... | |
struct | ble_bps_s |
Blood Pressure Service structure. More... | |
struct | ble_bps_meas_s |
Blood Pressure Service measurement structure. More... | |
Typedefs | |
typedef struct ble_bps_s | ble_bps_t |
Blood Pressure Service structure. | |
typedef void(* | ble_bps_evt_handler_t )(ble_bps_t *p_bps, ble_bps_evt_t *p_evt) |
Blood Pressure Service event handler type. | |
typedef struct ble_bps_meas_s | ble_bps_meas_t |
Blood Pressure Service measurement structure. | |
Enumerations | |
enum | ble_bps_evt_type_t { BLE_BPS_EVT_INDICATION_ENABLED, BLE_BPS_EVT_INDICATION_DISABLED, BLE_BPS_EVT_INDICATION_CONFIRMED } |
Blood Pressure Service event type. More... | |
Functions | |
uint32_t | ble_bps_init (ble_bps_t *p_bps, const ble_bps_init_t *p_bps_init) |
Function for initializing the Blood Pressure Service. | |
void | ble_bps_on_ble_evt (ble_bps_t *p_bps, ble_evt_t *p_ble_evt) |
Function for handling the Application's BLE Stack events. | |
uint32_t | ble_bps_measurement_send (ble_bps_t *p_bps, ble_bps_meas_t *p_bps_meas) |
Function for sending blood pressure measurement if indication has been enabled. | |
uint32_t | ble_bps_is_indication_enabled (ble_bps_t *p_bps, bool *p_indication_enabled) |
Function for checking if indication of Blood Pressure Measurement is currently enabled. |
Detailed Description
Blood Pressure Service module.
This module implements the Blood Pressure Service.
If an event handler is supplied by the application, the Blood Pressure Service will generate Blood Pressure Service events to the application.
- Note:
- The application must propagate BLE stack events to the Blood Pressure Service module by calling ble_bps_on_ble_evt() from the from the ble_stack_handler function.
- Attention! To maintain compliance with Nordic Semiconductor ASA Bluetooth profile qualification listings, this section of source code must not be modified.
Typedef Documentation
typedef void(* ble_bps_evt_handler_t)(ble_bps_t *p_bps, ble_bps_evt_t *p_evt) |
typedef struct ble_bps_meas_s ble_bps_meas_t |
Blood Pressure Service measurement structure.
This contains a Blood Pressure measurement.
Enumeration Type Documentation
enum ble_bps_evt_type_t |
Blood Pressure Service event type.
Function Documentation
uint32_t ble_bps_init | ( | ble_bps_t * | p_bps, |
const ble_bps_init_t * | p_bps_init | ||
) |
Function for initializing the Blood Pressure Service.
- Parameters:
-
[out] p_bps Blood Pressure 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_bps_init Information needed to initialize the service.
- Returns:
- NRF_SUCCESS on successful initialization of service, otherwise an error code.
uint32_t ble_bps_is_indication_enabled | ( | ble_bps_t * | p_bps, |
bool * | p_indication_enabled | ||
) |
Function for checking if indication of Blood Pressure Measurement is currently enabled.
- Parameters:
-
[in] p_bps Blood Pressure Service structure. [out] p_indication_enabled TRUE if indication is enabled, FALSE otherwise.
- Returns:
- NRF_SUCCESS on success, otherwise an error code.
uint32_t ble_bps_measurement_send | ( | ble_bps_t * | p_bps, |
ble_bps_meas_t * | p_bps_meas | ||
) |
Function for sending blood pressure measurement if indication has been enabled.
The application calls this function after having performed a Blood Pressure measurement. If indication has been enabled, the measurement data is encoded and sent to the client.
- Parameters:
-
[in] p_bps Blood Pressure Service structure. [in] p_bps_meas Pointer to new blood pressure measurement.
- Returns:
- NRF_SUCCESS on success, otherwise an error code.
Function for handling the Application's BLE Stack events.
Handles all events from the BLE stack of interest to the Blood Pressure Service.
- Parameters:
-
[in] p_bps Blood Pressure Service structure. [in] p_ble_evt Event received from the BLE stack.
Generated on Tue Jul 12 2022 14:11:59 by 1.7.2