add precursor as a platform to ux-api

This commit is contained in:
bunnie 2025-02-21 17:43:23 +08:00
parent 5e258916da
commit 07563c44db
3 changed files with 15 additions and 0 deletions

View file

@ -1,3 +1,5 @@
pub const LINES: isize = 128;
pub const HEIGHT: usize = LINES as usize;
pub const WIDTH: isize = 128;
pub const FB_SIZE: usize = LINES as usize * WIDTH as usize / core::mem::size_of::<u32>();
pub const FB_WIDTH_WORDS: usize = WIDTH as usize / core::mem::size_of::<u32>();

View file

@ -7,3 +7,8 @@ pub use baosec::*;
mod baosor;
#[cfg(any(feature = "board-baosor", feature = "loader-baosor"))]
pub use baosor::*;
#[cfg(any(feature = "hosted", feature = "renode", feature = "precursor"))]
mod precursor;
#[cfg(any(feature = "hosted", feature = "renode", feature = "precursor"))]
pub use precursor::*;

View file

@ -0,0 +1,8 @@
pub const LINES: isize = 536;
pub const WIDTH: isize = 336;
pub const HEIGHT: isize = LINES;
pub const FB_WIDTH_WORDS: usize = 11;
pub const FB_WIDTH_PIXELS: usize = WIDTH as usize;
pub const FB_LINES: usize = LINES as usize;
pub const FB_SIZE: usize = FB_WIDTH_WORDS * FB_LINES; // 44 bytes by 536 lines