mirror of
https://github.com/Anshorei/epd-waveshare.git
synced 2026-10-03 22:06:43 +00:00
"EPD4in2: Don't set the resolution (and some more) over and over again.
If the resolution ever changes, something has horribly gone wrong." From @mgottschlag #48
This commit is contained in:
+9
-9
@@ -132,6 +132,15 @@ where
|
|||||||
// 3A 100HZ 29 150Hz 39 200HZ 31 171HZ DEFAULT: 3c 50Hz
|
// 3A 100HZ 29 150Hz 39 200HZ 31 171HZ DEFAULT: 3c 50Hz
|
||||||
self.cmd_with_data(spi, Command::PLL_CONTROL, &[0x3A])?;
|
self.cmd_with_data(spi, Command::PLL_CONTROL, &[0x3A])?;
|
||||||
|
|
||||||
|
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.set_lut(spi, None)?;
|
self.set_lut(spi, None)?;
|
||||||
|
|
||||||
self.wait_until_idle();
|
self.wait_until_idle();
|
||||||
@@ -202,15 +211,6 @@ where
|
|||||||
self.wait_until_idle();
|
self.wait_until_idle();
|
||||||
let color_value = self.color.get_byte_value();
|
let color_value = self.color.get_byte_value();
|
||||||
|
|
||||||
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
|
self.interface
|
||||||
.cmd(spi, Command::DATA_START_TRANSMISSION_1)?;
|
.cmd(spi, Command::DATA_START_TRANSMISSION_1)?;
|
||||||
self.interface
|
self.interface
|
||||||
|
|||||||
Reference in New Issue
Block a user