Skip to content

Commit f0387d4

Browse files
committed
add embedded-hal 1.0.0-alpha.7 support
1 parent d61f3e7 commit f0387d4

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

spi/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "display-interface-spi"
33
description = "Generic SPI implementation for display interfaces"
4-
version = "0.4.1"
4+
version = "0.5.0-alpha.1"
55
authors = ["Daniel Egger <[email protected]>"]
66
repository = "https://github.com/therealprof/display-interface"
77
documentation = "https://docs.rs/display-interface-spi"
@@ -18,6 +18,6 @@ edition = "2018"
1818
all-features = true
1919

2020
[dependencies]
21-
embedded-hal = "0.2.3"
22-
display-interface = "0.4"
21+
embedded-hal = "1.0.0-alpha.7"
22+
display-interface = "0.4.1"
2323
byte-slice-cast = { version = "0.3.5", default-features = false }

spi/src/lib.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
//! Generic SPI interface for display drivers
44
5-
use embedded_hal::blocking::spi;
6-
use embedded_hal::digital::v2::OutputPin;
5+
use embedded_hal::spi::blocking::Write;
6+
use embedded_hal::digital::blocking::OutputPin;
77

88
use display_interface::{DataFormat, DisplayError, WriteOnlyDataCommand};
99

1010
type Result = core::result::Result<(), DisplayError>;
1111

12-
fn send_u8<SPI: spi::Write<u8>>(spi: &mut SPI, words: DataFormat<'_>) -> Result {
12+
fn send_u8<SPI: Write<u8>>(spi: &mut SPI, words: DataFormat<'_>) -> Result {
1313
match words {
1414
DataFormat::U8(slice) => spi.write(slice).map_err(|_| DisplayError::BusWriteError),
1515
DataFormat::U16(slice) => {
@@ -115,7 +115,7 @@ pub struct SPIInterface<SPI, DC, CS> {
115115

116116
impl<SPI, DC, CS> SPIInterface<SPI, DC, CS>
117117
where
118-
SPI: spi::Write<u8>,
118+
SPI: Write<u8>,
119119
DC: OutputPin,
120120
CS: OutputPin,
121121
{
@@ -149,7 +149,7 @@ where
149149

150150
impl<SPI, DC, CS> WriteOnlyDataCommand for SPIInterface<SPI, DC, CS>
151151
where
152-
SPI: spi::Write<u8>,
152+
SPI: Write<u8>,
153153
DC: OutputPin,
154154
CS: OutputPin,
155155
{
@@ -172,7 +172,7 @@ pub struct SPIInterfaceNoCS<SPI, DC> {
172172

173173
impl<SPI, DC> SPIInterfaceNoCS<SPI, DC>
174174
where
175-
SPI: spi::Write<u8>,
175+
SPI: Write<u8>,
176176
DC: OutputPin,
177177
{
178178
/// Create new SPI interface for communciation with a display driver
@@ -189,7 +189,7 @@ where
189189

190190
impl<SPI, DC> WriteOnlyDataCommand for SPIInterfaceNoCS<SPI, DC>
191191
where
192-
SPI: spi::Write<u8>,
192+
SPI: Write<u8>,
193193
DC: OutputPin,
194194
{
195195
fn send_commands(&mut self, cmds: DataFormat<'_>) -> Result {

0 commit comments

Comments
 (0)