working dynamically loaded app
This commit is contained in:
@@ -9,6 +9,7 @@ use embassy_time::{Delay, Timer};
|
||||
use embedded_graphics::{
|
||||
draw_target::DrawTarget,
|
||||
pixelcolor::{Rgb565, RgbColor},
|
||||
prelude::Dimensions,
|
||||
};
|
||||
use embedded_hal_bus::spi::ExclusiveDevice;
|
||||
use st7365p_lcd::ST7365P;
|
||||
@@ -48,8 +49,11 @@ pub async fn init_display(
|
||||
display
|
||||
}
|
||||
|
||||
pub async fn clear_fb() {
|
||||
unsafe { FRAMEBUFFER.clear(Rgb565::BLACK).unwrap() }
|
||||
pub fn clear_fb() {
|
||||
let bounds = unsafe { FRAMEBUFFER.bounding_box() };
|
||||
unsafe {
|
||||
let _ = FRAMEBUFFER.fill_solid(&bounds, Rgb565::BLACK);
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn display_handler(mut display: DISPLAY) {
|
||||
|
||||
@@ -29,7 +29,7 @@ static mut BUFFER: [u16; SIZE] = [0; SIZE];
|
||||
static mut DIRTY_TILES: LazyLock<Vec<AtomicBool, TILE_COUNT>> = LazyLock::new(|| {
|
||||
let mut tiles = Vec::new();
|
||||
for _ in 0..TILE_COUNT {
|
||||
tiles.push(AtomicBool::new(true));
|
||||
tiles.push(AtomicBool::new(true)).unwrap();
|
||||
}
|
||||
tiles
|
||||
});
|
||||
|
||||
@@ -143,7 +143,7 @@ async fn userland_task() {
|
||||
*state = TaskState::Kernel;
|
||||
}
|
||||
|
||||
// clear_fb().await; // blocks future exec?
|
||||
// clear_fb();
|
||||
|
||||
defmt::info!("Executing Binary");
|
||||
entry().await;
|
||||
|
||||
Reference in New Issue
Block a user