mirror of
https://github.com/Anshorei/epd-waveshare.git
synced 2026-10-03 22:06:43 +00:00
Migrate remaining drivers
This commit is contained in:
@@ -89,7 +89,7 @@ fn main() -> Result<(), std::io::Error> {
|
||||
display.clear_buffer(Color::White);
|
||||
|
||||
// draw a analog clock
|
||||
let _ = Circle::new(Point::new(64, 64), 40)
|
||||
let _ = Circle::with_center(Point::new(64, 64), 80)
|
||||
.into_styled(PrimitiveStyle::with_stroke(Black, 1))
|
||||
.draw(&mut display);
|
||||
let _ = Line::new(Point::new(64, 64), Point::new(30, 40))
|
||||
@@ -117,7 +117,7 @@ fn main() -> Result<(), std::io::Error> {
|
||||
.background_color(Black)
|
||||
.build();
|
||||
|
||||
let _ = Text::with_text_style("It's working-WoB!", Point::new(90, 40), style, text_style)
|
||||
let _ = Text::with_text_style("It's working\nWoB!", Point::new(90, 40), style, text_style)
|
||||
.draw(&mut display);
|
||||
|
||||
// Demonstrating how to use the partial refresh feature of the screen.
|
||||
|
||||
+3
-3
@@ -64,7 +64,7 @@ fn main() -> Result<(), std::io::Error> {
|
||||
let mut epd4in2 =
|
||||
Epd4in2::new(&mut spi, cs, busy, dc, rst, &mut delay).expect("eink initalize error");
|
||||
|
||||
//println!("Test all the rotations");
|
||||
println!("Test all the rotations");
|
||||
let mut display = Display4in2::default();
|
||||
|
||||
display.set_rotation(DisplayRotation::Rotate0);
|
||||
@@ -85,7 +85,7 @@ fn main() -> Result<(), std::io::Error> {
|
||||
.expect("display frame new graphics");
|
||||
delay.delay_ms(5000u16);
|
||||
|
||||
//println!("Now test new graphics with default rotation and some special stuff:");
|
||||
println!("Now test new graphics with default rotation and some special stuff");
|
||||
display.clear_buffer(Color::White);
|
||||
|
||||
// draw a analog clock
|
||||
@@ -94,7 +94,7 @@ fn main() -> Result<(), std::io::Error> {
|
||||
.stroke_width(1)
|
||||
.build();
|
||||
|
||||
let _ = Circle::new(Point::new(64, 64), 40)
|
||||
let _ = Circle::with_center(Point::new(64, 64), 80)
|
||||
.into_styled(style)
|
||||
.draw(&mut display);
|
||||
let _ = Line::new(Point::new(64, 64), Point::new(0, 64))
|
||||
|
||||
@@ -101,7 +101,7 @@ fn main() -> Result<(), std::io::Error> {
|
||||
.stroke_width(1)
|
||||
.build();
|
||||
|
||||
let _ = Circle::new(Point::new(64, 64), 64)
|
||||
let _ = Circle::with_center(Point::new(64, 64), 128)
|
||||
.into_styled(style)
|
||||
.draw(&mut display);
|
||||
let _ = Line::new(Point::new(64, 64), Point::new(0, 64))
|
||||
|
||||
Reference in New Issue
Block a user