diff --git a/firmware/rust/src/lcd.rs b/firmware/rust/src/lcd.rs index 2d89a1d..49adb06 100644 --- a/firmware/rust/src/lcd.rs +++ b/firmware/rust/src/lcd.rs @@ -69,26 +69,6 @@ impl Lcd { block!(self.spi.send(0xB0 + page)).unwrap(); } - fn clear(&mut self) { - let mut delay = Delay::::new(); - - for page in 0..8 { - self.move_cursor(0, page as u8); - - // TODO: This delay fixes issues, try find a better solution - delay.delay_ms(1_u8); - self.cd.set_high(); - - for _ in 0..102 { - block!(self.spi.send(0x00)).unwrap(); - } - - // TODO: This delay fixes issues, try find a better solution - delay.delay_ms(1_u8); - self.cd.set_low(); - } - } - fn fill(&mut self, segment: u8, page: u8, width: u8, data: u8) { assert!(segment + width <= 102); let mut delay = Delay::::new(); @@ -203,7 +183,7 @@ impl Lcd { pub fn draw(&mut self, screen: &Screens) { interrupt::free(|_cs| { - self.clear(); + self.fill_area(0, 0, 102, 8, 0x00); match screen { Screens::Splash(splash) => {