Microchip® Advanced Software Framework

blood_pressure.c File Reference

Blood Pressure Service.

Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.

#include "ble_manager.h"
#include "blood_pressure.h"

Functions

uint8_t blp_char_change_handler (blp_gatt_service_handler_t *blp_primary_service, at_ble_characteristic_changed_t *params)
 handler for characteristic write called by profile More...
 
void blp_init_service (blp_gatt_service_handler_t *blood_pressure_serv)
 Blood Pressure service and characteristic initialization(Called only once by user). More...
 
at_ble_status_t blp_primary_service_define (blp_gatt_service_handler_t *blp_primary_service)
 Register a BLP service instance inside stack. More...
 

Variables

uint16_t blood_pressure_feature_value = 0x001f
 initial blood pressure feature value More...
 
uint16_t blp_measurement_value = DEFAULT_VALUE
 initial heart rate measurement value More...
 
uint8_t intermediate_cuff_pressure_value = DEFAULT_VALUE
 initial body sensor location value More...
 

uint8_t blp_char_change_handler ( blp_gatt_service_handler_t blp_primary_service,
at_ble_characteristic_changed_t params 
)
void blp_init_service ( blp_gatt_service_handler_t blood_pressure_serv)

Blood Pressure service and characteristic initialization(Called only once by user).

Parameters
[in]BloodPressure service instance
Returns
none

References AT_BLE_ATTR_NO_PERMISSIONS, AT_BLE_ATTR_READABLE_REQ_AUTHN_NO_AUTHR, AT_BLE_ATTR_WRITABLE_REQ_AUTHN_NO_AUTHR, AT_BLE_CHAR_INDICATE, AT_BLE_CHAR_NOTIFY, AT_BLE_CHAR_READ, AT_BLE_UUID_16, BLOOD_PRESSURE_FEATURE_CHAR_UUID, blood_pressure_feature_value, BLOOD_PRESSURE_MEASUREMENT_CHAR_UUID, BLOOD_PRESSURE_SERVICE_UUID, BLP_DIASTOLIC_VAL_SIZE, BLP_MAP_VAL_SIZE, BLP_MAX_MM_STATUS_SIZE, BLP_MAX_PULSE_RATE_SIZE, BLP_MAX_TIME_STAMP_SIZE, BLP_MAX_USER_ID_SIZE, blp_measurement_value, BLP_MM_FLAGS_SIZE, BLP_SYSTOLIC_VAL_SIZE, at_ble_characteristic_t::char_val_handle, at_ble_characteristic_t::client_config_handle, at_ble_characteristic_t::client_config_permissions, at_ble_characteristic_t::init_value, INTERMEDIATE_CUFF_PRESSURE_CHAR_UUID, intermediate_cuff_pressure_value, NULL, at_ble_characteristic_t::presentation_format, at_ble_characteristic_t::properties, hr_gatt_service_handler::serv_chars, hr_gatt_service_handler::serv_handle, hr_gatt_service_handler::serv_uuid, at_ble_characteristic_t::server_config_handle, at_ble_characteristic_t::server_config_permissions, at_ble_uuid_t::type, at_ble_characteristic_t::user_desc, at_ble_characteristic_t::user_desc_handle, at_ble_characteristic_t::user_desc_len, at_ble_characteristic_t::user_desc_max_len, at_ble_characteristic_t::user_desc_permissions, at_ble_uuid_t::uuid, at_ble_characteristic_t::uuid, at_ble_characteristic_t::value_init_len, at_ble_characteristic_t::value_max_len, and at_ble_characteristic_t::value_permissions.

Referenced by blp_sensor_service_init().

at_ble_status_t blp_primary_service_define ( blp_gatt_service_handler_t blp_primary_service)

Register a BLP service instance inside stack.

Register a blp service instance inside stack.

Parameters
[in]blp_primary_serviceblp service instance
Returns
AT_BLE_SUCCESS operation completed successfully
AT_BLE_FAILURE Generic error.

References at_ble_primary_service_define(), BLP_TOTAL_CHARATERISTIC_NUM, NULL, hr_gatt_service_handler::serv_chars, hr_gatt_service_handler::serv_handle, and hr_gatt_service_handler::serv_uuid.

Referenced by blp_sensor_service_define().

uint16_t blood_pressure_feature_value = 0x001f

initial blood pressure feature value

Referenced by blp_init_service().

uint16_t blp_measurement_value = DEFAULT_VALUE

initial heart rate measurement value

Referenced by blp_init_service().

uint8_t intermediate_cuff_pressure_value = DEFAULT_VALUE

initial body sensor location value

Referenced by blp_init_service().