mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-24 15:28:10 +00:00
feat(core/rust): direct write to display memory for better performance on TT hardware
This commit is contained in:
parent
57b12c2807
commit
37d5597965
@ -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);
|
||||
|
@ -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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user