diff --git a/src/display.rs b/src/display.rs index cafcc75..7ec99b6 100644 --- a/src/display.rs +++ b/src/display.rs @@ -23,7 +23,6 @@ use st7365p_lcd::{FrameBuffer, ST7365P}; const SCREEN_WIDTH: usize = 320; const SCREEN_HEIGHT: usize = 320; -const REFRESH_INTERVAL_MS: u64 = 20; pub static DISPLAY_SIGNAL: Signal = Signal::new(); @@ -52,6 +51,8 @@ pub async fn display_handler( framebuffer.draw(&mut display).await.unwrap(); display.set_on().await.unwrap(); + DISPLAY_SIGNAL.signal(()); + loop { DISPLAY_SIGNAL.wait().await; diff --git a/src/main.rs b/src/main.rs index 41fee93..684d8d0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -73,7 +73,6 @@ async fn main(_spawner: Spawner) { } DISPLAY_SIGNAL.signal(()); } - Timer::after_millis(10).await; } }, display_handler(spi1, p.PIN_13, p.PIN_14, p.PIN_15),