zpBootEvent (Function) |
Top Previous Next |
This function will query the event which has caused the device to boot.
The boot events have the following precedence when multiple sources have been detected:
•Power Down has been called (see pmPowerDown). •Hardware reset (reset switch used). •Vibration (see zpPowerDown). •Timeout (see zpPowerDown). •Digital input 1 change. •Digital input 2 change. •External power applied. •Software reset (e.g. boardReset, boardWatchdog, etc.)
If no change in system state can be detected, the function will return "-1". An example would be if the external power was removed and applied after entering Zero Power mode by using zpPowerDown.
Input: None.
Returns: INT
Declaration: FUNCTION zpBootEvent : INT;
Example: INCLUDE rtcu.inc |