Go to the documentation of this file.
72 #include "custom_config.h"
81 #define HRS_CONNECTION_MAX (10 < CFG_MAX_CONNECTIONS ?\
82 10 : CFG_MAX_CONNECTIONS)
83 #define HRS_MEAS_MAX_LEN 20
84 #define HRS_MAX_BUFFERED_RR_INTERVALS 9
92 #define HRS_CHAR_MANDATORY 0x0F
93 #define HRS_CHAR_BODY_SENSOR_LOC_SUP 0x30
94 #define HRS_CHAR_ENGY_EXP_SUP 0xC0
@ HRS_SENS_LOC_EARLOBE
Definition: hrs.h:110
hrs_evt_handler_t evt_handler
Definition: hrs.h:151
uint8_t conn_idx
Definition: hrs.h:131
hrs_sensor_loc_t sensor_loc
Definition: hrs.h:154
@ HRS_EVT_NOTIFICATION_ENABLED
Definition: hrs.h:117
Heart Rate Service event.
Definition: hrs.h:130
uint8_t char_mask
Definition: hrs.h:153
void hrs_sensor_contact_detected_update(bool is_sensor_contact_detected)
Set the state of the Sensor Contact Detected bit.
sdk_err_t hrs_service_init(hrs_init_t *p_hrs_init)
Init a Heart Rate Service instance and add in the DB.
void hrs_rr_interval_add(uint16_t rr_interval)
Add an RR Interval measurement to the RR Interval buffer.
void hrs_sensor_location_set(hrs_sensor_loc_t hrs_sensor_loc)
Set the Body Sensor Location.
@ HRS_SENS_LOC_WRIST
Definition: hrs.h:107
@ HRS_SENS_LOC_FOOT
Definition: hrs.h:111
hrs_evt_type_t
Heart Rate Service event types.
Definition: hrs.h:116
sdk_err_t hrs_heart_rate_measurement_send(uint8_t conn_idx, uint16_t heart_rate, bool is_energy_updated)
Send Heart Rate measurement if Notify has been enabled.
hrs_sensor_loc_t
Values for sensor location.
Definition: hrs.h:104
uint16_t sdk_err_t
SDK API result type.
Definition: ble_error.h:243
@ HRS_SENS_LOC_FINGER
Definition: hrs.h:108
@ HRS_EVT_READ_BODY_SEN_LOCATION
Definition: hrs.h:120
hrs_evt_type_t evt_type
Definition: hrs.h:132
Heart Rate Service Init variable.
Definition: hrs.h:150
@ HRS_EVT_NOTIFICATION_DISABLED
Definition: hrs.h:118
@ HRS_EVT_RESET_ENERGY_EXPENDED
Definition: hrs.h:119
void hrs_energy_update(uint16_t energy)
Update Energy measurement if Energy Expended is supported.
@ HRS_SENS_LOC_CHEST
Definition: hrs.h:106
@ HRS_SENS_LOC_HAND
Definition: hrs.h:109
void(* hrs_evt_handler_t)(hrs_evt_t *p_evt)
Heart Rate Service event handler type.
Definition: hrs.h:141
@ HRS_SENS_LOC_OTHER
Definition: hrs.h:105
void hrs_sensor_contact_supported_set(bool is_sensor_contact_supported)
Set the state of the Sensor Contact Supported bit.
bool is_sensor_contact_supported
Definition: hrs.h:152