Skip to content

Commit 1708fe3

Browse files
committed
esp8266/modmachine: Add WDT_RESET and SOFT_RESET constants.
Both tested to work. (WDT_RESET can be seen by issuing machine.disable_irq() and waiting for WDT reset, SOFT_RESET - by machine.reset()).
1 parent 61e2dfd commit 1708fe3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

esp8266/modmachine.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,8 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = {
265265
{ MP_ROM_QSTR(MP_QSTR_PWR_ON_RESET), MP_ROM_INT(REASON_EXT_SYS_RST) },
266266
{ MP_ROM_QSTR(MP_QSTR_HARD_RESET), MP_ROM_INT(REASON_EXT_SYS_RST) },
267267
{ MP_ROM_QSTR(MP_QSTR_DEEPSLEEP_RESET), MP_ROM_INT(REASON_DEEP_SLEEP_AWAKE) },
268+
{ MP_ROM_QSTR(MP_QSTR_WDT_RESET), MP_ROM_INT(REASON_WDT_RST) },
269+
{ MP_ROM_QSTR(MP_QSTR_SOFT_RESET), MP_ROM_INT(REASON_SOFT_RESTART) },
268270
};
269271

270272
STATIC MP_DEFINE_CONST_DICT(machine_module_globals, machine_module_globals_table);

0 commit comments

Comments
 (0)