modtrezorutils: call __fatal_error on stm

This commit is contained in:
Pavol Rusnak 2017-04-10 19:43:07 +02:00
parent 0c060b6d4a
commit 69d7f39b23
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
1 changed files with 6 additions and 3 deletions

View File

@ -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