Not all Type A screens are completly the same to the change to bring it all together was reverted.

This commit is contained in:
Christoph Groß
2018-08-06 13:34:33 +02:00
parent 230fb947cb
commit 6422142133
13 changed files with 689 additions and 62 deletions
+9 -2
View File
@@ -5,7 +5,13 @@ extern crate linux_embedded_hal as lin_hal;
extern crate eink_waveshare_rs;
use eink_waveshare_rs::{epd4in2::EPD4in2, drawing::{Graphics, color::Color}, interface::WaveshareInterface};
use eink_waveshare_rs::{
epd4in2::{EPD4in2, self},
drawing::{Graphics, color::Color},
interface::{
WaveshareInterface,
connection_interface::ConnectionInterface},
};
use lin_hal::spidev::{self, SpidevOptions};
use lin_hal::{Pin, Spidev};
@@ -99,7 +105,8 @@ fn main() {
//TODO: wait for Digital::InputPin
//fixed currently with the HackInputPin, see further above
let mut epd4in2 = EPD4in2::new(spi, cs, busy_in, dc, rst, delay).expect("eink inialize error");
let connection_interface = ConnectionInterface::new(spi, cs, busy_in, dc, rst, delay);
let mut epd4in2 = EPD4in2::new(connection_interface, epd4in2::new()).expect("eink inialize error");
//let mut buffer = [0u8, epd4in2.get_width() / 8 * epd4in2.get_height()];
let mut buffer = [0u8; 15000];