1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-23 06:48:16 +00:00

embed: move call to usb_clear to shutdown function in assembler

This commit is contained in:
Pavol Rusnak 2017-10-13 17:18:02 +02:00
parent 88894e7a8d
commit 4831287357
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
3 changed files with 3 additions and 3 deletions

View File

@ -4,8 +4,6 @@
#include "display.h"
#include "rng.h"
void shutdown(void);
void __attribute__((noreturn)) __fatal_error(const char *expr, const char *msg, const char *file, int line, const char *func) {
display_orientation(0);
display_backlight(255);
@ -28,7 +26,6 @@ void __attribute__((noreturn)) __fatal_error(const char *expr, const char *msg,
#define STR(s) #s
display_printf("rev : %s\n", XSTR(GITREV));
#endif
clear_otg_hs_memory();
shutdown();
for (;;);
}

View File

@ -22,6 +22,8 @@ void jump_to(uint32_t address);
void hal_delay(uint32_t ms);
void shutdown(void);
extern uint32_t __stack_chk_guard;
#endif

View File

@ -66,6 +66,7 @@ jump_to:
.type shutdown, STT_FUNC
shutdown:
cpsid f
bl clear_otg_hs_memory
ldr r0, =ccmram_start
ldr r1, =ccmram_end
ldr r2, =0