stm32/boardctrl: Add constants for reset mode values.
And use the same boardctrl.h header for both the application and mboot so these constants are consistent. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -60,11 +60,20 @@
|
||||
#define MICROPY_BOARD_END_SOFT_RESET boardctrl_end_soft_reset
|
||||
#endif
|
||||
|
||||
// Constants to return from boardctrl_run_boot_py, boardctrl_run_main_py.
|
||||
enum {
|
||||
BOARDCTRL_CONTINUE,
|
||||
BOARDCTRL_GOTO_SOFT_RESET_EXIT,
|
||||
};
|
||||
|
||||
// Constants for boardctrl_state_t.reset_mode.
|
||||
enum {
|
||||
BOARDCTRL_RESET_MODE_NORMAL = 1,
|
||||
BOARDCTRL_RESET_MODE_SAFE_MODE = 2,
|
||||
BOARDCTRL_RESET_MODE_FACTORY_FILESYSTEM = 3,
|
||||
BOARDCTRL_RESET_MODE_BOOTLOADER = 4,
|
||||
};
|
||||
|
||||
typedef struct _boardctrl_state_t {
|
||||
uint8_t reset_mode;
|
||||
bool log_soft_reset;
|
||||
|
||||
Reference in New Issue
Block a user