mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-03-10 21:26:07 +00:00
feat(core): lazy initialize display driver in boardloader
[no changelog]
This commit is contained in:
parent
6102e10e91
commit
0b9d2e3ac9
@ -85,7 +85,12 @@ static void drivers_init(void) {
|
|||||||
#ifdef USE_HASH_PROCESSOR
|
#ifdef USE_HASH_PROCESSOR
|
||||||
hash_processor_init();
|
hash_processor_init();
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef FIXED_HW_DEINIT
|
||||||
|
// only skip this if deinit was fixed,
|
||||||
|
// as some old bootloaders rely on display being initialized
|
||||||
|
// (skipping alows faster boot time so generally a good idea)
|
||||||
display_init(DISPLAY_RESET_CONTENT);
|
display_init(DISPLAY_RESET_CONTENT);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void drivers_deinit(void) {
|
static void drivers_deinit(void) {
|
||||||
|
@ -160,7 +160,13 @@ void sd_update_check_and_update(const uint8_t *const *keys, uint8_t key_m,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (check_sdcard(keys, key_m, key_n) != 0) {
|
if (check_sdcard(keys, key_m, key_n) != 0) {
|
||||||
|
#ifdef FIXED_HW_DEINIT
|
||||||
|
display_init(DISPLAY_RESET_CONTENT);
|
||||||
|
#endif
|
||||||
copy_sdcard(keys, key_m, key_n);
|
copy_sdcard(keys, key_m, key_n);
|
||||||
|
#ifdef FIXED_HW_DEINIT
|
||||||
|
display_deinit(DISPLAY_RETAIN_CONTENT);
|
||||||
|
#endif
|
||||||
reboot_or_halt_after_rsod();
|
reboot_or_halt_after_rsod();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user