2.15.1 MAC_ReadyToSleep Function
C
uint32_t MAC_ReadyToSleep(void)
Summary
Checks if the mac stack is ready to sleep.
Description
Checks if the mac stack is in inactive state for beacon support or idle in case of no beacon support.
Precondition
WPAN_Init() should have been called before calling this function.
Parameters
None.
Returns
32bit time duration in microseconds for which the mac is ready to sleep. Uint32_t ? 0- If MAC is busy, 1 ? If MAC is not busy, ready to sleep.
Example
if(MAC_ReadyToSleep()) { prinf("MAC is idle, device can sleep now"); } else { prinf("MAC is busy now"); }
Remarks
There is weak function for this callback. User has to define own implementation for required operation on the reception of particular callback.