Cordio Stack and Cordio Profiles  r2p3-02rel0
rscp_api.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3 * \file
4 *
5 * \brief Running 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 RSCP_API_H
21 #define RSCP_API_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /*! \addtogroup RUNNING_SPEED_AND_CADENCE_PROFILE
28  * \{ */
29 
30 /**************************************************************************************************
31 Macros
32 **************************************************************************************************/
33 
34 /** \name Running Speed and Cadence Measurement Parameter Types
35  *
36  */
37 /**@{*/
38 #define RSCP_SM_PARAM_SPEED 0 /*!< \brief Instantaneous Speed */
39 #define RSCP_SM_PARAM_CADENCE 1 /*!< \brief Instantaneous Cadence */
40 #define RSCP_SM_PARAM_STRIDE_LENGTH 2 /*!< \brief Instantaneous Stride Length */
41 #define RSCP_SM_PARAM_TOTAL_DISTANCE 3 /*!< \brief Total Distance */
42 #define RSCP_SM_PARAM_STATUS 4 /*!< \brief Walking or Running Status (0: walking, 1: running) */
43 /**@}*/
44 
45 /** \name Running Speed and Cadence Running Status Values
46  *
47  */
48 /**@{*/
49 #define RSCP_SM_STATUS_WALKING 0 /*!< \brief Walking */
50 #define RSCP_SM_STATUS_RUNNING 1 /*!< \brief Running */
51 /**@}*/
52 
53 /**************************************************************************************************
54 Function Declarations
55 **************************************************************************************************/
56 
57 /*************************************************************************************************/
58 /*!
59 * \brief Set a running speed measurement parameter.
60 *
61 * \param type Parameter identifier
62 * \param value Measurement value.
63 *
64 * \return none
65 */
66 /*************************************************************************************************/
67 void RscpsSetParameter(uint8_t type, uint32_t value);
68 
69 /*************************************************************************************************/
70 /*!
71 * \brief Set the sensor location attribute.
72 *
73 * \param location Sensor Location.
74 *
75 * \return none
76 */
77 /*************************************************************************************************/
78 void RscpsSetSensorLocation(uint8_t location);
79 
80 /*************************************************************************************************/
81 /*!
82 * \brief Set the features attribute.
83 *
84 * \param features Features bitmask.
85 *
86 * \return none
87 */
88 /*************************************************************************************************/
89 void RscpsSetFeatures(uint16_t features);
90 
91 /*************************************************************************************************/
92 /*!
93 * \brief Notifies the collector of a Running Speed and Cadence Measurement.
94 *
95 * \param connId Connection ID
96 *
97 * \return none
98 */
99 /*************************************************************************************************/
101 
102 /*! \} */ /* RUNNING_SPEED_AND_CADENCE_PROFILE */
103 
104 #ifdef __cplusplus
105 };
106 #endif
107 
108 #endif /* RSCP_API_H */
uint8_t dmConnId_t
Connection identifier.
Definition: dm_api.h:501
void RscpsSetSensorLocation(uint8_t location)
Set the sensor location attribute.
void RscpsSetFeatures(uint16_t features)
Set the features attribute.
unsigned long uint32_t
Unsigned 32-bit value.
Definition: wsf_types.h:71
void RscpsSendSpeedMeasurement(dmConnId_t connId)
Notifies the collector of a Running Speed and Cadence 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
void RscpsSetParameter(uint8_t type, uint32_t value)
Set a running speed measurement parameter.