Search by Tags

IOCTL HAL GET WAKE SOURCE

 

Article updated at 28 Oct 2017
Compare with Revision


This IOCTL returns the wake-up reason bits. This feature is available since Toradex WinCE BSP V3.4:

Define

#define     IOCTL_HAL_GET_WAKE_SOURCE   CTL_CODE(FILE_DEVICE_HAL, 42, METHOD_BUFFERED, FILE_ANY_ACCESS)

C source code sample

DWORD wakeReason[3];
 
KernelIoControl(IOCTL_HAL_GET_WAKE_SOURCE, NULL, 0, wakeReason, sizeof(wakeReason), NULL);
 
WakeReason format:
wakeReason[0] = SYSWAKE_OEMBASE; // is 0x800 or -1 when no wake-up was performed
// for a description of the following register values please refer to the Marvell PXA datasheets.
wakeReason[1] = PXA3xx: PWSR (Register address 0x40F50014),  PXA270: PEDR (Register address 0x40F00018)
wakeReason[2] = PXA3xx: AD3SR (Register address 0x40F4000C), PXA270: 0