Merge pull request #5880 from jepler/espressif-serial-trick-uf2

Request ROM bootloader when resetting using the 'serial trick'
This commit is contained in:
MicroDev 2022-01-21 09:56:12 +05:30 committed by GitHub
commit dab35f7c72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,6 +51,8 @@
#include "supervisor/background_callback.h" #include "supervisor/background_callback.h"
#include "supervisor/memory.h" #include "supervisor/memory.h"
#include "supervisor/shared/tick.h" #include "supervisor/shared/tick.h"
#include "shared-bindings/microcontroller/__init__.h"
#include "shared-bindings/microcontroller/RunMode.h"
#include "shared-bindings/rtc/__init__.h" #include "shared-bindings/rtc/__init__.h"
#include "peripherals/rmt.h" #include "peripherals/rmt.h"
@ -287,6 +289,7 @@ void reset_port(void) {
} }
void reset_to_bootloader(void) { void reset_to_bootloader(void) {
common_hal_mcu_on_next_reset(RUNMODE_BOOTLOADER);
esp_restart(); esp_restart();
} }