Cordio Stack and Cordio Profiles  r2p3-02rel0
cscp_api.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3 * \file
4 *
5 * \brief Cycling Speed and Cadence Profile API.
6 *
7 * Copyright (c) 2016-2018 Arm Ltd. All Rights Reserved.
8 * ARM Ltd. confidential and proprietary.
9 *
10 * IMPORTANT. Your use of this file is governed by a Software License Agreement
11 * ("Agreement") that must be accepted in order to download or otherwise receive a
12 * copy of this file. You may not use or copy this file for any purpose other than
13 * as described in the Agreement. If you do not agree to all of the terms of the
14 * Agreement do not use this file and delete all copies in your possession or control;
15 * if you do not have a copy of the Agreement, you must contact ARM Ltd. prior
16 * to any use, copying or further distribution of this software.
17 */
18 /*************************************************************************************************/
19 
20 #ifndef CSCP_API_H
21 #define CSCP_API_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /*! \addtogroup CYCLING_SPEED_AND_CADENCE_PROFILE
28  * \{ */
29 
30 /**************************************************************************************************
31 Macros
32 **************************************************************************************************/
33 
34 /** \name Cycling Speed Measurement Parameter Types
35  *
36  */
37 /**@{*/
38 #define CSCP_SM_PARAM_WHEEL_REVOLUTIONS 0 /* Cumulative Wheel Revolutions */
39 #define CSCP_SM_PARAM_LAST_WHEEL_EVT_TIME 1 /* Last Wheel Event Time */
40 #define CSCP_SM_PARAM_CRANK_REVOLUTIONS 2 /* Cumulative Crank Revolutions */
41 #define CSCP_SM_PARAM_LAST_CRANK_TIME 3 /* Last Crank Event Time */
42 /**@}*/
43 
44 /**************************************************************************************************
45 Function Declarations
46 **************************************************************************************************/
47 
48 /*************************************************************************************************/
49 /*!
50 * \brief Set a cycling speed measurement parameter.
51 *
52 * \param type Parameter identifier
53 * \param value Measurement value.
54 *
55 * \return none
56 */
57 /*************************************************************************************************/
58 void CscpsSetParameter(uint8_t type, uint32_t value);
59 
60 /*************************************************************************************************/
61 /*!
62 * \brief Notifies the collector of a Cycle Speed Measurement.
63 *
64 * \param connId Connection ID
65 *
66 * \return none
67 */
68 /*************************************************************************************************/
70 
71 /*************************************************************************************************/
72 /*!
73 * \brief Set the sensor location attribute.
74 *
75 * \param location Sensor Location.
76 *
77 * \return none
78 */
79 /*************************************************************************************************/
80 void CscpsSetSensorLocation(uint8_t location);
81 
82 /*************************************************************************************************/
83 /*!
84 * \brief Set the features attribute.
85 *
86 * \param features Features bitmask.
87 *
88 * \return none
89 */
90 /*************************************************************************************************/
91 void CscpsSetFeatures(uint16_t features);
92 
93 /*! \} */ /* CYCLING_SPEED_AND_CADENCE_PROFILE */
94 
95 #ifdef __cplusplus
96 };
97 #endif
98 
99 #endif /* CSCP_API_H */
uint8_t dmConnId_t
Connection identifier.
Definition: dm_api.h:501
void CscpsSetFeatures(uint16_t features)
Set the features attribute.
void CscpsSetParameter(uint8_t type, uint32_t value)
Set a cycling speed measurement parameter.
unsigned long uint32_t
Unsigned 32-bit value.
Definition: wsf_types.h:71
void CscpsSetSensorLocation(uint8_t location)
Set the sensor location attribute.
void CscpsSendSpeedMeasurement(dmConnId_t connId)
Notifies the collector of a Cycle Speed Measurement.
unsigned short uint16_t
Unsigned 16-bit value.
Definition: wsf_types.h:67
unsigned char uint8_t
Unsigned 8-bit value.
Definition: wsf_types.h:63