Further improvements around acronym lowercases,...

This commit is contained in:
Caemor
2021-04-11 21:21:39 +02:00
parent 9d95eeb64b
commit 15e557951f
30 changed files with 200 additions and 200 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
#![deny(warnings)]
use embedded_hal::prelude::*;
use epd_waveshare::{epd1in54::EPD1in54, prelude::*};
use epd_waveshare::{epd1in54::Epd1in54, prelude::*};
use linux_embedded_hal::{
spidev::{self, SpidevOptions},
sysfs_gpio::Direction,
@@ -58,14 +58,14 @@ fn main() -> Result<(), std::io::Error> {
// Setup of the needed pins is finished here
// Now the "real" usage of the eink-waveshare-rs crate begins
let mut epd = EPD1in54::new(&mut spi, cs_pin, busy, dc, rst, &mut delay)?;
let mut epd = Epd1in54::new(&mut spi, cs_pin, busy, dc, rst, &mut delay)?;
// Clear the full screen
epd.clear_frame(&mut spi)?;
epd.display_frame(&mut spi)?;
// Speeddemo
epd.set_lut(&mut spi, Some(RefreshLUT::QUICK))?;
epd.set_lut(&mut spi, Some(RefreshLut::Quick))?;
let small_buffer = [Color::Black.get_byte_value(); 32]; //16x16
let number_of_runs = 1;
for i in 0..number_of_runs {
+3 -3
View File
@@ -10,7 +10,7 @@ use embedded_graphics::{
use embedded_hal::prelude::*;
use epd_waveshare::{
color::*,
epd2in13_v2::{Display2in13, EPD2in13},
epd2in13_v2::{Display2in13, Epd2in13},
graphics::{Display, DisplayRotation},
prelude::*,
};
@@ -63,7 +63,7 @@ fn main() -> Result<(), std::io::Error> {
let mut delay = Delay {};
let mut epd2in13 =
EPD2in13::new(&mut spi, cs, busy, dc, rst, &mut delay).expect("eink initalize error");
Epd2in13::new(&mut spi, cs, busy, dc, rst, &mut delay).expect("eink initalize error");
//println!("Test all the rotations");
let mut display = Display2in13::default();
@@ -121,7 +121,7 @@ fn main() -> Result<(), std::io::Error> {
// Demonstrating how to use the partial refresh feature of the screen.
// Real animations can be used.
epd2in13
.set_refresh(&mut spi, &mut delay, RefreshLUT::QUICK)
.set_refresh(&mut spi, &mut delay, RefreshLut::Quick)
.unwrap();
epd2in13.clear_frame(&mut spi).unwrap();
+3 -3
View File
@@ -10,7 +10,7 @@ use embedded_graphics::{
use embedded_hal::prelude::*;
use epd_waveshare::{
color::*,
epd4in2::{Display4in2, EPD4in2},
epd4in2::{Display4in2, Epd4in2},
graphics::{Display, DisplayRotation},
prelude::*,
};
@@ -63,7 +63,7 @@ fn main() -> Result<(), std::io::Error> {
let mut delay = Delay {};
let mut epd4in2 =
EPD4in2::new(&mut spi, cs, busy, dc, rst, &mut delay).expect("eink initalize error");
Epd4in2::new(&mut spi, cs, busy, dc, rst, &mut delay).expect("eink initalize error");
//println!("Test all the rotations");
let mut display = Display4in2::default();
@@ -120,7 +120,7 @@ fn main() -> Result<(), std::io::Error> {
// a moving `Hello World!`
let limit = 10;
epd4in2.set_lut(&mut spi, Some(RefreshLUT::QUICK)).unwrap();
epd4in2.set_lut(&mut spi, Some(RefreshLut::Quick)).unwrap();
epd4in2.clear_frame(&mut spi).unwrap();
for i in 0..limit {
//println!("Moving Hello World. Loop {} from {}", (i + 1), limit);
+2 -2
View File
@@ -11,7 +11,7 @@ use embedded_graphics::{
use embedded_hal::prelude::*;
use epd_waveshare::{
color::*,
epd4in2::{self, EPD4in2},
epd4in2::{self, Epd4in2},
graphics::{Display, DisplayRotation, VarDisplay},
prelude::*,
};
@@ -64,7 +64,7 @@ fn main() -> Result<(), std::io::Error> {
let mut delay = Delay {};
let mut epd4in2 =
EPD4in2::new(&mut spi, cs, busy, dc, rst, &mut delay).expect("eink initalize error");
Epd4in2::new(&mut spi, cs, busy, dc, rst, &mut delay).expect("eink initalize error");
println!("Test all the rotations");