5.1.2.18 ZDO_SleepReq Function
Syntax
void ZDO_SleepReq(ZDO_SleepReq_t *req);
Description
The function transitions the device into Sleep mode. The sleep period’s duration is set by the CS_END_DEVICE_SLEEP_PERIOD parameter.
If
CS_END_DEVICE_SLEEP_PERIOD is set to ‘0’, the device enters an indefinite Sleep state, which can only be interrupted by a hardware interrupt.Note: The
The response statuses, accessed via the CS_END_DEVICE_SLEEP_PERIOD is also used by the parent device to monitor the child device’s status.ZDO_SleepConf_t-status field within the ZDO_SleepReq_t:ZDO_SleepConf callback’s argument, are as follows:- ZDO_SUCCESS_STATUS (
0x00) – The operation is successful and the device enters Sleep mode after the callback function returns. - ZDO_BUSY_STATUS (
0x04) – The ZDO component is currently handling a transaction, preventing the device from entering Sleep mode. - ZDO_INVALID_REQUEST_STATUS (
0x80) – The request is invalid because the node is already in the process of entering the Sleep mode.
Input Parameters
| Parameter Number | Description |
|---|---|
req | Sleep request parameters |
Return Type and Values
- None
