Go to the documentation of this file.
71 #define RSCS_CONNECTION_MAX 10
72 #define RSCS_MEAS_VAL_LEN_MAX 20
73 #define RSCS_FEAT_VAL_LEN_MAX 2
74 #define RSCS_SENSOR_LOC_VAL_LEN_MAX 1
75 #define RSCS_CTRL_PT_RSP_LEN_MIN 3
76 #define RSCS_CTRL_PT_VAL_LEN_MAX (RSCS_CTRL_PT_RSP_LEN_MIN + RSCS_SENSOR_LOC_SUP_NB)
78 #define RSCS_ERROR_PROC_IN_PROGRESS 0x80
79 #define RSCS_ERROR_CCCD_INVALID 0x81
86 #define RSCS_CHAR_MANDATORY 0x003f
87 #define RSCS_CHAR_SENSOR_LOC_SUP 0x00c0
88 #define RSCS_CHAR_SC_CTRL_POINT 0x0700
89 #define RSCS_CHAR_FULL 0x07ff
97 #define RSCS_MEAS_FLAG_INST_STRIDE_LEN_BIT (0x01 << 0)
98 #define RSCS_MEAS_FLAG_TOTAL_DISTANCE_BIT (0x01 << 1)
99 #define RSCS_MEAS_FLAG_RUNNING_OR_WALKING_BIT (0x01 << 2)
107 #define RSCS_FEAT_INSTANT_STRIDE_LEN_BIT (0x01 << 0)
108 #define RSCS_FEAT_TOTAL_DISTANCE_BIT (0x01 << 1)
109 #define RSCS_FEAT_RUNNING_OR_WALKING_STATUS_BIT (0x01 << 2)
110 #define RSCS_FEAT_CALIBRATION_PROCEDURE_BIT (0x01 << 3)
111 #define RSCS_FEAT_MULTIPLE_SENSORS_BIT (0x01 << 4)
112 #define RSCS_FEAR_FULL_BIT (0x1f)
rscs_ctrl_pt_rsp_t
Running Speed and Cadence Service Control Point Response value.
@ RSCS_CTRL_PT_OP_RESERVED
@ RSCS_CTRL_PT_OP_START_CALIB
@ RSCS_EVT_CTRL_POINT_INDICATION_DISABLE
Running Speed and Cadence Service init stucture. This contains all option and data needed for initial...
bool inst_stride_length_present
@ RSCS_CTRL_PT_RSP_FAILED
rscs_sensor_loc_t sensor_location
sdk_err_t rscs_measurement_send(uint8_t conn_idx, rscs_meas_val_t *p_meas)
Send RSC measurement if notification has been enabled.
rscs_sensor_loc_t
Running Speed and Cadence Service Sensor Location.
@ RSCS_CTRL_PT_RSP_NOT_SUP
rscs_ctrl_pt_op_code_t
Running Speed and Cadence Service Control Point Operation Code.
@ RSCS_SENSOR_LOC_LEFT_PEDAL
@ RSCS_CTRL_PT_OP_UPD_LOC
@ RSCS_EVT_CTRL_POINT_RSP_CPLT
sdk_err_t rscs_ctrl_pt_rsp_send(uint8_t conn_idx, uint8_t *p_data, uint16_t length)
Send SC Control Point responce if indication has been enabled.
@ RSCS_EVT_SEBSOR_CALIBRATION
rscs_evt_handler_t evt_handler
@ RSCS_CTRL_PT_OP_SET_CUMUL_VAL
Running Speed and Cadence Measurement Character value structure.
@ RSCS_SENSOR_LOC_SHOE_IN
@ RSCS_SENSOR_LOC_FRONT_HUB
@ RSCS_CTRL_PT_OP_REQ_SUP_LOC
@ RSCS_EVT_SEBSOR_LOC_UPD
@ RSCS_EVT_CTRL_POINT_INDICATION_ENABLE
Running Speed and Cadence Service event.
@ RSCS_SENSOR_LOC_SHOE_TOP
@ RSCS_CTRL_PT_RSP_INVALID_PARAM
@ RSCS_EVT_RSC_MEAS_SEND_CPLT
uint16_t inst_stride_length
uint16_t sdk_err_t
SDK API result type.
@ RSCS_SENSOR_LOC_FRONT_WHEEL
sdk_err_t rscs_service_init(rscs_init_t *p_rscs_init)
Initialize a Running Speed and Cadence Service instance and add in the DB.
@ RSCS_SENSOR_LOC_RIGHT_PEDAL
@ RSCS_CTRL_PT_RSP_RESERVED
@ RSCS_CTRL_PT_RSP_SUCCESS
@ RSCS_EVT_SUP_SEBSOR_LOC_REQ
@ RSCS_CTRL_PT_OP_RSP_CODE
bool total_distance_present
@ RSCS_EVT_RSC_MEAS_NOTIFICATION_ENABLE
rscs_evt_type_t
Running Speed and Cadence Service event type.
@ RSCS_EVT_RSC_MEAS_NOTIFICATION_DISABLE
void(* rscs_evt_handler_t)(rscs_evt_t *p_evt)
Running Speed and Cadence Service event handler type.
sdk_err_t rscs_sensor_loc_update(rscs_sensor_loc_t sensor_loc)
Update Sensor Location if Multiple Sensor Locations Supported rscs_init_t::feature.