Cordio Stack and Cordio Profiles  r2p3-02rel0
blps_api.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file
4  *
5  * \brief Blood Pressure profile sensor.
6  *
7  * Copyright (c) 2012-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 #ifndef BLPS_API_H
20 #define BLPS_API_H
21 
22 #include "wsf_timer.h"
23 #include "att_api.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 /*! \addtogroup BLOOD_PRESSURE_PROFILE
30  * \{ */
31 
32 /**************************************************************************************************
33  Data Types
34 **************************************************************************************************/
35 
36 /*! \brief Configurable parameters */
37 typedef struct
38 {
39  wsfTimerTicks_t period; /*!< \brief Measurement timer expiration period in ms */
40 } blpsCfg_t;
41 
42 /*************************************************************************************************/
43 /*!
44  * \brief Initialize the Blood Pressure profile sensor.
45  *
46  * \param handlerId WSF handler ID of the application using this service.
47  * \param pCfg Configurable parameters.
48  *
49  * \return None.
50  */
51 /*************************************************************************************************/
52 void BlpsInit(wsfHandlerId_t handlerId, blpsCfg_t *pCfg);
53 
54 /*************************************************************************************************/
55 /*!
56  * \brief Start periodic blood pressure measurement. This function starts a timer to perform
57  * periodic measurements.
58  *
59  * \param connId DM connection identifier.
60  * \param timerEvt WSF event designated by the application for the timer.
61  * \param icpCccIdx Index of intermediate cuff pressure CCC descriptor in CCC descriptor
62  * handle table.
63  *
64  * \return None.
65  */
66 /*************************************************************************************************/
67 void BlpsMeasStart(dmConnId_t connId, uint8_t timerEvt, uint8_t icpCccIdx);
68 
69 /*************************************************************************************************/
70 /*!
71  * \brief Stop periodic blood pressure measurement.
72  *
73  * \return None.
74  */
75 /*************************************************************************************************/
76 void BlpsMeasStop(void);
77 
78 /*************************************************************************************************/
79 /*!
80  * \brief Blood pressure measurement complete.
81  *
82  * \param connId DM connection identifier.
83  * \param bpmCccIdx Index of blood pressure measurement CCC descriptor in CCC descriptor
84  * handle table.
85  *
86  * \return None.
87  */
88 /*************************************************************************************************/
89 void BlpsMeasComplete(dmConnId_t connId, uint8_t bpmCccIdx);
90 
91 /*************************************************************************************************/
92 /*!
93  * \brief This function is called by the application when the periodic measurement
94  * timer expires.
95  *
96  * \param pMsg Event message.
97  *
98  * \return None.
99  */
100 /*************************************************************************************************/
101 void BlpsProcMsg(wsfMsgHdr_t *pMsg);
102 
103 /*************************************************************************************************/
104 /*!
105  * \brief Set the blood pressure measurement flags.
106  *
107  * \param flags Blood pressure measurement flags.
108  *
109  * \return None.
110  */
111 /*************************************************************************************************/
112 void BlpsSetBpmFlags(uint8_t flags);
113 
114 /*************************************************************************************************/
115 /*!
116  * \brief Set the intermediate cuff pressure flags.
117  *
118  * \param flags Intermediate cuff pressure flags.
119  *
120  * \return None.
121  */
122 /*************************************************************************************************/
123 void BlpsSetIcpFlags(uint8_t flags);
124 
125 /*! \} */ /* BLOOD_PRESSURE_PROFILE */
126 
127 #ifdef __cplusplus
128 };
129 #endif
130 
131 #endif /* BLPS_API_H */
uint8_t dmConnId_t
Connection identifier.
Definition: dm_api.h:501
void BlpsMeasStop(void)
Stop periodic blood pressure measurement.
wsfTimerTicks_t period
Measurement timer expiration period in ms.
Definition: blps_api.h:39
void BlpsInit(wsfHandlerId_t handlerId, blpsCfg_t *pCfg)
Initialize the Blood Pressure profile sensor.
Configurable parameters.
Definition: blps_api.h:37
uint8_t wsfHandlerId_t
Event handler ID data type.
Definition: wsf_os.h:74
void BlpsSetBpmFlags(uint8_t flags)
Set the blood pressure measurement flags.
void BlpsMeasComplete(dmConnId_t connId, uint8_t bpmCccIdx)
Blood pressure measurement complete.
void BlpsSetIcpFlags(uint8_t flags)
Set the intermediate cuff pressure flags.
Timer service.
uint32_t wsfTimerTicks_t
Timer ticks data type.
Definition: wsf_timer.h:45
Attribute protocol client and server API.
void BlpsProcMsg(wsfMsgHdr_t *pMsg)
This function is called by the application when the periodic measurement timer expires.
Common message structure passed to event handler.
Definition: wsf_os.h:97
unsigned char uint8_t
Unsigned 8-bit value.
Definition: wsf_types.h:63
void BlpsMeasStart(dmConnId_t connId, uint8_t timerEvt, uint8_t icpCccIdx)
Start periodic blood pressure measurement. This function starts a timer to perform periodic measureme...