Unverified Commit 8e4008bf authored by madias123's avatar madias123 Committed by GitHub

Add rebootToBootloader to reboot to bootloader from code (#1514)

parent 7eb176c0
......@@ -29,6 +29,9 @@
#include <pico/multicore.h>
#include <pico/rand.h>
#include <pico/util/queue.h>
#include <pico.h>
#include <pico/time.h>
#include <pico/bootrom.h>
#include "CoreMutex.h"
#include "ccount.pio.h"
#include <malloc.h>
......@@ -317,6 +320,13 @@ public:
reboot();
}
inline void rebootToBootloader() {
reset_usb_boot(0, 0);
while (1) {
continue;
}
}
static void enableDoubleResetBootloader();
void wdt_begin(uint32_t delay_ms) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment