SmartSnippets DA1459x SDK
Data Structures | Typedefs | Enumerations | Functions

Cycling Speed and Cadence Service Client API. More...

#include <string.h>
#include "ble_gattc.h"
#include "ble_client.h"

Go to the source code of this file.

Data Structures

struct  cscs_client_measurement_t
 
struct  cscs_client_callbacks_t
 

Typedefs

typedef void(* cscs_client_read_csc_features_completed_cb_t) (ble_client_t *client, att_error_t status, uint16_t features)
 Read feature completed callback. More...
 
typedef void(* cscs_client_get_event_state_completed_cb_t) (ble_client_t *client, cscs_client_event_t event, att_error_t status, bool enabled)
 Get event state completed callback. More...
 
typedef void(* cscs_client_set_event_state_completed_cb_t) (ble_client_t *client, cscs_client_event_t event, att_error_t status)
 Set event state completed callback. More...
 
typedef void(* cscs_client_get_sc_control_point_state_completed_cb_t) (ble_client_t *client, att_error_t status, bool enabled)
 Get control point state completed callback. More...
 
typedef void(* cscs_client_set_sc_control_point_state_completed_cb_t) (ble_client_t *client, att_error_t status)
 Set control point state completed callback. More...
 
typedef void(* cscs_client_update_sensor_location_completed_cb_t) (ble_client_t *client, cscs_client_status_t status)
 Update sensor location callback. More...
 
typedef void(* cscs_client_read_sensor_location_completed_cb_t) (ble_client_t *client, att_error_t status, cscs_client_sensor_location_t location)
 Read sensor location callback. More...
 
typedef void(* cscs_client_set_cumulative_value_completed_cb_t) (ble_client_t *client, cscs_client_status_t status)
 Set cumulative value callback. More...
 
typedef void(* cscs_client_request_supported_sensor_locations_completed_cb_t) (ble_client_t *client, cscs_client_status_t status, uint8_t locations_count, const uint8_t *locations)
 Request supported sensor locations callback. More...
 
typedef void(* cscs_client_csc_measurement_cb_t) (ble_client_t *client, const cscs_client_measurement_t *measurement)
 CSC measurement callback. More...
 

Enumerations

enum  cscs_client_feature_t { CSCS_CLIENT_FEATURE_WHEEL_REVOLUTION_DATA = 0x01, CSCS_CLIENT_FEATURE_CRANK_REVOLUTION_DATA = 0x02, CSCS_CLIENT_FEATURE_MULTIPLE_SENSOR_LOCATIONS = 0x04 }
 
enum  cscs_client_status_t {
  CSCS_CLIENT_STATUS_SUCCESS = 0x01, CSCS_CLIENT_STATUS_OPCODE_NOT_SUPPORTED = 0x02, CSCS_CLIENT_STATUS_INVALID_PARAM = 0x03, CSCS_CLIENT_STATUS_OPERATION_FAILED = 0x04,
  CSCS_CLIENT_STATUS_OPERATION_IN_PROGRESS = 0x80, CSCS_CLIENT_STATUS_IMPROPERLY_CONFIGURED = 0x81, CSCS_CLIENT_STATUS_TIMEOUT = 0x100
}
 
enum  cscs_client_sensor_location_t {
  CSCS_CLIENT_SENSOR_LOCATION_OTHER = 0x00, CSCS_CLIENT_SENSOR_LOCATION_TOP_OF_SHOE = 0x01, CSCS_CLIENT_SENSOR_LOCATION_IN_SHOE = 0x02, CSCS_CLIENT_SENSOR_LOCATION_HIP = 0x03,
  CSCS_CLIENT_SENSOR_LOCATION_FRONT_WHEEL = 0x04, CSCS_CLIENT_SENSOR_LOCATION_LEFT_CRANK = 0x05, CSCS_CLIENT_SENSOR_LOCATION_RIGHT_CRANK = 0x06, CSCS_CLIENT_SENSOR_LOCATION_LEFT_PEDAL = 0x07,
  CSCS_CLIENT_SENSOR_LOCATION_RIGHT_PEDAL = 0x08, CSCS_CLIENT_SENSOR_LOCATION_FRONT_HUB = 0x09, CSCS_CLIENT_SENSOR_LOCATION_REAR_DROPOUT = 0x0a, CSCS_CLIENT_SENSOR_LOCATION_CHAINSTAY = 0x0b,
  CSCS_CLIENT_SENSOR_LOCATION_REAR_WHEEL = 0x0c, CSCS_CLIENT_SENSOR_LOCATION_REAR_HUB = 0x0d, CSCS_CLIENT_SENSOR_LOCATION_CHEST = 0x0e
}
 
enum  cscs_client_event_t { CSCS_CLIENT_EVENT_CSC_MEASUREMENT_NOTIF = 0x01 }
 
enum  cscs_client_cap_t { CSCS_CLIENT_CAP_SENSOR_LOCATION = 0x01 }
 

Functions

ble_client_tcscs_client_init (const cscs_client_callbacks_t *cb, const ble_evt_gattc_browse_svc_t *evt)
 Register CSC Client instance. More...
 
bool cscs_client_read_csc_features (ble_client_t *client)
 Read CSC features. More...
 
cscs_client_cap_t cscs_client_get_capabilities (ble_client_t *client)
 Get capabilities. More...
 
bool cscs_client_get_event_state (ble_client_t *client, cscs_client_event_t event)
 Get event state. More...
 
bool cscs_client_set_event_state (ble_client_t *client, cscs_client_event_t event, bool enable)
 Set event state. More...
 
bool cscs_client_get_sc_control_point_ind_state (ble_client_t *client)
 Get control point state. More...
 
bool cscs_client_set_sc_control_point_ind_state (ble_client_t *client, bool enable)
 Set control point state. More...
 
bool cscs_client_read_sensor_location (ble_client_t *client)
 Read sensor location. More...
 
bool cscs_client_update_sensor_location (ble_client_t *client, cscs_client_sensor_location_t location)
 Update sensor location. More...
 
bool cscs_client_request_supported_sensor_locations (ble_client_t *client)
 Request supported sensor locations. More...
 
bool cscs_client_set_cumulative_value (ble_client_t *client, uint32_t value)
 Set cumulative value. More...
 
void cscs_client_sc_control_point_timeout (ble_client_t *client)
 Control point operation timeout. More...
 
ble_client_tcscs_client_init_from_data (uint16_t conn_idx, const cscs_client_callbacks_t *cb, const void *data, size_t length)
 Initialize CSCP Client instance from buffered (cached) data and register application callbacks. More...
 

Detailed Description

Cycling Speed and Cadence Service Client API.

Copyright (C) 2015-2018 Renesas Electronics Corporation and/or its affiliates. All rights reserved. Confidential Information.

This software ("Software") is supplied by Renesas Electronics Corporation and/or its affiliates ("Renesas"). Renesas grants you a personal, non-exclusive, non-transferable, revocable, non-sub-licensable right and license to use the Software, solely if used in or together with Renesas products. You may make copies of this Software, provided this copyright notice and disclaimer ("Notice") is included in all such copies. Renesas reserves the right to change or discontinue the Software at any time without notice.

THE SOFTWARE IS PROVIDED "AS IS". RENESAS DISCLAIMS ALL WARRANTIES OF ANY KIND, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. TO THE MAXIMUM EXTENT PERMITTED UNDER LAW, IN NO EVENT SHALL RENESAS BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE, EVEN IF RENESAS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. USE OF THIS SOFTWARE MAY BE SUBJECT TO TERMS AND CONDITIONS CONTAINED IN AN ADDITIONAL AGREEMENT BETWEEN YOU AND RENESAS. IN CASE OF CONFLICT BETWEEN THE TERMS OF THIS NOTICE AND ANY SUCH ADDITIONAL LICENSE AGREEMENT, THE TERMS OF THE AGREEMENT SHALL TAKE PRECEDENCE. BY CONTINUING TO USE THIS SOFTWARE, YOU AGREE TO THE TERMS OF THIS NOTICE.IF YOU DO NOT AGREE TO THESE TERMS, YOU ARE NOT PERMITTED TO USE THIS SOFTWARE.