mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-20 05:18:08 +00:00
refactor(core): rename screen_boot_{empty,full} to screen_boot_stage_{1,2}
[no changelog]
This commit is contained in:
parent
804d97c9d8
commit
906c00e4e5
@ -248,7 +248,7 @@ void ui_screen_done(uint8_t restart_seconds, secbool full_redraw) {
|
|||||||
screen_install_success(restart_seconds, initial_setup, full_redraw);
|
screen_install_success(restart_seconds, initial_setup, full_redraw);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ui_screen_boot_empty(bool fading) { screen_boot_empty(fading); }
|
void ui_screen_boot_stage_1(bool fading) { screen_boot_stage_1(fading); }
|
||||||
|
|
||||||
// error UI
|
// error UI
|
||||||
void ui_screen_fail(void) { screen_install_fail(); }
|
void ui_screen_fail(void) { screen_install_fail(); }
|
||||||
|
@ -67,7 +67,7 @@ void ui_fadein(void);
|
|||||||
void ui_fadeout(void);
|
void ui_fadeout(void);
|
||||||
void ui_set_initial_setup(bool initial);
|
void ui_set_initial_setup(bool initial);
|
||||||
|
|
||||||
void ui_screen_boot_empty(bool fading);
|
void ui_screen_boot_stage_1(bool fading);
|
||||||
|
|
||||||
#ifdef USE_OPTIGA
|
#ifdef USE_OPTIGA
|
||||||
uint32_t ui_screen_unlock_bootloader_confirm(void);
|
uint32_t ui_screen_unlock_bootloader_confirm(void);
|
||||||
|
@ -350,7 +350,7 @@ void real_jump_to_firmware(void) {
|
|||||||
ui_screen_boot_click();
|
ui_screen_boot_click();
|
||||||
}
|
}
|
||||||
|
|
||||||
ui_screen_boot_empty(false);
|
ui_screen_boot_stage_1(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
ensure_compatible_settings();
|
ensure_compatible_settings();
|
||||||
@ -418,7 +418,7 @@ int bootloader_main(void) {
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ui_screen_boot_empty(false);
|
ui_screen_boot_stage_1(false);
|
||||||
|
|
||||||
mpu_config_bootloader();
|
mpu_config_bootloader();
|
||||||
|
|
||||||
@ -621,7 +621,7 @@ int bootloader_main(void) {
|
|||||||
}
|
}
|
||||||
if (ui_result == 0x11223344) { // reboot
|
if (ui_result == 0x11223344) { // reboot
|
||||||
#ifndef STM32U5
|
#ifndef STM32U5
|
||||||
ui_screen_boot_empty(true);
|
ui_screen_boot_stage_1(true);
|
||||||
#endif
|
#endif
|
||||||
continue_to_firmware = firmware_present;
|
continue_to_firmware = firmware_present;
|
||||||
continue_to_firmware_backup = firmware_present_backup;
|
continue_to_firmware_backup = firmware_present_backup;
|
||||||
@ -686,7 +686,7 @@ int bootloader_main(void) {
|
|||||||
#ifdef STM32U5
|
#ifdef STM32U5
|
||||||
firmware_jump_fn = jump_to_fw_through_reset;
|
firmware_jump_fn = jump_to_fw_through_reset;
|
||||||
#else
|
#else
|
||||||
ui_screen_boot_empty(true);
|
ui_screen_boot_stage_1(true);
|
||||||
firmware_jump_fn = real_jump_to_firmware;
|
firmware_jump_fn = real_jump_to_firmware;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
@ -134,7 +134,7 @@ int main(void) {
|
|||||||
|
|
||||||
display_reinit();
|
display_reinit();
|
||||||
|
|
||||||
screen_boot_full();
|
screen_boot_stage_2();
|
||||||
|
|
||||||
#if !defined TREZOR_MODEL_1
|
#if !defined TREZOR_MODEL_1
|
||||||
parse_boardloader_capabilities();
|
parse_boardloader_capabilities();
|
||||||
|
@ -20,7 +20,7 @@ uint32_t screen_install_success(uint8_t restart_seconds, bool initial_setup,
|
|||||||
bool complete_draw);
|
bool complete_draw);
|
||||||
uint32_t screen_install_fail(void);
|
uint32_t screen_install_fail(void);
|
||||||
void screen_welcome(void);
|
void screen_welcome(void);
|
||||||
void screen_boot_empty(bool fading);
|
void screen_boot_stage_1(bool fading);
|
||||||
uint32_t screen_unlock_bootloader_confirm(void);
|
uint32_t screen_unlock_bootloader_confirm(void);
|
||||||
void screen_unlock_bootloader_success(void);
|
void screen_unlock_bootloader_success(void);
|
||||||
void bld_continue_label(uint16_t bg_color);
|
void bld_continue_label(uint16_t bg_color);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
void screen_fatal_error_rust(const char* title, const char* msg,
|
void screen_fatal_error_rust(const char* title, const char* msg,
|
||||||
const char* footer);
|
const char* footer);
|
||||||
|
|
||||||
void screen_boot_full(void);
|
void screen_boot_stage_2(void);
|
||||||
|
|
||||||
void display_image(int16_t x, int16_t y, const uint8_t* data, uint32_t datalen);
|
void display_image(int16_t x, int16_t y, const uint8_t* data, uint32_t datalen);
|
||||||
void display_icon(int16_t x, int16_t y, const uint8_t* data, uint32_t datalen,
|
void display_icon(int16_t x, int16_t y, const uint8_t* data, uint32_t datalen,
|
||||||
|
@ -97,8 +97,8 @@ extern "C" fn screen_intro(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
extern "C" fn screen_boot_empty(fading: bool) {
|
extern "C" fn screen_boot_stage_1(fading: bool) {
|
||||||
ModelUI::screen_boot_empty(fading)
|
ModelUI::screen_boot_stage_1(fading)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
@ -24,8 +24,8 @@ extern "C" fn screen_fatal_error_rust(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
extern "C" fn screen_boot_full() {
|
extern "C" fn screen_boot_stage_2() {
|
||||||
ModelUI::screen_boot_full();
|
ModelUI::screen_boot_stage_2();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
@ -247,7 +247,7 @@ impl UIFeaturesBootloader for ModelMercuryFeatures {
|
|||||||
run(&mut frame)
|
run(&mut frame)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn screen_boot_empty(fading: bool) {
|
fn screen_boot_stage_1(fading: bool) {
|
||||||
if fading {
|
if fading {
|
||||||
Self::fadeout();
|
Self::fadeout();
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ impl UIFeaturesCommon for ModelMercuryFeatures {
|
|||||||
screens::screen_fatal_error(title, msg, footer);
|
screens::screen_fatal_error(title, msg, footer);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn screen_boot_full() {
|
fn screen_boot_stage_2() {
|
||||||
screens::screen_boot_full();
|
screens::screen_boot_stage_2();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ pub fn screen_fatal_error(title: &str, msg: &str, footer: &str) {
|
|||||||
frame.paint();
|
frame.paint();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn screen_boot_full() {
|
pub fn screen_boot_stage_2() {
|
||||||
let mut frame = WelcomeScreen::new();
|
let mut frame = WelcomeScreen::new();
|
||||||
frame.place(screen());
|
frame.place(screen());
|
||||||
display::sync();
|
display::sync();
|
||||||
|
@ -260,7 +260,7 @@ impl UIFeaturesBootloader for ModelTRFeatures {
|
|||||||
run(&mut frame)
|
run(&mut frame)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn screen_boot_empty(_fading: bool) {
|
fn screen_boot_stage_1(_fading: bool) {
|
||||||
display::rect_fill(SCREEN, BLD_BG);
|
display::rect_fill(SCREEN, BLD_BG);
|
||||||
|
|
||||||
let mut frame = WelcomeScreen::new(true);
|
let mut frame = WelcomeScreen::new(true);
|
||||||
|
@ -19,7 +19,7 @@ impl UIFeaturesCommon for ModelTRFeatures {
|
|||||||
screens::screen_fatal_error(title, msg, footer);
|
screens::screen_fatal_error(title, msg, footer);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn screen_boot_full() {
|
fn screen_boot_stage_2() {
|
||||||
screens::screen_boot_full();
|
screens::screen_boot_stage_2();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ pub fn screen_fatal_error(title: &str, msg: &str, footer: &str) {
|
|||||||
display::refresh();
|
display::refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn screen_boot_full() {
|
pub fn screen_boot_stage_2() {
|
||||||
let mut frame = WelcomeScreen::new(false);
|
let mut frame = WelcomeScreen::new(false);
|
||||||
frame.place(screen());
|
frame.place(screen());
|
||||||
display::sync();
|
display::sync();
|
||||||
|
@ -245,7 +245,7 @@ impl UIFeaturesBootloader for ModelTTFeatures {
|
|||||||
run(&mut frame)
|
run(&mut frame)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn screen_boot_empty(fading: bool) {
|
fn screen_boot_stage_1(fading: bool) {
|
||||||
if fading {
|
if fading {
|
||||||
ModelTTFeatures::fadeout();
|
ModelTTFeatures::fadeout();
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ impl UIFeaturesCommon for ModelTTFeatures {
|
|||||||
screens::screen_fatal_error(title, msg, footer);
|
screens::screen_fatal_error(title, msg, footer);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn screen_boot_full() {
|
fn screen_boot_stage_2() {
|
||||||
screens::screen_boot_full();
|
screens::screen_boot_stage_2();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ pub fn screen_fatal_error(title: &str, msg: &str, footer: &str) {
|
|||||||
display::refresh();
|
display::refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn screen_boot_full() {
|
pub fn screen_boot_stage_2() {
|
||||||
let mut frame = WelcomeScreen::new(false);
|
let mut frame = WelcomeScreen::new(false);
|
||||||
frame.place(screen());
|
frame.place(screen());
|
||||||
display::sync();
|
display::sync();
|
||||||
|
@ -11,7 +11,7 @@ pub trait UIFeaturesCommon {
|
|||||||
|
|
||||||
fn screen_fatal_error(title: &str, msg: &str, footer: &str);
|
fn screen_fatal_error(title: &str, msg: &str, footer: &str);
|
||||||
|
|
||||||
fn screen_boot_full();
|
fn screen_boot_stage_2();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "bootloader")]
|
#[cfg(feature = "bootloader")]
|
||||||
@ -43,7 +43,7 @@ pub trait UIFeaturesBootloader {
|
|||||||
|
|
||||||
fn screen_intro(bld_version: &str, vendor: &str, version: &str, fw_ok: bool) -> u32;
|
fn screen_intro(bld_version: &str, vendor: &str, version: &str, fw_ok: bool) -> u32;
|
||||||
|
|
||||||
fn screen_boot_empty(fading: bool);
|
fn screen_boot_stage_1(fading: bool);
|
||||||
|
|
||||||
fn screen_wipe_progress(progress: u16, initialize: bool);
|
fn screen_wipe_progress(progress: u16, initialize: bool);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user