diff --git a/cores/rp2040/RP2040Support.cpp b/cores/rp2040/RP2040Support.cpp index ffb4d97..27ab953 100644 --- a/cores/rp2040/RP2040Support.cpp +++ b/cores/rp2040/RP2040Support.cpp @@ -18,6 +18,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifdef PICO_RP2040 + #include #include @@ -31,3 +33,5 @@ void RP2040::enableDoubleResetBootloader() { boot_double_tap_check(); } } + +#endif diff --git a/cores/rp2040/RP2040Support.h b/cores/rp2040/RP2040Support.h index a8ea99f..2797707 100644 --- a/cores/rp2040/RP2040Support.h +++ b/cores/rp2040/RP2040Support.h @@ -351,7 +351,9 @@ public: } } +#ifdef PICO_RP2040 static void enableDoubleResetBootloader(); +#endif void wdt_begin(uint32_t delay_ms) { watchdog_enable(delay_ms, 1); diff --git a/docs/rp2040.rst b/docs/rp2040.rst index c91d6b4..7ee728b 100644 --- a/docs/rp2040.rst +++ b/docs/rp2040.rst @@ -95,8 +95,8 @@ doing any WiFi calls. Bootloader ---------- -void rp2040.enableDoubleResetBootloader() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +void rp2040.enableDoubleResetBootloader() (Pico/RP2040 only) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Add a call anywhere in the sketch to ``rp2040.enableDoubleResetBootloader()`` and the core will check for a double-tap on reset, and if found will start the USB bootloader.