Microchip® Advanced Software Framework

blp_sensor_app.h File Reference

Blood Pressure Sensor Application Declarations.

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

Macros

#define APP_DEFAULT_VAL   (0)
 APP_DEFAULT_VAL default value for data in application. More...
 
#define BLOOD_PRESSURE_MMT_STATUS_FLAG_MASK   (0x1 << 4)
 
#define BLOOD_PRESSURE_PULSE_FLAG_MASK   (0x1 << 2)
 
#define BLOOD_PRESSURE_TIME_FLAG_MASK   (0x1 << 1)
 
#define BLOOD_PRESSURE_UNITS_FLAG_MASK   (0x1 << 0)
 Mask for flags field in the blp measurement value. More...
 
#define BLOOD_PRESSURE_USERID_FLAG_MASK   (0x1 << 3)
 
#define BLP_DATA_LEN   (19)
 BLP_DATA_LEN the blp measurment characteristic data length. More...
 
#define DAY_MAX   (31)
 
#define DIASTOLIC_KPA   (4)
 
#define DIASTOLIC_MAX_KPA   (11)
 
#define DIASTOLIC_MAX_MMHG   (90)
 
#define DIASTOLIC_MIN_KPA   (7)
 
#define DIASTOLIC_MIN_MMHG   (60)
 
#define DIASTOLIC_MMHG   (1)
 
#define HOUR_MAX   (23)
 
#define INDICATION_TIMER_VAL   (10)
 Indication timer the time taken to send an indication. More...
 
#define INTERIM_SYS_KPA   (8)
 
#define INTERIM_SYS_MMHG   (7)
 
#define MAP_KPA   (5)
 
#define MAP_MAX_KPA   (12)
 
#define MAP_MAX_MMHG   (100)
 
#define MAP_MIN_KPA   (8)
 
#define MAP_MIN_MMHG   (70)
 
#define MAP_MMHG   (2)
 
#define MINUTE_MAX   (59)
 
#define MONTH_MAX   (12)
 
#define PULSE_RATE   (6)
 
#define PULSE_RATE_MAX   (120)
 
#define PULSE_RATE_MIN   (60)
 
#define SECOND_MAX   (59)
 Default Time stamp Values. More...
 
#define SYSTOLIC_KPA   (3)
 
#define SYSTOLIC_MAX_KPA   (17)
 
#define SYSTOLIC_MAX_MMHG   (130)
 
#define SYSTOLIC_MIN_KPA   (10)
 
#define SYSTOLIC_MIN_MMHG   (80)
 min and max fields for blp mm in both mmhg and kpa More...
 
#define SYSTOLIC_MMHG   (0)
 Blood pressure parameters. More...
 
#define TIMER_INTERVAL   (1)
 Timer Interval which is 1 second. More...
 
#define USERID_1   (1)
 
#define USERID_2   (2)
 
#define YEAR_MAX   (9999)
 

Functions

static at_ble_status_t app_connected_state_handler (void *params)
 app_connected_state ble manger notifies the application about state More...
 
static at_ble_status_t app_disconnected_state_handler (void *param)
 app_connected_state ble manger notifies the application about state More...
 
static at_ble_status_t app_indication_confirmation_handler (void *params)
 app_indication_confirmation_handler called by ble manager to give the status of notification sent More...
 
static at_ble_status_t app_notification_confirmation_handler (void *params)
 app_notification_confirmation_handler called by ble manager to give the status of notification sent More...
 

#define APP_DEFAULT_VAL   (0)

APP_DEFAULT_VAL default value for data in application.

Referenced by app_disconnected_state_handler().

#define BLOOD_PRESSURE_MMT_STATUS_FLAG_MASK   (0x1 << 4)

Referenced by blp_char_indication().

#define BLOOD_PRESSURE_PULSE_FLAG_MASK   (0x1 << 2)
#define BLOOD_PRESSURE_TIME_FLAG_MASK   (0x1 << 1)

Referenced by blp_char_indication().

#define BLOOD_PRESSURE_UNITS_FLAG_MASK   (0x1 << 0)

Mask for flags field in the blp measurement value.

Referenced by blp_char_indication(), and blp_char_notification().

#define BLOOD_PRESSURE_USERID_FLAG_MASK   (0x1 << 3)
#define BLP_DATA_LEN   (19)

BLP_DATA_LEN the blp measurment characteristic data length.

Referenced by app_indication_handler(), blp_char_indication(), and blp_char_notification().

#define DAY_MAX   (31)

Referenced by update_time_stamp().

#define DIASTOLIC_KPA   (4)
#define DIASTOLIC_MAX_KPA   (11)

Referenced by blp_value_update().

#define DIASTOLIC_MAX_MMHG   (90)

Referenced by blp_value_update().

#define DIASTOLIC_MIN_KPA   (7)
#define DIASTOLIC_MIN_MMHG   (60)
#define DIASTOLIC_MMHG   (1)
#define HOUR_MAX   (23)

Referenced by update_time_stamp().

#define INDICATION_TIMER_VAL   (10)

Indication timer the time taken to send an indication.

Referenced by app_notification_handler(), and update_blp_sensor_value().

#define INTERIM_SYS_KPA   (8)
#define INTERIM_SYS_MMHG   (7)
#define MAP_KPA   (5)
#define MAP_MAX_KPA   (12)

Referenced by blp_value_update().

#define MAP_MAX_MMHG   (100)

Referenced by blp_value_update().

#define MAP_MIN_KPA   (8)
#define MAP_MIN_MMHG   (70)
#define MAP_MMHG   (2)
#define MINUTE_MAX   (59)

Referenced by update_time_stamp().

#define MONTH_MAX   (12)

Referenced by update_time_stamp().

#define PULSE_RATE   (6)
#define PULSE_RATE_MAX   (120)

Referenced by blp_value_update().

#define PULSE_RATE_MIN   (60)
#define SECOND_MAX   (59)

Default Time stamp Values.

Max Time stamp Values for time stamp calculation

Referenced by update_time_stamp().

#define SYSTOLIC_KPA   (3)
#define SYSTOLIC_MAX_KPA   (17)

Referenced by blp_value_update().

#define SYSTOLIC_MAX_MMHG   (130)

Referenced by blp_value_update().

#define SYSTOLIC_MIN_KPA   (10)
#define SYSTOLIC_MIN_MMHG   (80)

min and max fields for blp mm in both mmhg and kpa

Referenced by app_disconnected_state_handler(), and blp_value_update().

#define SYSTOLIC_MMHG   (0)

Blood pressure parameters.

Referenced by blp_char_indication(), and blp_value_update().

#define TIMER_INTERVAL   (1)

Timer Interval which is 1 second.

#define USERID_1   (1)
#define USERID_2   (2)
#define YEAR_MAX   (9999)

Referenced by update_time_stamp().

static at_ble_status_t app_connected_state_handler ( void *  params)
static

app_connected_state ble manger notifies the application about state

Parameters
[in]connectedparameters
static at_ble_status_t app_disconnected_state_handler ( void *  param)
static

app_connected_state ble manger notifies the application about state

Parameters
[in]disconnectionparameters
static at_ble_status_t app_indication_confirmation_handler ( void *  params)
static

app_indication_confirmation_handler called by ble manager to give the status of notification sent

Parameters
[in]at_ble_cmd_complete_event_taddress of the cmd completion
static at_ble_status_t app_notification_confirmation_handler ( void *  params)
static

app_notification_confirmation_handler called by ble manager to give the status of notification sent

Parameters
[in]at_ble_cmd_complete_event_taddress of the cmd completion