File tree Expand file tree Collapse file tree 3 files changed +2
-3
lines changed
common-hal/microcontroller Expand file tree Collapse file tree 3 files changed +2
-3
lines changed Original file line number Diff line number Diff line change 39
39
#include "supervisor/shared/safe_mode.h"
40
40
#include "supervisor/shared/translate/translate.h"
41
41
42
- #define DBL_TAP_REG SNVS->LPGPR[3]
43
-
44
42
void common_hal_mcu_delay_us (uint32_t delay ) {
45
43
mp_hal_delay_us (delay );
46
44
}
Original file line number Diff line number Diff line change 33
33
#include "py/mpconfig.h"
34
34
35
35
// Copied from inc/uf2.h in https://github.com/Microsoft/uf2-samd21
36
+ #define DBL_TAP_REG SNVS->LPGPR[3]
36
37
#define DBL_TAP_MAGIC 0xf01669ef // Randomly selected, adjusted to have first and last bit set
37
38
#define DBL_TAP_MAGIC_QUICK_BOOT 0xf02669ef
38
39
Original file line number Diff line number Diff line change @@ -301,7 +301,7 @@ void reset_port(void) {
301
301
}
302
302
303
303
void reset_to_bootloader (void ) {
304
- SNVS -> LPGPR [ 0 ] = DBL_TAP_MAGIC ;
304
+ DBL_TAP_REG = DBL_TAP_MAGIC ;
305
305
reset ();
306
306
}
307
307
You can’t perform that action at this time.
0 commit comments