Functions | |
void | hrs_sensor_contact_detected_update (bool is_sensor_contact_detected) |
Set the state of the Sensor Contact Detected bit. More... | |
void | hrs_sensor_contact_supported_set (bool is_sensor_contact_supported) |
Set the state of the Sensor Contact Supported bit. More... | |
void | hrs_sensor_location_set (hrs_sensor_loc_t hrs_sensor_loc) |
Set the Body Sensor Location. More... | |
void | hrs_energy_update (uint16_t energy) |
Update Energy measurement if Energy Expended is supported. More... | |
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. More... | |
void | hrs_rr_interval_add (uint16_t rr_interval) |
Add an RR Interval measurement to the RR Interval buffer. More... | |
sdk_err_t | hrs_service_init (hrs_init_t *p_hrs_init) |
Init a Heart Rate Service instance and add in the DB. More... | |
uint16_t | hrs_service_start_handle_get (void) |
Provide the interface for other modules to obtain the hrs service start handle . More... | |
void hrs_energy_update | ( | uint16_t | energy | ) |
Update Energy measurement if Energy Expended is supported.
[in] | energy | New energy measurement. |
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.
[in] | conn_idx | Connection index. |
[in] | heart_rate | New heart rate measurement. |
[in] | is_energy_updated | Indicate whether update energy expended. |
void hrs_rr_interval_add | ( | uint16_t | rr_interval | ) |
Add an RR Interval measurement to the RR Interval buffer.
All buffered RR Interval measurements will be included in the next Heart Rate Measurement notification. The maximum number of RR Interval measurement is HRS_MAX_BUFFERED_RR_INTERVALS. If the buffer is full, the oldest measurement in the buffer will be deleted.
[in] | rr_interval | New RR Interval measurement (will be buffered until the next transmission of Heart Rate Measurement). |
void hrs_sensor_contact_detected_update | ( | bool | is_sensor_contact_detected | ) |
Set the state of the Sensor Contact Detected bit.
[in] | is_sensor_contact_detected | True if sensor contact is detected, false otherwise. |
void hrs_sensor_contact_supported_set | ( | bool | is_sensor_contact_supported | ) |
Set the state of the Sensor Contact Supported bit.
[in] | is_sensor_contact_supported | New state of the Sensor Contact Supported bit. |
void hrs_sensor_location_set | ( | hrs_sensor_loc_t | hrs_sensor_loc | ) |
Set the Body Sensor Location.
Sets a new value of the Body Sensor Location characteristic. The new value will be sent to the client the next time the client reads the Body Sensor Location characteristic.
[in] | hrs_sensor_loc | New Body Sensor Location. |
sdk_err_t hrs_service_init | ( | hrs_init_t * | p_hrs_init | ) |
Init a Heart Rate Service instance and add in the DB.
[in] | p_hrs_init | Pointer to a Heart Rate Init variable. |
uint16_t hrs_service_start_handle_get | ( | void | ) |
Provide the interface for other modules to obtain the hrs service start handle .