Running Speed and Cadence Service Client API. More...
#include "ble_prf_types.h"
#include "gr_includes.h"
#include "custom_config.h"
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
Classes | |
struct | rscs_c_meas_val_t |
Running Speed and Cadence Measurement Character value structure. More... | |
struct | rscs_c_handles_t |
Handles on the connected peer device needed to interact with it. More... | |
struct | rscs_c_evt_t |
Running Speed and Cadence Service Client event. More... | |
Macros | |
#define | RSCS_C_CONNECTION_MAX 10 |
#define | RSCS_C_PT_RSP_LEN_MAX (3 + RSCS_C_SENSOR_LOC_SUP_NB) |
#define | RSCS_C_ERROR_PROC_IN_PROGRESS 0x80 |
#define | RSCS_C_ERROR_CCCD_INVALID 0x81 |
#define | RSCS_C_MEAS_FLAG_INST_STRIDE_LEN_BIT (0x01 << 0) |
#define | RSCS_C_MEAS_FLAG_TOTAL_DISTANCE_BIT (0x01 << 1) |
#define | RSCS_C_MEAS_FLAG_RUNNING_OR_WALKING_BIT (0x01 << 2) |
#define | RSCS_C_FEAT_INSTANT_STRIDE_LEN_BIT (0x01 << 0) |
#define | RSCS_C_FEAT_TOTAL_DISTANCE_BIT (0x01 << 1) |
#define | RSCS_C_FEAT_RUNNING_OR_WALKING_STATUS_BIT (0x01 << 2) |
#define | RSCS_C_FEAT_CALIBRATION_PROCEDURE_BIT (0x01 << 3) |
#define | RSCS_C_FEAT_MULTIPLE_SENSORS_BIT (0x01 << 4) |
Typedefs | |
typedef void(* | rscs_c_evt_handler_t) (rscs_c_evt_t *p_evt) |
Running Speed and Cadence Service Client event handler type. More... | |
Functions | |
sdk_err_t | rscs_client_init (rscs_c_evt_handler_t evt_handler) |
Register RSCS Client event handler. More... | |
sdk_err_t | rscs_c_disc_srvc_start (uint8_t conn_idx) |
Discovery Running Speed and Cadence Service on peer. More... | |
sdk_err_t | rscs_c_rsc_meas_notify_set (uint8_t conn_idx, bool is_enable) |
Enable or disable peer RSC Measurement characteristic notify. More... | |
sdk_err_t | rscs_c_rsc_feature_read (uint8_t conn_idx) |
Read RSC Feature characteristic value. More... | |
sdk_err_t | rscs_c_sensor_loc_read (uint8_t conn_idx) |
Read Sensor Location characteristic value. More... | |
sdk_err_t | rscs_c_ctrl_pt_indicate_set (uint8_t conn_idx, bool is_enable) |
Enable or disable peer Control Point characteristic indicate. More... | |
sdk_err_t | rscs_c_ctrl_pt_set (uint8_t conn_idx, uint16_t ctrl_value) |
Set Control Point characteristic value. More... | |
Running Speed and Cadence Service Client API.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file rscs_c.h.