add a empty screen first

embedded-hal-1.0
Chris 2018-10-24 08:11:10 +02:00
parent c98c058c5a
commit f06b672899
1 changed files with 3 additions and 0 deletions

View File

@ -128,6 +128,9 @@ fn run() -> Result<(), std::io::Error> {
println!("Test all the rotations"); println!("Test all the rotations");
let mut buffer = Buffer2in9::default(); let mut buffer = Buffer2in9::default();
let mut display = Display::new(epd.width(), epd.height(), &mut buffer.buffer); let mut display = Display::new(epd.width(), epd.height(), &mut buffer.buffer);
epd.update_frame(&mut spi, display.buffer()).unwrap();
epd.display_frame(&mut spi);
display.set_rotation(DisplayRotation::Rotate0); display.set_rotation(DisplayRotation::Rotate0);
display.draw( display.draw(
Font6x8::render_str("Rotate 0!") Font6x8::render_str("Rotate 0!")