From 648e1b53198d6c5d5cc2a18e0cc743689fd66ede Mon Sep 17 00:00:00 2001 From: tychovrahe Date: Mon, 25 Sep 2023 17:13:11 +0200 Subject: [PATCH] fixup! feat(core): add basic support for efficient frame buffer graphics --- core/embed/rust/src/trezorhal/display.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/embed/rust/src/trezorhal/display.rs b/core/embed/rust/src/trezorhal/display.rs index 703a65b2653..26be093a813 100644 --- a/core/embed/rust/src/trezorhal/display.rs +++ b/core/embed/rust/src/trezorhal/display.rs @@ -107,8 +107,8 @@ pub fn pixeldata(c: u16) { pub fn pixel(fb: u32, x: i16, y: i16, c: u16) { unsafe { let addr = fb - + ((y as u32 + DISPLAY_FRAMEBUFFER_OFFSET_Y) as u32 * DISPLAY_FRAMEBUFFER_WIDTH - + (x as u32 + DISPLAY_FRAMEBUFFER_OFFSET_X) as u32) + + ((y as u32 + DISPLAY_FRAMEBUFFER_OFFSET_Y) * DISPLAY_FRAMEBUFFER_WIDTH + + (x as u32 + DISPLAY_FRAMEBUFFER_OFFSET_X)) * 2; let ptr = addr as *mut u16; ptr.write_volatile(c); @@ -120,8 +120,8 @@ pub fn pixel(fb: u32, x: i16, y: i16, c: u16) { pub fn pixel(fb: u32, x: i16, y: i16, c: u32) { unsafe { let addr = fb - + ((y as u32 + DISPLAY_FRAMEBUFFER_OFFSET_Y) as u32 * DISPLAY_FRAMEBUFFER_WIDTH - + (x as u32 + DISPLAY_FRAMEBUFFER_OFFSET_X) as u32) + + ((y as u32 + DISPLAY_FRAMEBUFFER_OFFSET_Y) * DISPLAY_FRAMEBUFFER_WIDTH + + (x as u32 + DISPLAY_FRAMEBUFFER_OFFSET_X)) * 4; let ptr = addr as *mut u32; ptr.write_volatile(c);