Go to the documentation of this file.
63 #include "custom_config.h"
71 #define HRS_C_CONNECTION_MAX 10
72 #define HRS_C_RR_INTERVALS_NUM_MAX 9
73 #define HRS_C_CTRL_POINT_ENERGY_EXP 0x01
sdk_err_t hrs_c_disc_srvc_start(uint8_t conn_idx)
Discovery Heart Rate Service on peer.
hrs_c_flag_bit_t
Heart Rate Service Measurement flag bit.
uint16_t hrs_hr_meas_handle
HRS Heart Rate Measurement characteristic Value handle which has been got from peer.
@ HRS_C_EVT_INVALID
HRS Client invalid event.
uint16_t hrs_srvc_start_handle
HRS Service start handle.
@ HRS_C_BIT_INTERVAL
RR-Interval bit.
hrs_c_evt_type_t evt_type
HRS Client event type.
@ HRS_C_SENS_LOC_FOOT
The sensor location is the foot.
hrs_c_evt_type_t
Heart Rate Service Client event type.
sdk_err_t hrs_client_init(hrs_c_evt_handler_t evt_handler)
Register HRS Client event handler.
@ HRS_C_EVT_HR_MEAS_NTF_SET_SUCCESS
HRS Client has set Notification of Heart Rate Measure characteristic.
Handles on the connected peer device needed to interact with it.
@ HRS_C_SENS_LOC_HAND
The sensor location is the hand.
sdk_err_t hrs_c_heart_rate_meas_notify_set(uint8_t conn_idx, bool is_enable)
Enable or disable peer Heart Rate Measurement characteristic notify.
@ HRS_C_SENS_LOC_CHEST
The sensor location is the chest.
void(* hrs_c_evt_handler_t)(hrs_c_evt_t *p_evt)
Heart Rate Service Client event handler type.
@ HRS_C_EVT_WRITE_OP_ERR
Error occured when HRS Client writen to peer.
@ HRS_C_BIT_SENSOR_CONTACT_SUPPORTED
Sensor Contact Supported bit.
@ HRS_C_EVT_CTRL_POINT_SET
HRS Client has set Control Point completely.
@ HRS_C_BIT_RATE_FORMAT
Heart Rate Value Format bit.
@ HRS_C_BIT_SENSOR_CONTACT_DETECTED
Sensor Contact Detected bit.
Heart Rate Service Client event.
uint8_t conn_idx
The connection index.
uint8_t rr_intervals_num
Number of RR intervals.
uint16_t hrs_ctrl_point_handle
HRS Control Point characteristic Value handle which has been got from peer.
Profile/Service Common Types.
uint16_t sdk_err_t
SDK API result type.
@ HRS_C_EVT_DISCOVERY_FAIL
HRS Client found HRS service failed because of invalid operation or no found at the peer.
@ HRS_C_SENS_LOC_WRIST
The sensor location is the wrist.
@ HRS_C_SENS_LOC_OTHER
The sensor location is other.
uint16_t energy_expended
The accumulated energy expended in kilo Joules since the last time it was reset.
hrs_c_sensor_loc_t
Values for sensor location.
hrs_c_sensor_loc_t sensor_loc
Sensor location.
Heart Rate Measurement characteristic value structure.
@ HRS_C_EVT_HR_MEAS_VAL_RECEIVE
HRS Client has received Heart Rate Measure value notification from peer.
uint16_t hrs_hr_meas_cccd_handle
HRS CCCD handle of Heart Rate Measurement characteristic which has been got from peer.
@ HRS_C_EVT_DISCOVERY_COMPLETE
HRS Client has found HRS service and its characteristics.
uint16_t hrs_sensor_loc_handle
HRS Sensor Location characteristic Value handle which has been got from peer.
#define HRS_C_RR_INTERVALS_NUM_MAX
Maximum number of RR intervals in HRS notifications.
uint16_t hr_value
Heart Rate Value.
@ HRS_C_SENS_LOC_EARLOBE
The sensor location is the earlobe.
sdk_err_t hrs_c_ctrl_point_set(uint8_t conn_idx, uint16_t ctrl_value)
Set Control Point characteristic value.
uint16_t hrs_srvc_end_handle
HRS Service end handle.
@ HRS_C_BIT_ENERGY_EXPENDED_STATUS
Energy Expended Status bit.
bool is_sensor_contact_detected
True if sensor contact has been detected.
@ HRS_C_SENS_LOC_FINGER
The sensor location is the finger.
@ HRS_C_EVT_SENSOR_LOC_READ_RSP
HRS Client has received Sensor Location Value read response.
hrs_c_hr_meas_t hr_meas_buff
Buffer of heart rate measurement value.
sdk_err_t hrs_c_sensor_loc_read(uint8_t conn_idx)
Read Sensor Location characteristic value.