![]() |
Cordio Stack and Cordio Profiles
r2p3-02rel0
|
Data Structures | |
| struct | basCfg_t |
| Battery service configurable parameters. More... | |
Functions | |
| void | BasInit (wsfHandlerId_t handlerId, basCfg_t *pCfg) |
| Initialize the battery service server. More... | |
| void | BasMeasBattStart (dmConnId_t connId, uint8_t timerEvt, uint8_t battCccIdx) |
| Start periodic battery level measurement. This function starts a timer to perform periodic battery measurements. More... | |
| void | BasMeasBattStop (dmConnId_t connId) |
| Stop periodic battery level measurement. More... | |
| void | BasProcMsg (wsfMsgHdr_t *pMsg) |
| Process received WSF message. More... | |
| void | BasSendBattLevel (dmConnId_t connId, uint8_t idx, uint8_t level) |
| Send the battery level to the peer device. More... | |
| uint8_t | BasReadCback (dmConnId_t connId, uint16_t handle, uint8_t operation, uint16_t offset, attsAttr_t *pAttr) |
| ATTS read callback for battery service used to read the battery level. Use this function as a parameter to SvcBattCbackRegister(). More... | |
| void BasInit | ( | wsfHandlerId_t | handlerId, |
| basCfg_t * | pCfg | ||
| ) |
Initialize the battery service server.
| handlerId | WSF handler ID of the application using this service. |
| pCfg | Battery service configurable parameters. |
| void BasMeasBattStart | ( | dmConnId_t | connId, |
| uint8_t | timerEvt, | ||
| uint8_t | battCccIdx | ||
| ) |
Start periodic battery level measurement. This function starts a timer to perform periodic battery measurements.
| connId | DM connection identifier. |
| timerEvt | WSF event designated by the application for the timer. |
| battCccIdx | Index of battery level CCC descriptor in CCC descriptor handle table. |
| void BasMeasBattStop | ( | dmConnId_t | connId | ) |
Stop periodic battery level measurement.
| connId | DM connection identifier. |
| void BasProcMsg | ( | wsfMsgHdr_t * | pMsg | ) |
Process received WSF message.
| pMsg | Event message. |
| void BasSendBattLevel | ( | dmConnId_t | connId, |
| uint8_t | idx, | ||
| uint8_t | level | ||
| ) |
Send the battery level to the peer device.
| connId | DM connection identifier. |
| idx | Index of battery level CCC descriptor in CCC descriptor handle table. |
| level | The battery level. |
| uint8_t BasReadCback | ( | dmConnId_t | connId, |
| uint16_t | handle, | ||
| uint8_t | operation, | ||
| uint16_t | offset, | ||
| attsAttr_t * | pAttr | ||
| ) |
ATTS read callback for battery service used to read the battery level. Use this function as a parameter to SvcBattCbackRegister().
| connId | DM connection identifier. |
| handle | ATT handle. |
| operation | ATT operation. |
| offset | read offset. |
| pAttr | pointer to Attribute |