Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
ezeio2:scriptref:getsystemitem [2020-08-18 22:09] – andreh | ezeio2:scriptref:getsystemitem [2023-08-08 23:05] (current) – andreh | ||
---|---|---|---|
Line 19: | Line 19: | ||
| '' | | '' | ||
| '' | | '' | ||
- | | '' | + | | '' |
| '' | | '' | ||
| '' | | '' | ||
Line 38: | Line 38: | ||
| '' | | '' | ||
| '' | | '' | ||
+ | | '' | ||
+ | | '' | ||
- | === Flags returned by SYSITEM_RESETCAUSE | + | == Flags returned by SYSITEM_RESETCAUSE == |
^ constant ^ meaning ^ | ^ constant ^ meaning ^ | ||
| RESETCAUSE_EXT | Any external reset | | | RESETCAUSE_EXT | Any external reset | | ||
Line 48: | Line 50: | ||
| RESETCAUSE_HIB | Board woke up from hibernation | | | RESETCAUSE_HIB | Board woke up from hibernation | | ||
- | === Flags returned by SYSITEM_SCRIPT_RESETCAUSE | + | == Flags returned by SYSITEM_SCRIPT_RESETCAUSE == |
^ constant ^ meaning ^ | ^ constant ^ meaning ^ | ||
| SCRIPT_BOOT | Script started due to board reset | | | SCRIPT_BOOT | Script started due to board reset | | ||
Line 66: | Line 68: | ||
x = GetSystemItem(SYSITEM_YEAR); | x = GetSystemItem(SYSITEM_YEAR); | ||
- | |||
// x is now 2019 (as of this writing) | // x is now 2019 (as of this writing) | ||
+ | |||
+ | if( GetSystemItem( SYSITEM_RESETCAUSE ) & RESETCAUSE_HIB ) { | ||
+ | // this code will run if board came back from a hibernation cycle | ||
+ | } | ||
</ | </ | ||