mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
modtrezorutils: call __fatal_error on stm
This commit is contained in:
parent
0c060b6d4a
commit
69d7f39b23
@ -7,8 +7,12 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#if defined STM32_HAL_H
|
||||
#include "common.h"
|
||||
#elif defined UNIX
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#include "py/runtime.h"
|
||||
|
||||
@ -66,8 +70,7 @@ STATIC mp_obj_t mod_TrezorUtils_halt(size_t n_args, const mp_obj_t *args) {
|
||||
}
|
||||
// TODO: is this the best we can do?
|
||||
#if defined STM32_HAL_H
|
||||
// loop forever
|
||||
for (;;) {}
|
||||
__fatal_error("HALT");
|
||||
#elif defined UNIX
|
||||
exit(1);
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user