Apply cargo fmt
parent
80b3aa2c7c
commit
4ecee29641
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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(())
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue