diff --git a/core/embed/io/display/inc/io/display.h b/core/embed/io/display/inc/io/display.h index be0e474fc4..4853980c0d 100644 --- a/core/embed/io/display/inc/io/display.h +++ b/core/embed/io/display/inc/io/display.h @@ -44,8 +44,6 @@ // MIPI - // - STM32U5A9J-DK Discovery Board -#ifdef KERNEL_MODE - // Specifies how display content should be handled during // initialization or deinitialization. typedef enum { @@ -55,6 +53,8 @@ typedef enum { DISPLAY_RETAIN_CONTENT } display_content_mode_t; +#ifdef KERNEL_MODE + // Initializes the display controller. // // If `mode` is `DISPLAY_RETAIN_CONTENT`, ensure the driver was previously diff --git a/core/embed/projects/firmware/main.c b/core/embed/projects/firmware/main.c index 3943589450..a91402fa5a 100644 --- a/core/embed/projects/firmware/main.c +++ b/core/embed/projects/firmware/main.c @@ -17,6 +17,7 @@ * along with this program. If not, see . */ +#include #include #include "py/builtin.h" @@ -32,6 +33,7 @@ #include "ports/stm32/gccollect.h" #include "ports/stm32/pendsv.h" +#include #include #include #include @@ -49,7 +51,7 @@ int main(uint32_t cmd, void *arg) { system_exit(0); } - screen_boot_stage_2(); + screen_boot_stage_2(DISPLAY_JUMP_BEHAVIOR == DISPLAY_RESET_CONTENT); #ifdef USE_SECP256K1_ZKP ensure(sectrue * (zkp_context_init() == 0), NULL); diff --git a/core/embed/rust/rust_ui_common.h b/core/embed/rust/rust_ui_common.h index b3af726a14..c6a742d3e0 100644 --- a/core/embed/rust/rust_ui_common.h +++ b/core/embed/rust/rust_ui_common.h @@ -3,7 +3,7 @@ void display_rsod_rust(const char* title, const char* message, const char* footer); -void screen_boot_stage_2(void); +void screen_boot_stage_2(bool fade_in); 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, diff --git a/core/embed/rust/src/ui/api/common_c.rs b/core/embed/rust/src/ui/api/common_c.rs index 16c81443ce..97d938294c 100644 --- a/core/embed/rust/src/ui/api/common_c.rs +++ b/core/embed/rust/src/ui/api/common_c.rs @@ -29,6 +29,6 @@ extern "C" fn display_rsod_rust( } #[no_mangle] -extern "C" fn screen_boot_stage_2() { - ModelUI::screen_boot_stage_2(); +extern "C" fn screen_boot_stage_2(fade_in: bool) { + ModelUI::screen_boot_stage_2(fade_in); } diff --git a/core/embed/rust/src/ui/layout_bolt/mod.rs b/core/embed/rust/src/ui/layout_bolt/mod.rs index 64d5446320..d2edf35540 100644 --- a/core/embed/rust/src/ui/layout_bolt/mod.rs +++ b/core/embed/rust/src/ui/layout_bolt/mod.rs @@ -68,8 +68,8 @@ impl CommonUI for UIBolt { show(&mut frame, false); } - fn screen_boot_stage_2() { + fn screen_boot_stage_2(fade_in: bool) { let mut frame = WelcomeScreen::new(false); - show(&mut frame, false); + show(&mut frame, fade_in); } } diff --git a/core/embed/rust/src/ui/layout_caesar/mod.rs b/core/embed/rust/src/ui/layout_caesar/mod.rs index 807ab172d8..516764bbcd 100644 --- a/core/embed/rust/src/ui/layout_caesar/mod.rs +++ b/core/embed/rust/src/ui/layout_caesar/mod.rs @@ -23,7 +23,7 @@ impl CommonUI for UICaesar { screens::screen_fatal_error(title, msg, footer); } - fn screen_boot_stage_2() { - screens::screen_boot_stage_2(); + fn screen_boot_stage_2(fade_in: bool) { + screens::screen_boot_stage_2(fade_in); } } diff --git a/core/embed/rust/src/ui/layout_caesar/screens.rs b/core/embed/rust/src/ui/layout_caesar/screens.rs index 70065304ba..cbef8eafe3 100644 --- a/core/embed/rust/src/ui/layout_caesar/screens.rs +++ b/core/embed/rust/src/ui/layout_caesar/screens.rs @@ -18,7 +18,7 @@ pub fn screen_fatal_error(title: &str, msg: &str, footer: &str) { display::refresh(); } -pub fn screen_boot_stage_2() { +pub fn screen_boot_stage_2(_fade_in: bool) { let mut frame = WelcomeScreen::new(false); frame.place(screen()); diff --git a/core/embed/rust/src/ui/layout_delizia/mod.rs b/core/embed/rust/src/ui/layout_delizia/mod.rs index 7541222d27..f70f61437f 100644 --- a/core/embed/rust/src/ui/layout_delizia/mod.rs +++ b/core/embed/rust/src/ui/layout_delizia/mod.rs @@ -65,7 +65,7 @@ impl CommonUI for UIDelizia { screens::screen_fatal_error(title, msg, footer); } - fn screen_boot_stage_2() { - screens::screen_boot_stage_2(); + fn screen_boot_stage_2(fade_in: bool) { + screens::screen_boot_stage_2(fade_in); } } diff --git a/core/embed/rust/src/ui/layout_delizia/screens.rs b/core/embed/rust/src/ui/layout_delizia/screens.rs index 86a62e6b2e..3b194be83e 100644 --- a/core/embed/rust/src/ui/layout_delizia/screens.rs +++ b/core/embed/rust/src/ui/layout_delizia/screens.rs @@ -18,7 +18,7 @@ pub fn screen_fatal_error(title: &str, msg: &str, footer: &str) { display::refresh(); } -pub fn screen_boot_stage_2() { +pub fn screen_boot_stage_2(_fade_in: bool) { let mut frame = WelcomeScreen::new(); frame.place(screen()); diff --git a/core/embed/rust/src/ui/ui_common.rs b/core/embed/rust/src/ui/ui_common.rs index 8bf6cf5480..e01fe817e3 100644 --- a/core/embed/rust/src/ui/ui_common.rs +++ b/core/embed/rust/src/ui/ui_common.rs @@ -25,5 +25,5 @@ pub trait CommonUI { fn screen_fatal_error(title: &str, msg: &str, footer: &str); - fn screen_boot_stage_2(); + fn screen_boot_stage_2(fade_in: bool); }