Browse Source

Fix previous Delay Commit

Some stuff was forgotten in the previous commit
embedded-hal-1.0
Chris 7 years ago
parent
commit
2f4ebfecab
  1. 3
      src/epd1in54/mod.rs
  2. 2
      src/epd2in9/mod.rs
  3. 3
      src/epd4in2/mod.rs
  4. 6
      src/traits/mod.rs

3
src/epd1in54/mod.rs

@ -94,7 +94,7 @@ where
}
impl<SPI, CS, BUSY, DC, RST, Delay, E> WaveshareInterface<SPI, CS, BUSY, DC, RST, E>
impl<SPI, CS, BUSY, DC, RST, E> WaveshareInterface<SPI, CS, BUSY, DC, RST, E>
for EPD1in54<SPI, CS, BUSY, DC, RST>
where
SPI: Write<u8, Error = E>,
@ -102,7 +102,6 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
Delay: DelayUs<u16> + DelayMs<u16>,
{
fn width(&self) -> u16 {
WIDTH

2
src/epd2in9/mod.rs

@ -189,7 +189,7 @@ where
}
}
impl<SPI, CS, BUSY, DC, RST, D, E> EPD2in9<SPI, CS, BUSY, DC, RST>
impl<SPI, CS, BUSY, DC, RST, E> EPD2in9<SPI, CS, BUSY, DC, RST>
where
SPI: Write<u8, Error = E>,
CS: OutputPin,

3
src/epd4in2/mod.rs

@ -285,14 +285,13 @@ where
}
}
impl<SPI, CS, BUSY, DC, RST, D, ERR> EPD4in2<SPI, CS, BUSY, DC, RST>
impl<SPI, CS, BUSY, DC, RST, ERR> EPD4in2<SPI, CS, BUSY, DC, RST>
where
SPI: Write<u8, Error = ERR>,
CS: OutputPin,
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
D: DelayUs<u16> + DelayMs<u16>,
{
fn command(&mut self, command: Command) -> Result<(), ERR> {
self.interface.cmd(command)

6
src/traits/mod.rs

@ -61,8 +61,8 @@ where
/// Creates a new driver from a SPI peripheral, CS Pin, Busy InputPin, DC
///
/// This already initialises the device. That means [init()](WaveshareInterface::init()) isn't needed directly afterwards
fn new<DELAY: DelayUs<u8>>(
spi: SPI, cs: CS, busy: BUSY, dc: DC, rst: RST, delay: DELAY,
fn new<DELAY: DelayMs<u8>>(
spi: SPI, cs: CS, busy: BUSY, dc: DC, rst: RST, delay: &mut DELAY,
) -> Result<Self, ERR>
where
Self: Sized;
@ -75,7 +75,7 @@ where
/// and initialising which already contains the reset
fn sleep(&mut self) -> Result<(), ERR>;
fn wake_up(&mut self) -> Result<(), ERR>;
fn wake_up<DELAY: DelayMs<u8>>(&mut self, delay: &mut DELAY) -> Result<(), ERR>;
/// Sets the backgroundcolor for various commands like [clear_frame()](WaveshareInterface::clear_frame())

Loading…
Cancel
Save