mirror of
https://github.com/Anshorei/epd-waveshare.git
synced 2026-10-03 22:06:43 +00:00
run cargo fmt
This commit is contained in:
@@ -45,7 +45,7 @@ fn main() -> Result<(), std::io::Error> {
|
|||||||
// Configure Digital I/O Pin to be used as Chip Select for SPI
|
// Configure Digital I/O Pin to be used as Chip Select for SPI
|
||||||
let cs = Pin::new(26); // CE0, board J-24, GPIO 8 -> doesn work. use this from 2in19 example which works
|
let cs = Pin::new(26); // CE0, board J-24, GPIO 8 -> doesn work. use this from 2in19 example which works
|
||||||
cs.export().expect("cs export");
|
cs.export().expect("cs export");
|
||||||
while !cs.is_exported() { }
|
while !cs.is_exported() {}
|
||||||
cs.set_direction(Direction::Out).expect("CS Direction");
|
cs.set_direction(Direction::Out).expect("CS Direction");
|
||||||
cs.set_value(1).expect("CS Value set to 1");
|
cs.set_value(1).expect("CS Value set to 1");
|
||||||
|
|
||||||
@@ -80,7 +80,8 @@ fn main() -> Result<(), std::io::Error> {
|
|||||||
display.set_rotation(DisplayRotation::Rotate270);
|
display.set_rotation(DisplayRotation::Rotate270);
|
||||||
draw_text(&mut display, "Rotation 270!", 5, 50);
|
draw_text(&mut display, "Rotation 270!", 5, 50);
|
||||||
|
|
||||||
epd2in13.update_and_display_frame(&mut spi, &display.buffer(), &mut delay)
|
epd2in13
|
||||||
|
.update_and_display_frame(&mut spi, &display.buffer(), &mut delay)
|
||||||
.expect("display frame new graphics");
|
.expect("display frame new graphics");
|
||||||
|
|
||||||
println!("First frame done. Waiting 5s");
|
println!("First frame done. Waiting 5s");
|
||||||
|
|||||||
Reference in New Issue
Block a user