File tree 4 files changed +16
-3
lines changed
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)
241
241
return static_cast <int >(OTAError::RP2040_ErrorUnmount);
242
242
}
243
243
244
+ return static_cast <int >(OTAError::None);
245
+ }
246
+
247
+ void rp2040_connect_systemReset ()
248
+ {
244
249
/* Perform the reset to reboot to SFU. */
245
250
mbed_watchdog_trigger_reset ();
246
251
/* If watchdog is enabled we should not reach this point */
247
252
NVIC_SystemReset ();
248
-
249
- return static_cast <int >(OTAError::None);
250
253
}
251
254
252
255
#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)
82
82
DEBUG_ERROR (" Arduino_Portenta_OTA_QSPI::update() failed with %d" , static_cast <int >(ota_portenta_err));
83
83
return static_cast <int >(ota_portenta_err);
84
84
}
85
+ }
85
86
87
+ void portenta_h7_systemReset ()
88
+ {
86
89
/* Perform the reset to reboot - then the bootloader performs the actual application update. */
87
90
NVIC_SystemReset ();
88
91
}
Original file line number Diff line number Diff line change @@ -55,9 +55,13 @@ int samd_onOTARequest(char const * ota_url)
55
55
return static_cast <int >(OTAError::DownloadFailed);
56
56
}
57
57
58
+ #endif /* OTA_STORAGE_SNU */
59
+ }
60
+
61
+ void samd_systemReset ()
62
+ {
58
63
/* Perform the reset to reboot to SxU. */
59
64
NVIC_SystemReset ();
60
- #endif /* OTA_STORAGE_SNU */
61
65
}
62
66
63
67
#endif /* ARDUINO_ARCH_SAMD */
Original file line number Diff line number Diff line change @@ -56,14 +56,17 @@ enum class OTAError : int
56
56
57
57
#ifdef ARDUINO_ARCH_SAMD
58
58
int samd_onOTARequest (char const * ota_url );
59
+ void samd_systemReset ();
59
60
#endif
60
61
61
62
#ifdef ARDUINO_NANO_RP2040_CONNECT
62
63
int rp2040_connect_onOTARequest (char const * ota_url );
64
+ void rp2040_connect_systemReset ();
63
65
#endif
64
66
65
67
#if defined(ARDUINO_PORTENTA_H7_M7 ) || defined(ARDUINO_PORTENTA_H7_M4 )
66
68
int portenta_h7_onOTARequest (char const * ota_url );
69
+ void portenta_h7_systemReset ();
67
70
#endif
68
71
69
72
#endif /* ARDUINO_OTA_LOGIC_H_ */
You can’t perform that action at this time.
0 commit comments