Browse Source

small epd removel update

embedded-hal-1.0
Christoph Groß 7 years ago
parent
commit
5c8972ec46
  1. 10
      src/epd1in54/mod.rs
  2. 8
      src/epd2in9/mod.rs

10
src/epd1in54/mod.rs

@ -22,10 +22,7 @@
const WIDTH: u16 = 200; const WIDTH: u16 = 200;
const HEIGHT: u16 = 200; const HEIGHT: u16 = 200;
const DPI: u16 = 184; const DPI: u16 = 184;
const DEFAULT_BACKGROUND_COLOR: Color = Color::White;
use epds::EPD;
use hal::{ use hal::{
blocking::{ blocking::{
@ -100,11 +97,8 @@ where
fn new( fn new(
interface: ConnectionInterface<SPI, CS, BUSY, DataCommand, RST, Delay> interface: ConnectionInterface<SPI, CS, BUSY, DataCommand, RST, Delay>
) -> Result<Self, E> { ) -> Result<Self, E> {
let epd = EPD::new(WIDTH, HEIGHT);
let background_color = Color::White;
let mut epd = EPD1in54 {interface, /*epd,*/ background_color};
let mut epd = EPD1in54 {interface, background_color: DEFAULT_BACKGROUND_COLOR};
epd.init()?; epd.init()?;

8
src/epd2in9/mod.rs

@ -21,9 +21,7 @@
const WIDTH: u16 = 128; const WIDTH: u16 = 128;
const HEIGHT: u16 = 296; const HEIGHT: u16 = 296;
const DEFAULT_BACKGROUND_COLOR: Color = Color::White;
use epds::EPD;
use hal::{ use hal::{
blocking::{ blocking::{
@ -100,9 +98,9 @@ where
interface: ConnectionInterface<SPI, CS, BUSY, DataCommand, RST, Delay> interface: ConnectionInterface<SPI, CS, BUSY, DataCommand, RST, Delay>
) -> Result<Self, E> { ) -> Result<Self, E> {
//let epd = EPD::new(WIDTH, HEIGHT); //let epd = EPD::new(WIDTH, HEIGHT);
let background_color = Color::White; //let background_color = Color::White;
let mut epd = EPD2in9 {interface, /*epd,*/ background_color}; let mut epd = EPD2in9 {interface, background_color: DEFAULT_BACKGROUND_COLOR};
epd.init()?; epd.init()?;

Loading…
Cancel
Save