Merge pull request #8264 from bcr/bcr-runmode-uf2

Add RUNMODE_UF2 handling for SAMD
This commit is contained in:
Jeff Epler 2023-08-07 09:52:15 -05:00 committed by GitHub
commit f3320e4c3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,7 +63,7 @@ void common_hal_mcu_enable_interrupts(void) {
}
void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) {
if (runmode == RUNMODE_BOOTLOADER) {
if ((runmode == RUNMODE_BOOTLOADER) || (runmode == RUNMODE_UF2)) {
if (!bootloader_available()) {
mp_raise_ValueError(translate("Cannot reset into bootloader because no bootloader is present"));
}