SG RFID nRF51822 fork
Fork of nRF51822 by
Speed and Cadence Control Point
Speed and Cadence Control Point module. More...
Data Structures | |
struct | ble_sc_ctrlpt_evt_t |
Speed and Cadence Control point event. More... | |
struct | ble_cs_ctrlpt_init_t |
Speed and Cadence Control Point init structure. More... | |
struct | ble_sc_ctrlpt_resp_t |
Speed and Cadence Control Point response indication structure. More... | |
struct | ble_sc_ctrlpt_s |
Speed and Cadence Control Point structure. More... | |
Typedefs | |
typedef struct ble_sc_ctrlpt_s | ble_sc_ctrlpt_t |
Speed and Cadence Control Point structure. | |
typedef ble_scpt_response_t(* | ble_sc_ctrlpt_evt_handler_t )(ble_sc_ctrlpt_t *p_sc_ctrlpt, ble_sc_ctrlpt_evt_t *p_evt) |
Speed and Cadence Control point event handler type. | |
Enumerations | |
enum | ble_sc_ctrlpt_evt_type_t { BLE_SC_CTRLPT_EVT_UPDATE_LOCATION, BLE_SC_CTRLPT_EVT_SET_CUMUL_VALUE, BLE_SC_CTRLPT_EVT_START_CALIBRATION } |
Speed and Cadence Control Point event type. More... | |
enum | ble_scpt_operator_t { BLE_SCPT_SET_CUMULATIVE_VALUE = 0x01, BLE_SCPT_START_AUTOMATIC_CALIBRATION = 0x02, BLE_SCPT_UPDATE_SENSOR_LOCATION = 0x03, BLE_SCPT_REQUEST_SUPPORTED_SENSOR_LOCATIONS = 0x04, BLE_SCPT_RESPONSE_CODE = 0x10 } |
Speed and Cadence Control Point operator code (see RSC service specification) More... | |
enum | ble_scpt_response_t { BLE_SCPT_SUCCESS = 0x01, BLE_SCPT_OP_CODE_NOT_SUPPORTED = 0x02, BLE_SCPT_INVALID_PARAMETER = 0x03, BLE_SCPT_OPERATION_FAILED = 0x04 } |
Speed and Cadence Control Point response parameter (see RSC service specification) More... | |
enum | ble_scpt_procedure_status_t { BLE_SCPT_NO_PROC_IN_PROGRESS = 0x00, BLE_SCPT_AUTOMATIC_CALIB_IN_PROGRESS = 0x01, BLE_SCPT_INDICATION_PENDING = 0x02, BLE_SCPT_IND_CONFIRM_PENDING = 0x03 } |
Speed and Cadence Control Point procedure status (indicates is a procedure is in progress or not and which procedure is in progress. More... | |
Functions | |
uint32_t | ble_sc_ctrlpt_init (ble_sc_ctrlpt_t *p_sc_ctrlpt, const ble_cs_ctrlpt_init_t *p_sc_ctrlpt_init) |
Function for Initializing the Speed and Cadence Control Point. | |
uint32_t | ble_sc_ctrlpt_rsp_send (ble_sc_ctrlpt_t *p_sc_ctrlpt, ble_scpt_response_t response_status) |
Function for sending a control point response. | |
void | ble_sc_ctrlpt_on_ble_evt (ble_sc_ctrlpt_t *p_sc_ctrlpt, ble_evt_t *p_ble_evt) |
Speed and Cadence Control Point BLE stack event handler. |
Detailed Description
Speed and Cadence Control Point module.
This module implements the Speed and Cadence control point behavior. It is used by the Cycling Speed and Cadence Service module and the ble_sdk_srv_rsc module for control point mechanisms like setting a cumulative value, Start an automatic calibration, Update the sensor location or request the supported locations.
- Note:
- Attention! To maintain compliance with Nordic Semiconductor ASA Bluetooth profile qualification listings, this section of source code must not be modified.
Typedef Documentation
typedef ble_scpt_response_t(* ble_sc_ctrlpt_evt_handler_t)(ble_sc_ctrlpt_t *p_sc_ctrlpt, ble_sc_ctrlpt_evt_t *p_evt) |
Speed and Cadence Control point event handler type.
Definition at line 95 of file ble_sc_ctrlpt.h.
typedef struct ble_sc_ctrlpt_s ble_sc_ctrlpt_t |
Speed and Cadence Control Point structure.
This contains various status information for the Speed and Cadence Control Point behavior.
Definition at line 43 of file ble_sc_ctrlpt.h.
Enumeration Type Documentation
Speed and Cadence Control Point event type.
- Enumerator:
Definition at line 47 of file ble_sc_ctrlpt.h.
enum ble_scpt_operator_t |
Speed and Cadence Control Point operator code (see RSC service specification)
- Enumerator:
Definition at line 68 of file ble_sc_ctrlpt.h.
Speed and Cadence Control Point procedure status (indicates is a procedure is in progress or not and which procedure is in progress.
- Enumerator:
Definition at line 87 of file ble_sc_ctrlpt.h.
enum ble_scpt_response_t |
Speed and Cadence Control Point response parameter (see RSC service specification)
- Enumerator:
Definition at line 78 of file ble_sc_ctrlpt.h.
Function Documentation
uint32_t ble_sc_ctrlpt_init | ( | ble_sc_ctrlpt_t * | p_sc_ctrlpt, |
const ble_cs_ctrlpt_init_t * | p_sc_ctrlpt_init | ||
) |
Function for Initializing the Speed and Cadence Control Point.
Function for Initializing the Speed and Cadence Control Point.
- Parameters:
-
[in] p_sc_ctrlpt Speed and Cadence Control Point structure. [in] p_cscs_init Information needed to initialize the control point behavior.
- Returns:
- NRF_SUCCESS on successful initialization of service, otherwise an error code.
void ble_sc_ctrlpt_on_ble_evt | ( | ble_sc_ctrlpt_t * | p_sc_ctrlpt, |
ble_evt_t * | p_ble_evt | ||
) |
Speed and Cadence Control Point BLE stack event handler.
Handles all events from the BLE stack of interest to the Speed and Cadence Control Point.
- Parameters:
-
[in] p_sc_ctrlpt Speed and Cadence Control Point structure. [in] p_ble_evt Event received from the BLE stack.
uint32_t ble_sc_ctrlpt_rsp_send | ( | ble_sc_ctrlpt_t * | p_sc_ctrlpt, |
ble_scpt_response_t | response_status | ||
) |
Function for sending a control point response.
Function for sending a control point response when the control point received was BLE_SCPT_START_AUTOMATIC_CALIBRATION. To be called after the calibration procedure is finished.
- Parameters:
-
[in] p_sc_ctrlpt Speed and Cadence Control Point structure. [in] response_status status to include in the control point response.
Generated on Tue Jul 12 2022 15:07:45 by 1.7.2