diff options
Diffstat (limited to 'src/rp2040/main.c')
-rw-r--r-- | src/rp2040/main.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/rp2040/main.c b/src/rp2040/main.c index fbbe3b56..462e69c6 100644 --- a/src/rp2040/main.c +++ b/src/rp2040/main.c @@ -5,11 +5,13 @@ // This file may be distributed under the terms of the GNU GPLv3 license. #include <stdint.h> // uint32_t +#include "board/misc.h" // bootloader_request #include "hardware/structs/clocks.h" // clock_hw_t #include "hardware/structs/pll.h" // pll_hw_t #include "hardware/structs/resets.h" // sio_hw #include "hardware/structs/watchdog.h" // watchdog_hw #include "hardware/structs/xosc.h" // xosc_hw +#include "internal.h" // enable_pclock #include "sched.h" // sched_main @@ -37,6 +39,18 @@ DECL_INIT(watchdog_init); /**************************************************************** + * Bootloader + ****************************************************************/ + +void +bootloader_request(void) +{ + // Use the bootrom-provided code to reset into BOOTSEL mode + reset_to_usb_boot(0, 0); +} + + +/**************************************************************** * Clock setup ****************************************************************/ |