mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-27 01:48:17 +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 "display.h"
|
||||||
#include "rng.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) {
|
void __attribute__((noreturn)) __fatal_error(const char *expr, const char *msg, const char *file, int line, const char *func) {
|
||||||
display_orientation(0);
|
display_orientation(0);
|
||||||
display_backlight(255);
|
display_backlight(255);
|
||||||
@ -28,7 +26,6 @@ void __attribute__((noreturn)) __fatal_error(const char *expr, const char *msg,
|
|||||||
#define STR(s) #s
|
#define STR(s) #s
|
||||||
display_printf("rev : %s\n", XSTR(GITREV));
|
display_printf("rev : %s\n", XSTR(GITREV));
|
||||||
#endif
|
#endif
|
||||||
clear_otg_hs_memory();
|
|
||||||
shutdown();
|
shutdown();
|
||||||
for (;;);
|
for (;;);
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,8 @@ void jump_to(uint32_t address);
|
|||||||
|
|
||||||
void hal_delay(uint32_t ms);
|
void hal_delay(uint32_t ms);
|
||||||
|
|
||||||
|
void shutdown(void);
|
||||||
|
|
||||||
extern uint32_t __stack_chk_guard;
|
extern uint32_t __stack_chk_guard;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -66,6 +66,7 @@ jump_to:
|
|||||||
.type shutdown, STT_FUNC
|
.type shutdown, STT_FUNC
|
||||||
shutdown:
|
shutdown:
|
||||||
cpsid f
|
cpsid f
|
||||||
|
bl clear_otg_hs_memory
|
||||||
ldr r0, =ccmram_start
|
ldr r0, =ccmram_start
|
||||||
ldr r1, =ccmram_end
|
ldr r1, =ccmram_end
|
||||||
ldr r2, =0
|
ldr r2, =0
|
||||||
|
Loading…
Reference in New Issue
Block a user