Browse Source

reverse color change

embedded-hal-1.0
Chris 7 years ago
parent
commit
591d25f74a
  1. 2
      examples/embedded_linux_epd4in2/src/main.rs
  2. 6
      src/drawing.rs

2
examples/embedded_linux_epd4in2/src/main.rs

@ -351,7 +351,7 @@ fn run() -> Result<(), std::io::Error> {
epd4in2.update_frame(&mut spi, &display.buffer()).unwrap();
epd4in2.display_frame(&mut spi).expect("display frame new graphics");
if i >= 20 {
if i >= limit {
break;
}

6
src/drawing.rs

@ -98,12 +98,10 @@ impl Drawing<Color> for DisplayEink42BlackWhite {
match color {
Color::Black => {
//self.buffer[idx] &= !bit;
self.buffer[idx] |= bit;
self.buffer[idx] &= !bit;
}
Color::White => {
//self.buffer[idx] |= bit;
self.buffer[idx] &= !bit;
self.buffer[idx] |= bit;
}
}
}

Loading…
Cancel
Save