Closed xopxe closed 5 years ago
Hi @xopxe,
please have a look at the lua function os.exit() which uses os_exit in the same file loslib.c
.
It calls esp_restart but before it takes care of backtrace handling.
Hi, what is the difference to the cpu.sleep(0) function?
Oh, I grepped esp_restart and somehow missed that. There's a further comment, so feel free to close this whenever you want.
@lu1210 more or less should be the same outcome but the reset reason will be different @xopxe closing this
We added a
os.reset()
call to restart the board (it's just a call to esp_restart())https://github.com/xopxe/Lua-RTOS-ESP32/commit/b57be16314e271d85fe8df71570ae4d2c548552c
Is it useful?