1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-19 21:08:07 +00:00

refactor(core): rename screen_boot_{empty,full} to screen_boot_stage_{1,2}

[no changelog]
This commit is contained in:
Martin Milata 2024-04-10 14:56:34 +02:00
parent 804d97c9d8
commit 906c00e4e5
18 changed files with 27 additions and 27 deletions

View File

@ -248,7 +248,7 @@ void ui_screen_done(uint8_t restart_seconds, secbool 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
void ui_screen_fail(void) { screen_install_fail(); }

View File

@ -67,7 +67,7 @@ void ui_fadein(void);
void ui_fadeout(void);
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
uint32_t ui_screen_unlock_bootloader_confirm(void);

View File

@ -350,7 +350,7 @@ void real_jump_to_firmware(void) {
ui_screen_boot_click();
}
ui_screen_boot_empty(false);
ui_screen_boot_stage_1(false);
}
ensure_compatible_settings();
@ -418,7 +418,7 @@ int bootloader_main(void) {
#endif
#endif
ui_screen_boot_empty(false);
ui_screen_boot_stage_1(false);
mpu_config_bootloader();
@ -621,7 +621,7 @@ int bootloader_main(void) {
}
if (ui_result == 0x11223344) { // reboot
#ifndef STM32U5
ui_screen_boot_empty(true);
ui_screen_boot_stage_1(true);
#endif
continue_to_firmware = firmware_present;
continue_to_firmware_backup = firmware_present_backup;
@ -686,7 +686,7 @@ int bootloader_main(void) {
#ifdef STM32U5
firmware_jump_fn = jump_to_fw_through_reset;
#else
ui_screen_boot_empty(true);
ui_screen_boot_stage_1(true);
firmware_jump_fn = real_jump_to_firmware;
#endif
break;

View File

@ -134,7 +134,7 @@ int main(void) {
display_reinit();
screen_boot_full();
screen_boot_stage_2();
#if !defined TREZOR_MODEL_1
parse_boardloader_capabilities();

View File

@ -20,7 +20,7 @@ uint32_t screen_install_success(uint8_t restart_seconds, bool initial_setup,
bool complete_draw);
uint32_t screen_install_fail(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);
void screen_unlock_bootloader_success(void);
void bld_continue_label(uint16_t bg_color);

View File

@ -3,7 +3,7 @@
void screen_fatal_error_rust(const char* title, const char* msg,
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_icon(int16_t x, int16_t y, const uint8_t* data, uint32_t datalen,

View File

@ -97,8 +97,8 @@ extern "C" fn screen_intro(
}
#[no_mangle]
extern "C" fn screen_boot_empty(fading: bool) {
ModelUI::screen_boot_empty(fading)
extern "C" fn screen_boot_stage_1(fading: bool) {
ModelUI::screen_boot_stage_1(fading)
}
#[no_mangle]

View File

@ -24,8 +24,8 @@ extern "C" fn screen_fatal_error_rust(
}
#[no_mangle]
extern "C" fn screen_boot_full() {
ModelUI::screen_boot_full();
extern "C" fn screen_boot_stage_2() {
ModelUI::screen_boot_stage_2();
}
#[no_mangle]

View File

@ -247,7 +247,7 @@ impl UIFeaturesBootloader for ModelMercuryFeatures {
run(&mut frame)
}
fn screen_boot_empty(fading: bool) {
fn screen_boot_stage_1(fading: bool) {
if fading {
Self::fadeout();
}

View File

@ -27,7 +27,7 @@ impl UIFeaturesCommon for ModelMercuryFeatures {
screens::screen_fatal_error(title, msg, footer);
}
fn screen_boot_full() {
screens::screen_boot_full();
fn screen_boot_stage_2() {
screens::screen_boot_stage_2();
}
}

View File

@ -11,7 +11,7 @@ pub fn screen_fatal_error(title: &str, msg: &str, footer: &str) {
frame.paint();
}
pub fn screen_boot_full() {
pub fn screen_boot_stage_2() {
let mut frame = WelcomeScreen::new();
frame.place(screen());
display::sync();

View File

@ -260,7 +260,7 @@ impl UIFeaturesBootloader for ModelTRFeatures {
run(&mut frame)
}
fn screen_boot_empty(_fading: bool) {
fn screen_boot_stage_1(_fading: bool) {
display::rect_fill(SCREEN, BLD_BG);
let mut frame = WelcomeScreen::new(true);

View File

@ -19,7 +19,7 @@ impl UIFeaturesCommon for ModelTRFeatures {
screens::screen_fatal_error(title, msg, footer);
}
fn screen_boot_full() {
screens::screen_boot_full();
fn screen_boot_stage_2() {
screens::screen_boot_stage_2();
}
}

View File

@ -11,7 +11,7 @@ pub fn screen_fatal_error(title: &str, msg: &str, footer: &str) {
display::refresh();
}
pub fn screen_boot_full() {
pub fn screen_boot_stage_2() {
let mut frame = WelcomeScreen::new(false);
frame.place(screen());
display::sync();

View File

@ -245,7 +245,7 @@ impl UIFeaturesBootloader for ModelTTFeatures {
run(&mut frame)
}
fn screen_boot_empty(fading: bool) {
fn screen_boot_stage_1(fading: bool) {
if fading {
ModelTTFeatures::fadeout();
}

View File

@ -34,7 +34,7 @@ impl UIFeaturesCommon for ModelTTFeatures {
screens::screen_fatal_error(title, msg, footer);
}
fn screen_boot_full() {
screens::screen_boot_full();
fn screen_boot_stage_2() {
screens::screen_boot_stage_2();
}
}

View File

@ -15,7 +15,7 @@ pub fn screen_fatal_error(title: &str, msg: &str, footer: &str) {
display::refresh();
}
pub fn screen_boot_full() {
pub fn screen_boot_stage_2() {
let mut frame = WelcomeScreen::new(false);
frame.place(screen());
display::sync();

View File

@ -11,7 +11,7 @@ pub trait UIFeaturesCommon {
fn screen_fatal_error(title: &str, msg: &str, footer: &str);
fn screen_boot_full();
fn screen_boot_stage_2();
}
#[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_boot_empty(fading: bool);
fn screen_boot_stage_1(fading: bool);
fn screen_wipe_progress(progress: u16, initialize: bool);