mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-04 03:40:58 +00:00
fix(core): add fade-in to boot stage 2 screen if backlight was reset
[no changelog]
This commit is contained in:
parent
e2035e1c06
commit
411e8779f7
@ -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
|
||||
|
@ -17,6 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <trezor_model.h>
|
||||
#include <trezor_rtl.h>
|
||||
|
||||
#include "py/builtin.h"
|
||||
@ -32,6 +33,7 @@
|
||||
#include "ports/stm32/gccollect.h"
|
||||
#include "ports/stm32/pendsv.h"
|
||||
|
||||
#include <io/display.h>
|
||||
#include <sys/linker_utils.h>
|
||||
#include <sys/systask.h>
|
||||
#include <sys/system.h>
|
||||
@ -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);
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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());
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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());
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user