diff --git a/core/embed/rust/src/trezorhal/display.rs b/core/embed/rust/src/trezorhal/display.rs index d2831a42bb..1dcfc5bfb7 100644 --- a/core/embed/rust/src/trezorhal/display.rs +++ b/core/embed/rust/src/trezorhal/display.rs @@ -108,6 +108,17 @@ pub fn loader( } } +#[inline(always)] +#[cfg(all(feature = "model_tt", target_arch = "arm"))] +pub fn pixeldata(c: u16) { + unsafe { + ffi::DISPLAY_DATA_ADDRESS.write_volatile((c >> 8) as u8); + ffi::DISPLAY_DATA_ADDRESS.write_volatile((c & 0xff) as u8); + } +} + +#[inline(always)] +#[cfg(not(all(feature = "model_tt", target_arch = "arm")))] pub fn pixeldata(c: u16) { unsafe { ffi::display_pixeldata(c); diff --git a/core/embed/rust/src/ui/display.rs b/core/embed/rust/src/ui/display.rs index 74d0bbf342..9a12c3999d 100644 --- a/core/embed/rust/src/ui/display.rs +++ b/core/embed/rust/src/ui/display.rs @@ -183,6 +183,7 @@ pub fn text_right(baseline: Point, text: &str, font: Font, fg_color: Color, bg_c ); } +#[inline(always)] pub fn pixeldata(color: Color) { display::pixeldata(color.into()); }