Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]
Cycling Power Service Server

This service exposes power- and force-related data and optionally speed- and cadence-related data from a Cycling Power sensor intended for sports and fitness applications. More...

Detailed Description

This service exposes power- and force-related data and optionally speed- and cadence-related data from a Cycling Power sensor intended for sports and fitness applications.

Data Structures

struct  st_ble_cps_evt_data_t
 Cycling Power Service event data. More...
 
struct  st_ble_cps_init_param_t
 Cycling Power Service initialization parameters. More...
 
struct  st_ble_cps_connect_param_t
 Cycling Power Service connection parameters. More...
 
struct  st_ble_cps_disconnect_param_t
 Cycling Power Service disconnection parameters. More...
 
struct  st_ble_cps_cycling_power_measurement_t_flags_t
 Cycling Power Measurement characteristic flag parameters. More...
 
struct  st_ble_cps_cycling_power_measurement_t
 Cycling Power Measurement characteristic parameters. More...
 
struct  st_ble_cps_cycling_power_vector_t_flags_t
 Cycling Power Vector characteristic flag parameters. More...
 
struct  st_ble_cps_cycling_power_vector_t
 Cycling Power Vector characteristic parameters. More...
 
union  un_ble_cps_cp_control_point_request_parameter_t
 Cycling Power Control Point Request . More...
 
struct  st_ble_cps_cp_control_point_request_t
 Cycling Power Control Point Request parameters. More...
 
struct  st_ble_cps_start_enhanced_offset_compensation_respnse_t
 Cycling Power Control Point Response parameters. More...
 
union  un_ble_cps_cp_control_point_response_parameter_t
 
struct  st_ble_cps_cp_control_point_response_t
 Cycling Power Control Point Response . More...
 

Macros

#define NUM_OF_SUPPORTED_SENSOR_LOCATIONS   (17)
 Number of sensor locations. More...
 
#define BLE_CPS_INAPPOPROPRIATE_CONNECTION_PARAMETERS   (BLE_ERR_GROUP_GATT | 0x80)
 Inappopropriate Connection Parameters error code. More...
 
#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_PEDAL_POWER_BALANCE_SUPPORTED   (1 << 0)
 Pedal Power Balance Supported bit. More...
 
#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_ACCUMULATED_TORQUE_SUPPORTED   (1 << 1)
 Accumulated Torque Supported bit. More...
 
#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_WHEEL_REVOLUTION_DATA_SUPPORTED   (1 << 2)
 Wheel Revolution Data Supported bit. More...
 
#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_CRANK_REVOLUTION_DATA_SUPPORTED   (1 << 3)
 Crank Revolution Data Supported bit. More...
 
#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_EXTREME_MAGNITUDES_SUPPORTED   (1 << 4)
 Extreme Magnitudes Supported bit. More...
 
#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_EXTREME_ANGLES_SUPPORTED   (1 << 5)
 Extreme Angles Supported bit. More...
 
#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_TOP_AND_BOTTOM_DEAD_SPOT_ANGLES_SUPPORTED   (1 << 6)
 Top and Bottom Dead Spot Angles Supported bit. More...
 
#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_ACCUMULATED_ENERGY_SUPPORTED   (1 << 7)
 Accumulated Energy Supported bit. More...
 
#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_OFFSET_COMPENSATION_INDICATOR_SUPPORTED   (1 << 8)
 Offset Compensation Indicator Supported bit. More...
 
#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_OFFSET_COMPENSATION_SUPPORTED   (1 << 9)
 Offset Compensation Supported bit. More...
 
#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT_MASKING_SUPPORTED   (1 << 10)
 Cycling Power Measurement Characteristic Content Masking Supported bit. More...
 
#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_MULTIPLE_SENSOR_LOCATIONS_SUPPORTED   (1 << 11)
 Multiple Sensor Locations Supported bit. More...
 
#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_CRANK_LENGTH_ADJUSTMENT_SUPPORTED_   (1 << 12)
 Crank Length Adjustment Supported bit. More...
 
#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_CHAIN_LENGTH_ADJUSTMENT_SUPPORTED   (1 << 13)
 Chain Length Adjustment Supported bit. More...
 
#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_CHAIN_WEIGHT_ADJUSTMENT_SUPPORTED   (1 << 14)
 Chain Weight Adjustment Supported bit. More...
 
#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_SPAN_LENGTH_ADJUSTMENT_SUPPORTED   (1 << 15)
 Span Length Adjustment Supported bit. More...
 
#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_SENSOR_MEASUREMENT_CONTEXT   (1 << 16)
 Sensor Measurement Context bit. More...
 
#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_INSTANTANEOUS_MEASUREMENT_DIRECTION_SUPPORTED   (1 << 17)
 Instantaneous Measurement Direction Supported bit. More...
 
#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_FACTORY_CALIBRATION_DATE_SUPPORTED   (1 << 18)
 Factory Calibration Date Supported bit. More...
 
#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_ENHANCED_OFFSET_COMPENSATION_SUPPORTED   (1 << 19)
 Enhanced Offset Compensation Supported bit. More...
 
#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_DISTRIBUTE_SYSTEM_SUPPORT   (((1 << 2) - 1) << 20)
 Distribute System Support bits. More...
 

Typedefs

typedef void(* ble_cps_app_cb_t) (uint16_t type, ble_status_t result, st_ble_cps_evt_data_t *p_data)
 Cycling Power Service event callback. More...
 

Enumerations

enum  e_ble_cps_event_t {
  BLE_CPS_EVENT_CYCLING_POWER_CONTROL_POINT_CLI_CNFG_ENABLED,
  BLE_CPS_EVENT_CYCLING_POWER_CONTROL_POINT_CLI_CNFG_DISABLED,
  BLE_CPS_EVENT_CYCLING_POWER_CONTROL_POINT_HDL_VAL_CNF,
  BLE_CPS_EVENT_CYCLING_POWER_MEASUREMENT_CLI_CNFG_ENABLED,
  BLE_CPS_EVENT_CYCLING_POWER_MEASUREMENT_CLI_CNFG_DISABLED,
  BLE_CPS_EVENT_CYCLING_POWER_VECTOR_CLI_CNFG_ENABLED,
  BLE_CPS_EVENT_CYCLING_POWER_VECTOR_CLI_CNFG_DISABLED,
  BLE_CPS_EVENT_CYCLING_POWER_CONTROL_POINT_WRITE_REQ,
  BLE_CPS_EVENT_CYCLING_POWER_FEATURE_READ_REQ,
  BLE_CPS_EVENT_SENSOR_LOCATION_READ_REQ
}
 Cycling Power Service event type. More...
 
enum  e_ble_cps_sensor_location_t {
  BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_OTHER = 0,
  BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_TOP_OF_SHOE = 1,
  BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_IN_SHOE = 2,
  BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_HIP = 3,
  BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION__FRONT_WHEEL = 4,
  BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_LEFT_CRANK = 5,
  BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_RIGHT_CRANK = 6,
  BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_LEFT_PEDAL = 7,
  BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_RIGHT_PEDAL = 8,
  BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION__FRONT_HUB = 9,
  BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_REAR_DROPOUT = 10,
  BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_CHAINSTAY = 11,
  BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_REAR_WHEEL = 12,
  BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_REAR_HUB = 13,
  BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_CHEST = 14,
  BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_SPIDER = 15,
  BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_CHAIN_RING = 16
}
 Sensor Location enumeration. More...
 
enum  e_ble_cps_cycling_power_control_point_opcodes_t {
  BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_SET_CUMULATIVE_VALUE = 1,
  BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_UPDATE_SENSOR_LOCATION = 2,
  BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_REQUEST_SUPPORTED_SENSOR_LOCATIONS = 3,
  BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_SET_CRANK_LENGTH = 4,
  BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_REQUEST_CRANK_LENGTH = 5,
  BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_SET_CHAIN_LENGTH = 6,
  BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_REQUEST_CHAIN_LENGTH = 7,
  BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_SET_CHAIN_WEIGHT = 8,
  BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_REQUEST_CHAIN_WEIGHT = 9,
  BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_SET_SPAN_LENGTH = 10,
  BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_REQUEST_SPAN_LENGTH = 11,
  BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_START_OFFSET_COMPENSATION = 12,
  BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_MASK_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT = 13,
  BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_REQUEST_SAMPLING_RATE = 14,
  BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_REQUEST_FACTORY_CALIBRATION_DATE = 15,
  BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_START_ENHANCED_OFFSET_COMPENSATION = 16
}
 Op Codes enumeration. More...
 
enum  e_ble_cps_cycling_power_control_point_t {
  BLE_CPS_CYCLING_POWER_CONTROL_POINT_RESPONSE_VALUE_SUCCESS = 1,
  BLE_CPS_CYCLING_POWER_CONTROL_POINT_RESPONSE_VALUE_OP_CODE_NOT_SUPPORTED = 2,
  BLE_CPS_CYCLING_POWER_CONTROL_POINT_RESPONSE_VALUE_INVALID_PARAMETER = 3,
  BLE_CPS_CYCLING_POWER_CONTROL_POINT_RESPONSE_VALUE_OPERATION_FAILED = 4
}
 Response Value enumeration. More...
 

Functions

ble_status_t R_BLE_CPS_Init (const st_ble_cps_init_param_t *p_param)
 Initialize Cycling Power Service. More...
 
ble_status_t R_BLE_CPS_Connect (uint16_t conn_hdl, const st_ble_cps_connect_param_t *p_param)
 Perform Cycling Power Service connection settings. More...
 
ble_status_t R_BLE_CPS_Disconnect (uint16_t conn_hdl, st_ble_cps_disconnect_param_t *p_param)
 Retrieve Cycling Power Service connection specific settings before disconnection. More...
 
ble_status_t R_BLE_CPS_NotifyCyclingPowerMeasurement (uint16_t conn_hdl, const st_ble_cps_cycling_power_measurement_t *p_app_value)
 Send Cycling Power Measurement notification. More...
 
ble_status_t R_BLE_CPS_GetCyclingPowerFeature (uint32_t *p_app_value)
 Get Cycling Power Feature characteristic value from local GATT database. More...
 
ble_status_t R_BLE_CPS_SetCyclingPowerFeature (uint32_t app_value)
 Set Cycling Power Feature characteristic value to local GATT database. More...
 
ble_status_t R_BLE_CPS_GetSensorLocation (uint8_t *p_app_value)
 Get Sensor Location characteristic value from local GATT database. More...
 
ble_status_t R_BLE_CPS_SetSensorLocation (uint8_t app_value)
 Set Sensor Location characteristic value to local GATT database. More...
 
ble_status_t R_BLE_CPS_NotifyCyclingPowerVector (uint16_t conn_hdl, const st_ble_cps_cycling_power_vector_t *p_app_value)
 Send Cycling Power Vector notification. More...
 
ble_status_t R_BLE_CPS_IndicateCyclingPowerControlPoint (uint16_t conn_hdl, const st_ble_cps_cp_control_point_response_t *p_app_value)
 Send Cycling Power Control Point indication. More...
 
uint32_t R_BLE_CPS_GetVersion (void)
 Return version of the CPC service server. More...
 

Macro Definition Documentation

◆ NUM_OF_SUPPORTED_SENSOR_LOCATIONS

#define NUM_OF_SUPPORTED_SENSOR_LOCATIONS   (17)

Number of sensor locations.

◆ BLE_CPS_INAPPOPROPRIATE_CONNECTION_PARAMETERS

#define BLE_CPS_INAPPOPROPRIATE_CONNECTION_PARAMETERS   (BLE_ERR_GROUP_GATT | 0x80)

Inappopropriate Connection Parameters error code.

◆ BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_PEDAL_POWER_BALANCE_SUPPORTED

#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_PEDAL_POWER_BALANCE_SUPPORTED   (1 << 0)

Pedal Power Balance Supported bit.

◆ BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_ACCUMULATED_TORQUE_SUPPORTED

#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_ACCUMULATED_TORQUE_SUPPORTED   (1 << 1)

Accumulated Torque Supported bit.

◆ BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_WHEEL_REVOLUTION_DATA_SUPPORTED

#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_WHEEL_REVOLUTION_DATA_SUPPORTED   (1 << 2)

Wheel Revolution Data Supported bit.

◆ BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_CRANK_REVOLUTION_DATA_SUPPORTED

#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_CRANK_REVOLUTION_DATA_SUPPORTED   (1 << 3)

Crank Revolution Data Supported bit.

◆ BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_EXTREME_MAGNITUDES_SUPPORTED

#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_EXTREME_MAGNITUDES_SUPPORTED   (1 << 4)

Extreme Magnitudes Supported bit.

◆ BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_EXTREME_ANGLES_SUPPORTED

#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_EXTREME_ANGLES_SUPPORTED   (1 << 5)

Extreme Angles Supported bit.

◆ BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_TOP_AND_BOTTOM_DEAD_SPOT_ANGLES_SUPPORTED

#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_TOP_AND_BOTTOM_DEAD_SPOT_ANGLES_SUPPORTED   (1 << 6)

Top and Bottom Dead Spot Angles Supported bit.

◆ BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_ACCUMULATED_ENERGY_SUPPORTED

#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_ACCUMULATED_ENERGY_SUPPORTED   (1 << 7)

Accumulated Energy Supported bit.

◆ BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_OFFSET_COMPENSATION_INDICATOR_SUPPORTED

#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_OFFSET_COMPENSATION_INDICATOR_SUPPORTED   (1 << 8)

Offset Compensation Indicator Supported bit.

◆ BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_OFFSET_COMPENSATION_SUPPORTED

#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_OFFSET_COMPENSATION_SUPPORTED   (1 << 9)

Offset Compensation Supported bit.

◆ BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT_MASKING_SUPPORTED

#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT_MASKING_SUPPORTED   (1 << 10)

Cycling Power Measurement Characteristic Content Masking Supported bit.

◆ BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_MULTIPLE_SENSOR_LOCATIONS_SUPPORTED

#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_MULTIPLE_SENSOR_LOCATIONS_SUPPORTED   (1 << 11)

Multiple Sensor Locations Supported bit.

◆ BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_CRANK_LENGTH_ADJUSTMENT_SUPPORTED_

#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_CRANK_LENGTH_ADJUSTMENT_SUPPORTED_   (1 << 12)

Crank Length Adjustment Supported bit.

◆ BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_CHAIN_LENGTH_ADJUSTMENT_SUPPORTED

#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_CHAIN_LENGTH_ADJUSTMENT_SUPPORTED   (1 << 13)

Chain Length Adjustment Supported bit.

◆ BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_CHAIN_WEIGHT_ADJUSTMENT_SUPPORTED

#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_CHAIN_WEIGHT_ADJUSTMENT_SUPPORTED   (1 << 14)

Chain Weight Adjustment Supported bit.

◆ BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_SPAN_LENGTH_ADJUSTMENT_SUPPORTED

#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_SPAN_LENGTH_ADJUSTMENT_SUPPORTED   (1 << 15)

Span Length Adjustment Supported bit.

◆ BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_SENSOR_MEASUREMENT_CONTEXT

#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_SENSOR_MEASUREMENT_CONTEXT   (1 << 16)

Sensor Measurement Context bit.

◆ BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_INSTANTANEOUS_MEASUREMENT_DIRECTION_SUPPORTED

#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_INSTANTANEOUS_MEASUREMENT_DIRECTION_SUPPORTED   (1 << 17)

Instantaneous Measurement Direction Supported bit.

◆ BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_FACTORY_CALIBRATION_DATE_SUPPORTED

#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_FACTORY_CALIBRATION_DATE_SUPPORTED   (1 << 18)

Factory Calibration Date Supported bit.

◆ BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_ENHANCED_OFFSET_COMPENSATION_SUPPORTED

#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_ENHANCED_OFFSET_COMPENSATION_SUPPORTED   (1 << 19)

Enhanced Offset Compensation Supported bit.

◆ BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_DISTRIBUTE_SYSTEM_SUPPORT

#define BLE_CPS_CYCLING_POWER_FEATURE_CYCLING_POWER_FEATURE_DISTRIBUTE_SYSTEM_SUPPORT   (((1 << 2) - 1) << 20)

Distribute System Support bits.

Typedef Documentation

◆ ble_cps_app_cb_t

typedef void(* ble_cps_app_cb_t) (uint16_t type, ble_status_t result, st_ble_cps_evt_data_t *p_data)

Cycling Power Service event callback.

Enumeration Type Documentation

◆ e_ble_cps_event_t

Cycling Power Service event type.

Enumerator
BLE_CPS_EVENT_CYCLING_POWER_CONTROL_POINT_CLI_CNFG_ENABLED 

Cycling Power Control Point characteristic cli cnfg enabled event

BLE_CPS_EVENT_CYCLING_POWER_CONTROL_POINT_CLI_CNFG_DISABLED 

Cycling Power Control Point characteristic cli cnfg disabled event

BLE_CPS_EVENT_CYCLING_POWER_CONTROL_POINT_HDL_VAL_CNF 

Cycling Power Control Point characteristic handle value confiration event

BLE_CPS_EVENT_CYCLING_POWER_MEASUREMENT_CLI_CNFG_ENABLED 

Cycling Power Measurement characteristic cli cnfg enabled event

BLE_CPS_EVENT_CYCLING_POWER_MEASUREMENT_CLI_CNFG_DISABLED 

Cycling Power Measurement characteristic cli cnfg disabled event

BLE_CPS_EVENT_CYCLING_POWER_VECTOR_CLI_CNFG_ENABLED 

Cycling Power Vector characteristic cli cnfg enabled event

BLE_CPS_EVENT_CYCLING_POWER_VECTOR_CLI_CNFG_DISABLED 

Cycling Power Vector characteristic cli cnfg disabled event

BLE_CPS_EVENT_CYCLING_POWER_CONTROL_POINT_WRITE_REQ 

Cycling Power Control Point characteristic write request event

BLE_CPS_EVENT_CYCLING_POWER_FEATURE_READ_REQ 

Cycling Power Feature characteristic read request event

BLE_CPS_EVENT_SENSOR_LOCATION_READ_REQ 

Sensor Location characteristic read request event

◆ e_ble_cps_sensor_location_t

Sensor Location enumeration.

Enumerator
BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_OTHER 

TODO

BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_TOP_OF_SHOE 

TODO

BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_IN_SHOE 

TODO

BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_HIP 

TODO

BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION__FRONT_WHEEL 

TODO

BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_LEFT_CRANK 

TODO

BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_RIGHT_CRANK 

TODO

BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_LEFT_PEDAL 

TODO

BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_RIGHT_PEDAL 

TODO

BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION__FRONT_HUB 

TODO

BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_REAR_DROPOUT 

TODO

BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_CHAINSTAY 

TODO

BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_REAR_WHEEL 

TODO

BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_REAR_HUB 

TODO

BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_CHEST 

TODO

BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_SPIDER 

TODO

BLE_CPS_SENSOR_LOCATION_SENSOR_LOCATION_CHAIN_RING 

TODO

◆ e_ble_cps_cycling_power_control_point_opcodes_t

Op Codes enumeration.

Enumerator
BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_SET_CUMULATIVE_VALUE 

TODO

BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_UPDATE_SENSOR_LOCATION 

TODO

BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_REQUEST_SUPPORTED_SENSOR_LOCATIONS 

TODO

BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_SET_CRANK_LENGTH 

TODO

BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_REQUEST_CRANK_LENGTH 

TODO

BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_SET_CHAIN_LENGTH 

TODO

BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_REQUEST_CHAIN_LENGTH 

TODO

BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_SET_CHAIN_WEIGHT 

TODO

BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_REQUEST_CHAIN_WEIGHT 

TODO

BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_SET_SPAN_LENGTH 

TODO

BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_REQUEST_SPAN_LENGTH 

TODO

BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_START_OFFSET_COMPENSATION 

TODO

BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_MASK_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT 

TODO

BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_REQUEST_SAMPLING_RATE 

TODO

BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_REQUEST_FACTORY_CALIBRATION_DATE 

TODO

BLE_CPS_CYCLING_POWER_CONTROL_POINT_OP_CODES_START_ENHANCED_OFFSET_COMPENSATION 

TODO

◆ e_ble_cps_cycling_power_control_point_t

Response Value enumeration.

Enumerator
BLE_CPS_CYCLING_POWER_CONTROL_POINT_RESPONSE_VALUE_SUCCESS 

TODO

BLE_CPS_CYCLING_POWER_CONTROL_POINT_RESPONSE_VALUE_OP_CODE_NOT_SUPPORTED 

TODO

BLE_CPS_CYCLING_POWER_CONTROL_POINT_RESPONSE_VALUE_INVALID_PARAMETER 

TODO

BLE_CPS_CYCLING_POWER_CONTROL_POINT_RESPONSE_VALUE_OPERATION_FAILED 

TODO

Function Documentation

◆ R_BLE_CPS_Init()

ble_status_t R_BLE_CPS_Init ( const st_ble_cps_init_param_t p_param)

Initialize Cycling Power Service.

This function shall be called once at startup.

Parameters
[in]paramCycling Power Service initialization parameters.
Returns

◆ R_BLE_CPS_Connect()

ble_status_t R_BLE_CPS_Connect ( uint16_t  conn_hdl,
const st_ble_cps_connect_param_t p_param 
)

Perform Cycling Power Service connection settings.

This function shall be called on each connection establishment.

Parameters
[in]conn_hdlConnection handle.
[in]paramConnection parameters.
Returns
ble_status_t

◆ R_BLE_CPS_Disconnect()

ble_status_t R_BLE_CPS_Disconnect ( uint16_t  conn_hdl,
st_ble_cps_disconnect_param_t p_param 
)

Retrieve Cycling Power Service connection specific settings before disconnection.

This function shall be called on each disconnection.

Parameters
[in]conn_hdlConnection handle.
[in]paramDisconnection parameters.
Returns
ble_status_t

◆ R_BLE_CPS_NotifyCyclingPowerMeasurement()

ble_status_t R_BLE_CPS_NotifyCyclingPowerMeasurement ( uint16_t  conn_hdl,
const st_ble_cps_cycling_power_measurement_t p_app_value 
)

Send Cycling Power Measurement notification.

Parameters
[in]conn_hdlConnection handle.
[in]app_valueCycling Power Measurement value to send.
Returns
ble_status_t

◆ R_BLE_CPS_GetCyclingPowerFeature()

ble_status_t R_BLE_CPS_GetCyclingPowerFeature ( uint32_t *  p_app_value)

Get Cycling Power Feature characteristic value from local GATT database.

Parameters
[out]app_valueRetrieved Cycling Power Feature characteristic value.
Returns
ble_status_t

◆ R_BLE_CPS_SetCyclingPowerFeature()

ble_status_t R_BLE_CPS_SetCyclingPowerFeature ( uint32_t  app_value)

Set Cycling Power Feature characteristic value to local GATT database.

Parameters
[in]app_valueCycling Power Feature characteristic value to set.
Returns
ble_status_t

◆ R_BLE_CPS_GetSensorLocation()

ble_status_t R_BLE_CPS_GetSensorLocation ( uint8_t *  p_app_value)

Get Sensor Location characteristic value from local GATT database.

Parameters
[out]app_valueRetrieved Sensor Location characteristic value.
Returns
ble_status_t

◆ R_BLE_CPS_SetSensorLocation()

ble_status_t R_BLE_CPS_SetSensorLocation ( uint8_t  app_value)

Set Sensor Location characteristic value to local GATT database.

Parameters
[in]app_valueSensor Location characteristic value to set.
Returns
ble_status_t

◆ R_BLE_CPS_NotifyCyclingPowerVector()

ble_status_t R_BLE_CPS_NotifyCyclingPowerVector ( uint16_t  conn_hdl,
const st_ble_cps_cycling_power_vector_t p_app_value 
)

Send Cycling Power Vector notification.

Parameters
[in]conn_hdlConnection handle.
[in]app_valueCycling Power Vector value to send.
Returns
ble_status_t

◆ R_BLE_CPS_IndicateCyclingPowerControlPoint()

ble_status_t R_BLE_CPS_IndicateCyclingPowerControlPoint ( uint16_t  conn_hdl,
const st_ble_cps_cp_control_point_response_t p_app_value 
)

Send Cycling Power Control Point indication.

Parameters
[in]conn_hdlConnection handle.
[in]app_valueCycling Power Control Point value to send.
Returns
ble_status_t

◆ R_BLE_CPS_GetVersion()

uint32_t R_BLE_CPS_GetVersion ( void  )

Return version of the CPC service server.

Returns
version