mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 03:30:14 +01:00
stm32/boardctrl: Allow boards to override fatal-error handler.
To override it a board must define MICROPY_BOARD_FATAL_ERROR to a function that takes a string message and does not return. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -33,6 +33,10 @@
|
||||
#define MICROPY_BOARD_PENDSV_ENTRIES
|
||||
#endif
|
||||
|
||||
#ifndef MICROPY_BOARD_FATAL_ERROR
|
||||
#define MICROPY_BOARD_FATAL_ERROR boardctrl_fatal_error
|
||||
#endif
|
||||
|
||||
#ifndef MICROPY_BOARD_STARTUP
|
||||
#define MICROPY_BOARD_STARTUP powerctrl_check_enter_bootloader
|
||||
#endif
|
||||
@@ -110,6 +114,7 @@ typedef struct _boardctrl_state_t {
|
||||
bool log_soft_reset;
|
||||
} boardctrl_state_t;
|
||||
|
||||
NORETURN void boardctrl_fatal_error(const char *msg);
|
||||
void boardctrl_maybe_enter_mboot(size_t n_args, const void *args);
|
||||
void boardctrl_before_soft_reset_loop(boardctrl_state_t *state);
|
||||
void boardctrl_top_soft_reset_loop(boardctrl_state_t *state);
|
||||
|
||||
Reference in New Issue
Block a user