Merge pull request #31 from VersBinarii/bump_eh_alpha

Bump embedded-hal to alpha7
This commit is contained in:
Yuri Iozzelli 2022-04-17 10:04:49 +02:00 committed by GitHub
commit 6e1fab6da7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 9 deletions

View file

@ -12,7 +12,7 @@ edition = "2018"
[dependencies] [dependencies]
display-interface = "0.4.1" display-interface = "0.4.1"
embedded-hal = "0.2.5" embedded-hal = "1.0.0-alpha.7"
[dependencies.embedded-graphics-core] [dependencies.embedded-graphics-core]
optional = true optional = true
@ -22,4 +22,3 @@ version = "0.3"
[features] [features]
default = ["graphics"] default = ["graphics"]
graphics = ["embedded-graphics-core"] graphics = ["embedded-graphics-core"]

View file

@ -25,8 +25,8 @@
//! ``` //! ```
//! //!
//! [display-interface-spi crate]: https://crates.io/crates/display-interface-spi //! [display-interface-spi crate]: https://crates.io/crates/display-interface-spi
use embedded_hal::blocking::delay::DelayMs; use embedded_hal::delay::blocking::DelayUs;
use embedded_hal::digital::v2::OutputPin; use embedded_hal::digital::blocking::OutputPin;
use core::iter::once; use core::iter::once;
use display_interface::DataFormat::{U16BEIter, U8Iter}; use display_interface::DataFormat::{U16BEIter, U8Iter};
@ -139,7 +139,7 @@ where
_display_size: SIZE, _display_size: SIZE,
) -> Result<Self> ) -> Result<Self>
where where
DELAY: DelayMs<u16>, DELAY: DelayUs,
SIZE: DisplaySize, SIZE: DisplaySize,
MODE: Mode, MODE: Mode,
{ {
@ -153,7 +153,7 @@ where
// Do hardware reset by holding reset low for at least 10us // Do hardware reset by holding reset low for at least 10us
ili9341.reset.set_low().map_err(|_| DisplayError::RSError)?; ili9341.reset.set_low().map_err(|_| DisplayError::RSError)?;
delay.delay_ms(1); let _ = delay.delay_ms(1);
// Set high for normal operation // Set high for normal operation
ili9341 ili9341
.reset .reset
@ -162,14 +162,14 @@ where
// Wait 5ms after reset before sending commands // Wait 5ms after reset before sending commands
// and 120ms before sending Sleep Out // and 120ms before sending Sleep Out
delay.delay_ms(5); let _ = delay.delay_ms(5);
// Do software reset // Do software reset
ili9341.command(Command::SoftwareReset, &[])?; ili9341.command(Command::SoftwareReset, &[])?;
// Wait 5ms after reset before sending commands // Wait 5ms after reset before sending commands
// and 120ms before sending Sleep Out // and 120ms before sending Sleep Out
delay.delay_ms(120); let _ = delay.delay_ms(120);
ili9341.set_orientation(mode)?; ili9341.set_orientation(mode)?;
@ -179,7 +179,7 @@ where
ili9341.command(Command::SleepOut, &[])?; ili9341.command(Command::SleepOut, &[])?;
// Wait 5ms after Sleep Out before sending commands // Wait 5ms after Sleep Out before sending commands
delay.delay_ms(5); let _ = delay.delay_ms(5);
ili9341.command(Command::DisplayOn, &[])?; ili9341.command(Command::DisplayOn, &[])?;