send full buffer instead of loop
parent
526db5dace
commit
b7fe5674ee
|
|
@ -112,7 +112,7 @@ fn run() -> Result<(), std::io::Error> {
|
||||||
|
|
||||||
//TODO: wait for Digital::InputPin
|
//TODO: wait for Digital::InputPin
|
||||||
//fixed currently with the HackInputPin, see further above
|
//fixed currently with the HackInputPin, see further above
|
||||||
let mut epd4in2 = EPD4in2::new(&mut spi, cs, busy_in, dc, rst, &mut delay).expect("eink inialize error");
|
let mut epd4in2 = EPD4in2::new(&mut spi, cs, busy_in, dc, rst, &mut delay).expect("eink initalize error");
|
||||||
|
|
||||||
//let mut buffer = [0u8, epd4in2.get_width() / 8 * epd4in2.get_height()];
|
//let mut buffer = [0u8, epd4in2.get_width() / 8 * epd4in2.get_height()];
|
||||||
let mut buffer = [0u8; 15000];
|
let mut buffer = [0u8; 15000];
|
||||||
|
|
|
||||||
|
|
@ -192,9 +192,10 @@ where
|
||||||
|
|
||||||
|
|
||||||
self.command(spi, Command::DATA_START_TRANSMISSION_1)?;
|
self.command(spi, Command::DATA_START_TRANSMISSION_1)?;
|
||||||
for _ in 0..buffer.len() {
|
self.send_data(spi, &[color_value; WIDTH as usize / 8 * HEIGHT as usize]);
|
||||||
self.send_data(spi, &[color_value])?;
|
//for _ in 0..buffer.len() {
|
||||||
}
|
// self.send_data(spi, &[color_value])?;
|
||||||
|
//}
|
||||||
|
|
||||||
//TODO: Removal of delay. TEST!
|
//TODO: Removal of delay. TEST!
|
||||||
//self.delay_ms(2);
|
//self.delay_ms(2);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue