File tree Expand file tree Collapse file tree 4 files changed +16
-3
lines changed Expand file tree Collapse file tree 4 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -241,12 +241,15 @@ int rp2040_connect_onOTARequest(char const * ota_url)
241241 return static_cast <int >(OTAError::RP2040_ErrorUnmount);
242242 }
243243
244+ return static_cast <int >(OTAError::None);
245+ }
246+
247+ void rp2040_connect_systemReset ()
248+ {
244249 /* Perform the reset to reboot to SFU. */
245250 mbed_watchdog_trigger_reset ();
246251 /* If watchdog is enabled we should not reach this point */
247252 NVIC_SystemReset ();
248-
249- return static_cast <int >(OTAError::None);
250253}
251254
252255#endif /* ARDUINO_NANO_RP2040_CONNECT */
Original file line number Diff line number Diff line change @@ -82,7 +82,10 @@ int portenta_h7_onOTARequest(char const * ota_url)
8282 DEBUG_ERROR (" Arduino_Portenta_OTA_QSPI::update() failed with %d" , static_cast <int >(ota_portenta_err));
8383 return static_cast <int >(ota_portenta_err);
8484 }
85+ }
8586
87+ void portenta_h7_systemReset ()
88+ {
8689 /* Perform the reset to reboot - then the bootloader performs the actual application update. */
8790 NVIC_SystemReset ();
8891}
Original file line number Diff line number Diff line change @@ -55,9 +55,13 @@ int samd_onOTARequest(char const * ota_url)
5555 return static_cast <int >(OTAError::DownloadFailed);
5656 }
5757
58+ #endif /* OTA_STORAGE_SNU */
59+ }
60+
61+ void samd_systemReset ()
62+ {
5863 /* Perform the reset to reboot to SxU. */
5964 NVIC_SystemReset ();
60- #endif /* OTA_STORAGE_SNU */
6165}
6266
6367#endif /* ARDUINO_ARCH_SAMD */
Original file line number Diff line number Diff line change @@ -56,14 +56,17 @@ enum class OTAError : int
5656
5757#ifdef ARDUINO_ARCH_SAMD
5858int samd_onOTARequest (char const * ota_url );
59+ void samd_systemReset ();
5960#endif
6061
6162#ifdef ARDUINO_NANO_RP2040_CONNECT
6263int rp2040_connect_onOTARequest (char const * ota_url );
64+ void rp2040_connect_systemReset ();
6365#endif
6466
6567#if defined(ARDUINO_PORTENTA_H7_M7 ) || defined(ARDUINO_PORTENTA_H7_M4 )
6668int portenta_h7_onOTARequest (char const * ota_url );
69+ void portenta_h7_systemReset ();
6770#endif
6871
6972#endif /* ARDUINO_OTA_LOGIC_H_ */
You can’t perform that action at this time.
0 commit comments