boardDinSetWakeup (Function) |
Top Previous Next |
This function is used to configure the system to wake from suspend when a digital input changes state. It is similar to using the DI1-4 and DI1-5Falling parameters on pmWaitEvent.
There may be situations where it is possible to enable both the rising and falling edges, triggering a wake-up on any change. The return code can be used to determine if this is the case. Under some circumstances, the return code from pmSuspend may show the edge that triggered the wake-up.
pmSuspend return codes for this wake-up source:
The ID variable is set to the number of the digital input(1..8).
Input:
Enable : BOOL (default: TRUE) Set to true to enable the wake-up, set to false to disable it.
Pin : SINT (1..8) The digital input to enable wake up on.
Rising : BOOL (default: TRUE) If set to true, the device will wake on the rising edge of the input.
Falling : BOOL (default: FALSE) If set to true, the device will wake on the falling edge of the input.
Returns:
Declaration: FUNCTION ALIGN boardDinSetWakeup:INT;
Example: INCLUDE rtcu.inc |