![]() |
Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]
|
This service exposes speed-related and cadence-related data from a Cycling Speed and Cadence sensor intended for fitness applications. More...
This service exposes speed-related and cadence-related data from a Cycling Speed and Cadence sensor intended for fitness applications.
Data Structures | |
struct | st_ble_cscs_csc_measurement_t |
CSC Measurement value structure. More... | |
struct | st_ble_cscs_csc_feature_t |
CSC Feature value structure. More... | |
struct | st_ble_cscs_sc_cp_t |
SC Control Point value structure. More... | |
Macros | |
#define | BLE_CSCS_PRV_WRITE_REQUEST_REJECTED (BLE_ERR_GROUP_GATT | 0x82) |
Write Request Rejected error code. More... | |
#define | BLE_CSCS_PRV_SC_CONTROL_POINT_RESPONSE_PARAMETER_LEN (17) |
Response Parameter length . More... | |
#define | BLE_CSCS_PRV_MAX_SENSOR_LOCATIONS_SUPPORTED (17) |
Max No of Supported Sensor Locations. More... | |
#define | BLE_CSCS_PROCEDURE_ALREADY_IN_PROGRESS_ERROR (BLE_ERR_GROUP_GATT | 0x80) |
Procedure Already in Progress error code. More... | |
#define | BLE_CSCS_CLI_CNFG_IMPROPERLY_CONFIGURED_ERROR (BLE_ERR_GROUP_GATT | 0x81) |
Client Characteristic Configuration descriptor improperly configured error code. More... | |
Enumerations | |
enum | e_ble_sensor_location_t { BLE_CSCS_SENSOR_LOCATION_SENSOR_LOCATION_OTHER = 0, BLE_CSCS_SENSOR_LOCATION_SENSOR_LOCATION_TOP_OF_SHOE = 1, BLE_CSCS_SENSOR_LOCATION_SENSOR_LOCATION_IN_SHOE = 2, BLE_CSCS_SENSOR_LOCATION_SENSOR_LOCATION_HIP = 3, BLE_CSCS_SENSOR_LOCATION_SENSOR_LOCATION__FRONT_WHEEL = 4, BLE_CSCS_SENSOR_LOCATION_SENSOR_LOCATION_LEFT_CRANK = 5, BLE_CSCS_SENSOR_LOCATION_SENSOR_LOCATION_RIGHT_CRANK = 6, BLE_CSCS_SENSOR_LOCATION_SENSOR_LOCATION_LEFT_PEDAL = 7, BLE_CSCS_SENSOR_LOCATION_SENSOR_LOCATION_RIGHT_PEDAL = 8, BLE_CSCS_SENSOR_LOCATION_SENSOR_LOCATION__FRONT_HUB = 9, BLE_CSCS_SENSOR_LOCATION_SENSOR_LOCATION_REAR_DROPOUT = 10, BLE_CSCS_SENSOR_LOCATION_SENSOR_LOCATION_CHAINSTAY = 11, BLE_CSCS_SENSOR_LOCATION_SENSOR_LOCATION_REAR_WHEEL = 12, BLE_CSCS_SENSOR_LOCATION_SENSOR_LOCATION_REAR_HUB = 13, BLE_CSCS_SENSOR_LOCATION_SENSOR_LOCATION_CHEST = 14, BLE_CSCS_SENSOR_LOCATION_SENSOR_LOCATION_SPIDER = 15, BLE_CSCS_SENSOR_LOCATION_SENSOR_LOCATION_CHAIN_RING = 16 } |
Sensor Location Sensor Location enumeration. More... | |
enum | e_ble_cscs_sc_cp_op_code_t { BLE_CSCS_SC_CONTROL_POINT_OP_CODE_RESERVED_FOR_FUTURE_USE = 0, BLE_CSCS_SC_CONTROL_POINT_OP_CODE_SET_CUMULATIVE_VALUE = 1, BLE_CSCS_SC_CONTROL_POINT_OP_CODE_START_SENSOR_CALIBRATION = 2, BLE_CSCS_SC_CONTROL_POINT_OP_CODE_UPDATE_SENSOR_LOCATION = 3, BLE_CSCS_SC_CONTROL_POINT_OP_CODE_REQUEST_SUPPORTED_SENSOR_LOCATIONS = 4, BLE_CSCS_SC_CONTROL_POINT_OP_CODE_RESPONSE_CODE = 16 } |
SC Control Point Op Code enumeration. More... | |
enum | e_ble_cscs_sc_cp_response_value_t { BLE_CSCS_SC_CONTROL_POINT_RESPONSE_VALUE_RESERVED_FOR_FUTURE_USE__RESPONSE_PARAMETER__N_A_ = 0, BLE_CSCS_SC_CONTROL_POINT_RESPONSE_VALUE_SUCCESS__RESPONSE_PARAMETER__NONE_EXCEPT_FOR_OP_CODE_0X04_SEE_NOTE_BELOW_ = 1, BLE_CSCS_SC_CONTROL_POINT_RESPONSE_VALUE_OP_CODE_NOT_SUPPORTED__RESPONSE_PARAMETER__N_A_ = 2, BLE_CSCS_SC_CONTROL_POINT_RESPONSE_VALUE_INVALID_PARAMETER__RESPONSE_PARAMETER__NONE_ = 3, BLE_CSCS_SC_CONTROL_POINT_RESPONSE_VALUE_OPERATION_FAILED__RESPONSE_PARAMETER__NONE_ = 4 } |
SC Control Point Response Value enumeration. More... | |
enum | e_ble_cscs_char_idx_t { BLE_CSCS_CSC_MEASUREMENT_IDX, BLE_CSCS_CSC_MEASUREMENT_CLI_CNFG_IDX, BLE_CSCS_CSC_FEATURE_IDX, BLE_CSCS_SENSOR_LOCATION_IDX, BLE_CSCS_SC_CONTROL_POINT_IDX, BLE_CSCS_SC_CONTROL_POINT_CLI_CNFG_IDX } |
Cycling Speed and Cadence Service characteristic Index. More... | |
enum | e_ble_cscs_event_t { BLE_CSCS_EVENT_CSC_MEASUREMENT_CLI_CNFG_WRITE_REQ = BLE_SERVS_ATTR_EVENT(BLE_CSCS_CSC_MEASUREMENT_CLI_CNFG_IDX, BLE_SERVS_WRITE_REQ), BLE_CSCS_EVENT_CSC_MEASUREMENT_CLI_CNFG_WRITE_COMP = BLE_SERVS_ATTR_EVENT(BLE_CSCS_CSC_MEASUREMENT_CLI_CNFG_IDX, BLE_SERVS_WRITE_COMP), BLE_CSCS_EVENT_CSC_MEASUREMENT_CLI_CNFG_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_CSCS_CSC_MEASUREMENT_CLI_CNFG_IDX, BLE_SERVS_READ_REQ), BLE_CSCS_EVENT_CSC_FEATURE_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_CSCS_CSC_FEATURE_IDX, BLE_SERVS_READ_REQ), BLE_CSCS_EVENT_SENSOR_LOCATION_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_CSCS_SENSOR_LOCATION_IDX, BLE_SERVS_READ_REQ), BLE_CSCS_EVENT_SC_CONTROL_POINT_WRITE_REQ = BLE_SERVS_ATTR_EVENT(BLE_CSCS_SC_CONTROL_POINT_IDX, BLE_SERVS_WRITE_REQ), BLE_CSCS_EVENT_SC_CONTROL_POINT_WRITE_COMP = BLE_SERVS_ATTR_EVENT(BLE_CSCS_SC_CONTROL_POINT_IDX, BLE_SERVS_WRITE_COMP), BLE_CSCS_EVENT_SC_CONTROL_POINT_HDL_VAL_CNF = BLE_SERVS_ATTR_EVENT(BLE_CSCS_SC_CONTROL_POINT_IDX, BLE_SERVS_HDL_VAL_CNF), BLE_CSCS_EVENT_SC_CONTROL_POINT_CLI_CNFG_WRITE_REQ = BLE_SERVS_ATTR_EVENT(BLE_CSCS_SC_CONTROL_POINT_CLI_CNFG_IDX, BLE_SERVS_WRITE_REQ), BLE_CSCS_EVENT_SC_CONTROL_POINT_CLI_CNFG_WRITE_COMP = BLE_SERVS_ATTR_EVENT(BLE_CSCS_SC_CONTROL_POINT_CLI_CNFG_IDX, BLE_SERVS_WRITE_COMP), BLE_CSCS_EVENT_SC_CONTROL_POINT_CLI_CNFG_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_CSCS_SC_CONTROL_POINT_CLI_CNFG_IDX, BLE_SERVS_READ_REQ) } |
Cycling Speed and Cadence Service event type. More... | |
Functions | |
ble_status_t | R_BLE_CSCS_Notifycscmeas (uint16_t conn_hdl, const st_ble_cscs_csc_measurement_t *p_value) |
Send notificatoin of CSC Measurement characteristic value to the remote device. More... | |
ble_status_t | R_BLE_CSCS_Setcsc_Measclicnfg (uint16_t conn_hdl, const uint16_t *p_value) |
Set CSC Measurement cli cnfg descriptor value to the local GATT database. More... | |
ble_status_t | R_BLE_CSCS_Getcsc_Measclicnfg (uint16_t conn_hdl, uint16_t *p_value) |
Get CSC Measurement cli cnfg descriptor value from the local GATT database. More... | |
ble_status_t | R_BLE_CSCS_Setfeat (const st_ble_cscs_csc_feature_t *p_value) |
Set CSC Feature characteristic value to the local GATT database. More... | |
ble_status_t | R_BLE_CSCS_Getfeat (st_ble_cscs_csc_feature_t *p_value) |
Get CSC Feature characteristic value from the local GATT database. More... | |
ble_status_t | R_BLE_CSCS_Set_Sensor_loc (const uint8_t *p_value) |
Set Sensor Location characteristic value to the local GATT database. More... | |
ble_status_t | R_BLE_CSCS_Get_Sensor_loc (uint8_t *p_value) |
Get Sensor Location characteristic value from the local GATT database. More... | |
ble_status_t | R_BLE_CSCS_IndicateSc_cp (uint16_t conn_hdl, const st_ble_cscs_sc_cp_t *p_value) |
Send indication of SC Control Point characteristic value to the remote device. More... | |
ble_status_t | R_BLE_CSCS_SetSc_cp_CliCnfg (uint16_t conn_hdl, const uint16_t *p_value) |
Set SC Control Point cli cnfg descriptor value to the local GATT database. More... | |
ble_status_t | R_BLE_CSCS_GetSc_cp_CliCnfg (uint16_t conn_hdl, uint16_t *p_value) |
Get SC Control Point cli cnfg descriptor value from the local GATT database. More... | |
ble_status_t | R_BLE_CSCS_Init (ble_servs_app_cb_t cb) |
Initialize Cycling Speed and Cadence Service service. More... | |
#define BLE_CSCS_PRV_WRITE_REQUEST_REJECTED (BLE_ERR_GROUP_GATT | 0x82) |
Write Request Rejected error code.
#define BLE_CSCS_PRV_SC_CONTROL_POINT_RESPONSE_PARAMETER_LEN (17) |
Response Parameter length .
#define BLE_CSCS_PRV_MAX_SENSOR_LOCATIONS_SUPPORTED (17) |
Max No of Supported Sensor Locations.
#define BLE_CSCS_PROCEDURE_ALREADY_IN_PROGRESS_ERROR (BLE_ERR_GROUP_GATT | 0x80) |
Procedure Already in Progress error code.
#define BLE_CSCS_CLI_CNFG_IMPROPERLY_CONFIGURED_ERROR (BLE_ERR_GROUP_GATT | 0x81) |
Client Characteristic Configuration descriptor improperly configured error code.
Sensor Location Sensor Location enumeration.
SC Control Point Op Code enumeration.
SC Control Point Response Value enumeration.
Cycling Speed and Cadence Service characteristic Index.
enum e_ble_cscs_event_t |
Cycling Speed and Cadence Service event type.
ble_status_t R_BLE_CSCS_Notifycscmeas | ( | uint16_t | conn_hdl, |
const st_ble_cscs_csc_measurement_t * | p_value | ||
) |
Send notificatoin of CSC Measurement characteristic value to the remote device.
[in] | conn_hdl | Connection handle. |
[in] | p_value | Characteristic value to send. |
ble_status_t R_BLE_CSCS_Setcsc_Measclicnfg | ( | uint16_t | conn_hdl, |
const uint16_t * | p_value | ||
) |
Set CSC Measurement cli cnfg descriptor value to the local GATT database.
[in] | conn_hdl | Connection handle. |
[in] | p_value | Descriptor value to set. |
ble_status_t R_BLE_CSCS_Getcsc_Measclicnfg | ( | uint16_t | conn_hdl, |
uint16_t * | p_value | ||
) |
Get CSC Measurement cli cnfg descriptor value from the local GATT database.
[in] | conn_hdl | Connection handle. |
[out] | p_value | Output location for the acquired descriptor value. |
ble_status_t R_BLE_CSCS_Setfeat | ( | const st_ble_cscs_csc_feature_t * | p_value | ) |
Set CSC Feature characteristic value to the local GATT database.
[in] | p_value | Characteristic value to set. |
ble_status_t R_BLE_CSCS_Getfeat | ( | st_ble_cscs_csc_feature_t * | p_value | ) |
Get CSC Feature characteristic value from the local GATT database.
[out] | p_value | Output location for the acquired descriptor value. |
ble_status_t R_BLE_CSCS_Set_Sensor_loc | ( | const uint8_t * | p_value | ) |
Set Sensor Location characteristic value to the local GATT database.
[in] | p_value | Characteristic value to set. |
ble_status_t R_BLE_CSCS_Get_Sensor_loc | ( | uint8_t * | p_value | ) |
Get Sensor Location characteristic value from the local GATT database.
[out] | p_value | Output location for the acquired descriptor value. |
ble_status_t R_BLE_CSCS_IndicateSc_cp | ( | uint16_t | conn_hdl, |
const st_ble_cscs_sc_cp_t * | p_value | ||
) |
Send indication of SC Control Point characteristic value to the remote device.
[in] | conn_hdl | Connection handle. |
[in] | p_value | Characteristic value to send. |
ble_status_t R_BLE_CSCS_SetSc_cp_CliCnfg | ( | uint16_t | conn_hdl, |
const uint16_t * | p_value | ||
) |
Set SC Control Point cli cnfg descriptor value to the local GATT database.
[in] | conn_hdl | Connection handle. |
[in] | p_value | Descriptor value to set. |
ble_status_t R_BLE_CSCS_GetSc_cp_CliCnfg | ( | uint16_t | conn_hdl, |
uint16_t * | p_value | ||
) |
Get SC Control Point cli cnfg descriptor value from the local GATT database.
[in] | conn_hdl | Connection handle. |
[out] | p_value | Output location for the acquired descriptor value. |
ble_status_t R_BLE_CSCS_Init | ( | ble_servs_app_cb_t | cb | ) |
Initialize Cycling Speed and Cadence Service service.
[in] | cb | Service callback. |