![]() |
Cordio Stack and Cordio Profiles
r2p3-02rel0
|
Data Structures | |
struct | hrpsCfg_t |
Configurable parameters. More... | |
Enumerations | |
enum | { HRPC_HRS_HRM_HDL_IDX, HRPC_HRS_HRM_CCC_HDL_IDX, HRPC_HRS_BSL_HDL_IDX, HRPC_HRS_HRCP_HDL_IDX, HRPC_HRS_HDL_LIST_LEN } |
Heart Rate service enumeration of handle indexes of characteristics to be discovered. More... | |
Functions | |
void | HrpcHrsDiscover (dmConnId_t connId, uint16_t *pHdlList) |
Perform service and characteristic discovery for Heart Rate service. Parameter pHdlList must point to an array of length HRPC_HRS_HDL_LIST_LEN. If discovery is successful the handles of discovered characteristics and descriptors will be set in pHdlList. More... | |
void | HrpcHrsControl (dmConnId_t connId, uint16_t handle, uint8_t command) |
Send a command to the heart rate control point. More... | |
uint8_t | HrpcHrsValueUpdate (uint16_t *pHdlList, attEvt_t *pMsg) |
Process a value received in an ATT read response, notification, or indication message. Parameter pHdlList must point to an array of length HRPC_HRS_HDL_LIST_LEN. If the ATT handle of the message matches a handle in the handle list the value is processed, otherwise it is ignored. More... | |
void | HrpsInit (wsfHandlerId_t handlerId, hrpsCfg_t *pCfg) |
Initialize the Heart Rate profile sensor. More... | |
void | HrpsMeasStart (dmConnId_t connId, uint8_t timerEvt, uint8_t hrmCccIdx) |
Start periodic heart rate measurement. This function starts a timer to perform periodic measurements. More... | |
void | HrpsMeasStop (dmConnId_t connId) |
Stop periodic heart rate measurement. More... | |
void | HrpsProcMsg (wsfMsgHdr_t *pMsg) |
Process received WSF message. More... | |
uint8_t | HrpsWriteCback (dmConnId_t connId, uint16_t handle, uint8_t operation, uint16_t offset, uint16_t len, uint8_t *pValue, attsAttr_t *pAttr) |
ATTS write callback for heart rate service Use this function as a parameter to SvcHrsCbackRegister(). More... | |
void | HrpsSetFlags (uint8_t flags) |
Set the heart rate measurement flags. More... | |
anonymous enum |
Heart Rate service enumeration of handle indexes of characteristics to be discovered.
Definition at line 36 of file hrpc_api.h.
void HrpcHrsDiscover | ( | dmConnId_t | connId, |
uint16_t * | pHdlList | ||
) |
Perform service and characteristic discovery for Heart Rate service. Parameter pHdlList must point to an array of length HRPC_HRS_HDL_LIST_LEN. If discovery is successful the handles of discovered characteristics and descriptors will be set in pHdlList.
connId | Connection identifier. |
pHdlList | Characteristic handle list. |
void HrpcHrsControl | ( | dmConnId_t | connId, |
uint16_t | handle, | ||
uint8_t | command | ||
) |
Send a command to the heart rate control point.
connId | Connection identifier. |
handle | Attribute handle. |
command | Control point command. |
Process a value received in an ATT read response, notification, or indication message. Parameter pHdlList must point to an array of length HRPC_HRS_HDL_LIST_LEN. If the ATT handle of the message matches a handle in the handle list the value is processed, otherwise it is ignored.
pHdlList | Characterist handle list. |
pMsg | ATT callback message. |
void HrpsInit | ( | wsfHandlerId_t | handlerId, |
hrpsCfg_t * | pCfg | ||
) |
Initialize the Heart Rate profile sensor.
handlerId | WSF handler ID of the application using this service. |
pCfg | Configurable parameters. |
void HrpsMeasStart | ( | dmConnId_t | connId, |
uint8_t | timerEvt, | ||
uint8_t | hrmCccIdx | ||
) |
Start periodic heart rate measurement. This function starts a timer to perform periodic measurements.
connId | DM connection identifier. |
timerEvt | WSF event designated by the application for the timer. |
hrmCccIdx | Index of heart rate CCC descriptor in CCC descriptor handle table. |
void HrpsMeasStop | ( | dmConnId_t | connId | ) |
Stop periodic heart rate measurement.
connId | DM connection identifier. |
void HrpsProcMsg | ( | wsfMsgHdr_t * | pMsg | ) |
Process received WSF message.
pMsg | Event message. |
uint8_t HrpsWriteCback | ( | dmConnId_t | connId, |
uint16_t | handle, | ||
uint8_t | operation, | ||
uint16_t | offset, | ||
uint16_t | len, | ||
uint8_t * | pValue, | ||
attsAttr_t * | pAttr | ||
) |
ATTS write callback for heart rate service Use this function as a parameter to SvcHrsCbackRegister().
connId | DM connection identifier. |
handle | ATT handle. |
operation | ATT operation. |
offset | Write offset. |
len | Write length. |
pValue | Value to write. |
pAttr | Attribute to write. |
void HrpsSetFlags | ( | uint8_t | flags | ) |
Set the heart rate measurement flags.
flags | Heart rate measurement flags. |