mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-26 17:38:39 +00:00
embed: move call to usb_clear to shutdown function in assembler
This commit is contained in:
parent
88894e7a8d
commit
4831287357
@ -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 (;;);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user