From 1dbb59271c6086fa26088c9672be19bb1f66cdfd Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 25 Sep 2020 13:28:04 -0500 Subject: [PATCH] esp32: Use esp_restart from reset_to_bootloader; redeclare it NORETURN --- ports/esp32s2/supervisor/port.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/esp32s2/supervisor/port.c b/ports/esp32s2/supervisor/port.c index 60331d08e8..8b41076e1a 100644 --- a/ports/esp32s2/supervisor/port.c +++ b/ports/esp32s2/supervisor/port.c @@ -56,6 +56,8 @@ uint32_t heap_size; STATIC esp_timer_handle_t _tick_timer; +extern void esp_restart(void) NORETURN; + void tick_timer_cb(void* arg) { supervisor_tick(); } @@ -118,6 +120,7 @@ void reset_port(void) { } void reset_to_bootloader(void) { + esp_restart(); } void reset_cpu(void) {