mirror of
https://github.com/LegitCamper/picocalc-os-rs.git
synced 2025-12-27 07:45:28 +00:00
fix text not showing up right away
This commit is contained in:
@@ -23,7 +23,6 @@ use st7365p_lcd::{FrameBuffer, ST7365P};
|
|||||||
|
|
||||||
const SCREEN_WIDTH: usize = 320;
|
const SCREEN_WIDTH: usize = 320;
|
||||||
const SCREEN_HEIGHT: usize = 320;
|
const SCREEN_HEIGHT: usize = 320;
|
||||||
const REFRESH_INTERVAL_MS: u64 = 20;
|
|
||||||
|
|
||||||
pub static DISPLAY_SIGNAL: Signal<ThreadModeRawMutex, ()> = Signal::new();
|
pub static DISPLAY_SIGNAL: Signal<ThreadModeRawMutex, ()> = Signal::new();
|
||||||
|
|
||||||
@@ -52,6 +51,8 @@ pub async fn display_handler(
|
|||||||
framebuffer.draw(&mut display).await.unwrap();
|
framebuffer.draw(&mut display).await.unwrap();
|
||||||
display.set_on().await.unwrap();
|
display.set_on().await.unwrap();
|
||||||
|
|
||||||
|
DISPLAY_SIGNAL.signal(());
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
DISPLAY_SIGNAL.wait().await;
|
DISPLAY_SIGNAL.wait().await;
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,6 @@ async fn main(_spawner: Spawner) {
|
|||||||
}
|
}
|
||||||
DISPLAY_SIGNAL.signal(());
|
DISPLAY_SIGNAL.signal(());
|
||||||
}
|
}
|
||||||
Timer::after_millis(10).await;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
display_handler(spi1, p.PIN_13, p.PIN_14, p.PIN_15),
|
display_handler(spi1, p.PIN_13, p.PIN_14, p.PIN_15),
|
||||||
|
|||||||
Reference in New Issue
Block a user