1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-17 21:22:10 +00:00

fix(core): use unprivileged shutdown where needed

This commit is contained in:
Ondřej Vejpustek 2021-06-14 16:37:45 +02:00
parent 5984fd6ad7
commit b8b0ae09d9
2 changed files with 3 additions and 5 deletions

View File

@ -0,0 +1 @@
Fix red screen on shutdown.

View File

@ -29,9 +29,6 @@
#include "stm32f4xx_ll_utils.h"
// from util.s
extern void shutdown_privileged(void);
#define COLOR_FATAL_ERROR RGB16(0x7F, 0x00, 0x00)
// from util.s
@ -71,7 +68,7 @@ __fatal_error(const char *expr, const char *msg, const char *file, int line,
rev[4]);
#endif
display_printf("\nPlease contact Trezor support.\n");
shutdown_privileged();
shutdown();
for (;;)
;
}
@ -120,7 +117,7 @@ error_shutdown(const char *line1, const char *line2, const char *line3,
display_printf("\nPlease unplug the device.\n");
#endif
display_backlight(255);
shutdown_privileged();
shutdown();
for (;;)
;
}