diff --git a/src/epd7in5_v2/command.rs b/src/epd7in5_v2/command.rs index 121f8b5..c239eda 100644 --- a/src/epd7in5_v2/command.rs +++ b/src/epd7in5_v2/command.rs @@ -129,7 +129,6 @@ pub(crate) enum Command { READ_VCOM_VALUE = 0x81, /// This command sets `VCOM_DC` value. VCM_DC_SETTING = 0x82, - // /// This is in all the Waveshare controllers for EPD7in5, but it's not documented // /// anywhere in the datasheet `¯\_(ツ)_/¯` // FLASH_MODE = 0xE5, diff --git a/src/epd7in5_v2/mod.rs b/src/epd7in5_v2/mod.rs index ba42a72..e1d95ca 100644 --- a/src/epd7in5_v2/mod.rs +++ b/src/epd7in5_v2/mod.rs @@ -217,7 +217,9 @@ where { fn update_and_display_frame(&mut self, spi: &mut SPI, buffer: &[u8]) -> Result<(), SPI::Error> { self.command(spi, Command::DATA_START_TRANSMISSION_2)?; - for b in buffer { self.send_data(spi, &[255 - b])?; } + for b in buffer { + self.send_data(spi, &[255 - b])?; + } self.command(spi, Command::DISPLAY_REFRESH)?; self.wait_until_idle(); Ok(()) diff --git a/src/interface.rs b/src/interface.rs index d250f36..2f7c8ee 100644 --- a/src/interface.rs +++ b/src/interface.rs @@ -151,7 +151,8 @@ where /// Most likely there was a mistake with the 2in9 busy connection /// //TODO: use the #cfg feature to make this compile the right way for the certain types pub(crate) fn is_busy(&self, is_busy_low: bool) -> bool { - (is_busy_low && self.busy.is_low().unwrap_or(false)) || (!is_busy_low && self.busy.is_high().unwrap_or(false)) + (is_busy_low && self.busy.is_low().unwrap_or(false)) + || (!is_busy_low && self.busy.is_high().unwrap_or(false)) } /// Resets the device.