aboutsummaryrefslogtreecommitdiff
path: root/examples/rp
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2022-04-22 19:58:24 +0200
committerDario Nieuwenhuis <[email protected]>2022-04-22 19:58:24 +0200
commit3251a21fb7f7d0bcbd4e900274f4917c58ab9c87 (patch)
tree1193acee1e41822b0cbf538f6271ccad35c056aa /examples/rp
parentea0a701ebd142ea42e05e51e844bd53cc9bdf354 (diff)
Switch to crates.io embedded-hal, embedded-hal-async.
This temporarily removes support for the async UART trait, since it's not yet in embedded-hal-async.
Diffstat (limited to 'examples/rp')
-rw-r--r--examples/rp/Cargo.toml5
-rw-r--r--examples/rp/src/bin/spi_display.rs12
2 files changed, 9 insertions, 8 deletions
diff --git a/examples/rp/Cargo.toml b/examples/rp/Cargo.toml
index 2cce0af37..827adea23 100644
--- a/examples/rp/Cargo.toml
+++ b/examples/rp/Cargo.toml
@@ -20,7 +20,8 @@ futures = { version = "0.3.17", default-features = false, features = ["async-awa
20display-interface-spi = "0.4.1" 20display-interface-spi = "0.4.1"
21embedded-graphics = "0.7.1" 21embedded-graphics = "0.7.1"
22st7789 = "0.6.1" 22st7789 = "0.6.1"
23
24embedded-hal = { version = "1.0.0-alpha.7", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2" }
25display-interface = "0.4.1" 23display-interface = "0.4.1"
26byte-slice-cast = { version = "1.2.0", default-features = false } 24byte-slice-cast = { version = "1.2.0", default-features = false }
25
26embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8" }
27embedded-hal-async = { version = "0.1.0-alpha.0" }
diff --git a/examples/rp/src/bin/spi_display.rs b/examples/rp/src/bin/spi_display.rs
index bc93e0617..5c3c4c4c5 100644
--- a/examples/rp/src/bin/spi_display.rs
+++ b/examples/rp/src/bin/spi_display.rs
@@ -110,9 +110,9 @@ mod shared_spi {
110 use core::cell::RefCell; 110 use core::cell::RefCell;
111 use core::fmt::Debug; 111 use core::fmt::Debug;
112 112
113 use embedded_hal::digital::blocking::OutputPin; 113 use embedded_hal_1::digital::blocking::OutputPin;
114 use embedded_hal::spi; 114 use embedded_hal_1::spi;
115 use embedded_hal::spi::blocking::SpiDevice; 115 use embedded_hal_1::spi::blocking::SpiDevice;
116 116
117 #[derive(Copy, Clone, Eq, PartialEq, Debug)] 117 #[derive(Copy, Clone, Eq, PartialEq, Debug)]
118 pub enum SpiDeviceWithCsError<BUS, CS> { 118 pub enum SpiDeviceWithCsError<BUS, CS> {
@@ -184,7 +184,7 @@ mod shared_spi {
184 184
185/// Driver for the XPT2046 resistive touchscreen sensor 185/// Driver for the XPT2046 resistive touchscreen sensor
186mod touch { 186mod touch {
187 use embedded_hal::spi::blocking::{SpiBus, SpiBusRead, SpiBusWrite, SpiDevice}; 187 use embedded_hal_1::spi::blocking::{SpiBus, SpiBusRead, SpiBusWrite, SpiDevice};
188 188
189 struct Calibration { 189 struct Calibration {
190 x1: i32, 190 x1: i32,
@@ -248,8 +248,8 @@ mod touch {
248 248
249mod my_display_interface { 249mod my_display_interface {
250 use display_interface::{DataFormat, DisplayError, WriteOnlyDataCommand}; 250 use display_interface::{DataFormat, DisplayError, WriteOnlyDataCommand};
251 use embedded_hal::digital::blocking::OutputPin; 251 use embedded_hal_1::digital::blocking::OutputPin;
252 use embedded_hal::spi::blocking::{SpiBusWrite, SpiDevice}; 252 use embedded_hal_1::spi::blocking::{SpiBusWrite, SpiDevice};
253 253
254 /// SPI display interface. 254 /// SPI display interface.
255 /// 255 ///