mirror of
https://github.com/yuri91/ili9341-rs.git
synced 2024-11-21 14:30:58 +00:00
Bump embedded-hal to alpha7
This commit is contained in:
parent
8aeefc4abc
commit
b0f3b14664
2 changed files with 8 additions and 9 deletions
|
@ -12,7 +12,7 @@ edition = "2018"
|
|||
|
||||
[dependencies]
|
||||
display-interface = "0.4.1"
|
||||
embedded-hal = "0.2.5"
|
||||
embedded-hal = "1.0.0-alpha.7"
|
||||
|
||||
[dependencies.embedded-graphics-core]
|
||||
optional = true
|
||||
|
@ -22,4 +22,3 @@ version = "0.3"
|
|||
[features]
|
||||
default = ["graphics"]
|
||||
graphics = ["embedded-graphics-core"]
|
||||
|
||||
|
|
14
src/lib.rs
14
src/lib.rs
|
@ -25,8 +25,8 @@
|
|||
//! ```
|
||||
//!
|
||||
//! [display-interface-spi crate]: https://crates.io/crates/display-interface-spi
|
||||
use embedded_hal::blocking::delay::DelayMs;
|
||||
use embedded_hal::digital::v2::OutputPin;
|
||||
use embedded_hal::delay::blocking::DelayUs;
|
||||
use embedded_hal::digital::blocking::OutputPin;
|
||||
|
||||
use core::iter::once;
|
||||
use display_interface::DataFormat::{U16BEIter, U8Iter};
|
||||
|
@ -139,7 +139,7 @@ where
|
|||
_display_size: SIZE,
|
||||
) -> Result<Self>
|
||||
where
|
||||
DELAY: DelayMs<u16>,
|
||||
DELAY: DelayUs,
|
||||
SIZE: DisplaySize,
|
||||
MODE: Mode,
|
||||
{
|
||||
|
@ -153,7 +153,7 @@ where
|
|||
|
||||
// Do hardware reset by holding reset low for at least 10us
|
||||
ili9341.reset.set_low().map_err(|_| DisplayError::RSError)?;
|
||||
delay.delay_ms(1);
|
||||
let _ = delay.delay_ms(1);
|
||||
// Set high for normal operation
|
||||
ili9341
|
||||
.reset
|
||||
|
@ -162,14 +162,14 @@ where
|
|||
|
||||
// Wait 5ms after reset before sending commands
|
||||
// and 120ms before sending Sleep Out
|
||||
delay.delay_ms(5);
|
||||
let _ = delay.delay_ms(5);
|
||||
|
||||
// Do software reset
|
||||
ili9341.command(Command::SoftwareReset, &[])?;
|
||||
|
||||
// Wait 5ms after reset before sending commands
|
||||
// and 120ms before sending Sleep Out
|
||||
delay.delay_ms(120);
|
||||
let _ = delay.delay_ms(120);
|
||||
|
||||
ili9341.set_orientation(mode)?;
|
||||
|
||||
|
@ -179,7 +179,7 @@ where
|
|||
ili9341.command(Command::SleepOut, &[])?;
|
||||
|
||||
// Wait 5ms after Sleep Out before sending commands
|
||||
delay.delay_ms(5);
|
||||
let _ = delay.delay_ms(5);
|
||||
|
||||
ili9341.command(Command::DisplayOn, &[])?;
|
||||
|
||||
|
|
Loading…
Reference in a new issue