Apply cargo fmt

This commit is contained in:
Christoph Grabo
2020-01-11 13:17:47 +01:00
parent 80b3aa2c7c
commit 4ecee29641
3 changed files with 5 additions and 3 deletions
-1
View File
@@ -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,
+3 -1
View File
@@ -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(())