Browse Source

Apply #48 to QuickRefresh as well

main
Caemor 5 years ago
parent
commit
788ddcab98
  1. 16
      src/epd4in2/mod.rs

16
src/epd4in2/mod.rs

@ -450,14 +450,6 @@ where
fn update_old_frame(&mut self, spi: &mut SPI, buffer: &[u8]) -> Result<(), SPI::Error> {
self.wait_until_idle();
// todo: Eval if you need these 3 res setting items.
self.send_resolution(spi)?;
self.interface
.cmd_with_data(spi, Command::VCM_DC_SETTING, &[0x12])?;
//VBDF 17|D7 VBDW 97 VBDB 57 VBDF F7 VBDW 77 VBDB 37 VBDR B7
self.interface
.cmd_with_data(spi, Command::VCOM_AND_DATA_INTERVAL_SETTING, &[0x97])?;
self.interface
.cmd(spi, Command::DATA_START_TRANSMISSION_1)?;
@ -490,14 +482,6 @@ where
) -> Result<(), SPI::Error> {
self.wait_until_idle();
// todo: Eval if you need these 3 res setting items.
self.send_resolution(spi)?;
self.interface
.cmd_with_data(spi, Command::VCM_DC_SETTING, &[0x12])?;
//VBDF 17|D7 VBDW 97 VBDB 57 VBDF F7 VBDW 77 VBDB 37 VBDR B7
self.interface
.cmd_with_data(spi, Command::VCOM_AND_DATA_INTERVAL_SETTING, &[0x97])?;
if buffer.len() as u32 != width / 8 * height {
//TODO: panic!! or sth like that
//return Err("Wrong buffersize");

Loading…
Cancel
Save