File tree 3 files changed +9
-1
lines changed 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 37
37
#define MICROPY_BOARD_STARTUP powerctrl_check_enter_bootloader
38
38
#endif
39
39
40
+ #ifndef MICROPY_BOARD_ENTER_BOOTLOADER
41
+ #define MICROPY_BOARD_ENTER_BOOTLOADER (nargs , args )
42
+ #endif
43
+
40
44
#ifndef MICROPY_BOARD_EARLY_INIT
41
45
#define MICROPY_BOARD_EARLY_INIT ()
42
46
#endif
Original file line number Diff line number Diff line change 47
47
#include "gccollect.h"
48
48
#include "irq.h"
49
49
#include "powerctrl.h"
50
+ #include "boardctrl.h"
50
51
#include "pybthread.h"
51
52
#include "storage.h"
52
53
#include "pin.h"
@@ -182,13 +183,15 @@ STATIC mp_obj_t machine_soft_reset(void) {
182
183
MP_DEFINE_CONST_FUN_OBJ_0 (machine_soft_reset_obj , machine_soft_reset );
183
184
184
185
// Activate the bootloader without BOOT* pins.
185
- STATIC NORETURN mp_obj_t machine_bootloader (size_t n_args , const mp_obj_t * args ) {
186
+ NORETURN mp_obj_t machine_bootloader (size_t n_args , const mp_obj_t * args ) {
186
187
#if MICROPY_HW_ENABLE_STORAGE
187
188
storage_flush ();
188
189
#endif
189
190
190
191
__disable_irq ();
191
192
193
+ MICROPY_BOARD_ENTER_BOOTLOADER (n_args , args );
194
+
192
195
#if MICROPY_HW_USES_BOOTLOADER
193
196
// ToDo: need to review how to implement
194
197
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ void machine_deinit(void);
49
49
void machine_pin_init (void );
50
50
void machine_pin_deinit (void );
51
51
void machine_i2s_init0 (void );
52
+ NORETURN mp_obj_t machine_bootloader (size_t n_args , const mp_obj_t * args );
52
53
53
54
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN (machine_info_obj );
54
55
MP_DECLARE_CONST_FUN_OBJ_0 (machine_unique_id_obj );
You can’t perform that action at this time.
0 commit comments