add a clear routine for the sh1107 frame buffer

This commit is contained in:
bunnie 2024-10-10 02:03:59 +08:00
parent 2d8747605c
commit 091082dfcc

View file

@ -321,6 +321,8 @@ impl<'a> Oled128x128<'a> {
}
}
pub fn clear(&mut self) { self.buffer_mut().fill(0); }
pub fn put_pixel(&mut self, x: u8, y: u8, on: bool) {
if x > COLUMN || y > ROW {
return;