Commit 0900958e authored by Johny Mattsson's avatar Johny Mattsson
Browse files

Updated node.bootreason() to match latest dev merge.

parent e1733f8d
...@@ -12,7 +12,7 @@ The first value returned is the raw code, not the new "reset info" code which wa ...@@ -12,7 +12,7 @@ The first value returned is the raw code, not the new "reset info" code which wa
- 3, hardware reset via reset pin - 3, hardware reset via reset pin
- 4, WDT reset (watchdog timeout) - 4, WDT reset (watchdog timeout)
The second^ value returned is the extended reset cause. Values are: The second value returned is the extended reset cause. Values are:
- 0, power-on - 0, power-on
- 1, hardware watchdog reset - 1, hardware watchdog reset
...@@ -22,9 +22,9 @@ The second^ value returned is the extended reset cause. Values are: ...@@ -22,9 +22,9 @@ The second^ value returned is the extended reset cause. Values are:
- 5, wake from deep sleep - 5, wake from deep sleep
- 6, external reset - 6, external reset
In case of extended reset cause 3 (exception reset), additional values are returned containing the crash information. These are, in order, EPC1, EPC2, EPC3, EXCVADDR, and DEPC. In general, the extended reset cause supercedes the raw code. The raw code is kept for backwards compatibility only. For new applications it is highly recommended to use the extended reset cause instead.
^) Extended reset cause support added 12 Jan 2016. The raw code was kept for backwards compatibility, even though the extended reset info supercedes it. In case of extended reset cause 3 (exception reset), additional values are returned containing the crash information. These are, in order, EXCCAUSE, EPC1, EPC2, EPC3, EXCVADDR, and DEPC.
#### Syntax #### Syntax
`node.bootreason()` `node.bootreason()`
...@@ -33,7 +33,7 @@ In case of extended reset cause 3 (exception reset), additional values are retur ...@@ -33,7 +33,7 @@ In case of extended reset cause 3 (exception reset), additional values are retur
none none
#### Returns #### Returns
`rawcode, reason [, epc1, epc2, epc3, excvaddr, depc ]` `rawcode, reason [, exccause, epc1, epc2, epc3, excvaddr, depc ]`
#### Example #### Example
```lua ```lua
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment