summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorHenrik Alsér <henrik.alser@me.com>2022-05-26 18:54:58 +0200
committerGitHub <noreply@github.com>2022-05-26 18:54:58 +0200
commite10fc2bada1c59420431f09a35f7aa09a5b45623 (patch)
tree4b05a177db2a3e86c86058714d9a4ed014aea486 /examples
parent36a1f203648dcb402727ea3eb5d30cf1f6993795 (diff)
downloadembassy-e10fc2bada1c59420431f09a35f7aa09a5b45623.zip
Async shared bus for SPI & I2C + rename embassy-traits (#769)
* Rename embassy-traits to embassy-embedded-hal * Rename embassy-traits to embassy-embedded-hal * Add shared bus for SPI and I2C * rustfmt * EHA alpha 1 * Rename embedded-traits in examples * rustfmt * rustfmt Co-authored-by: Henrik Alsér <henrik@mindbite.se>
Diffstat (limited to 'examples')
-rw-r--r--examples/boot/nrf/Cargo.toml2
-rw-r--r--examples/boot/nrf/src/bin/a.rs2
-rw-r--r--examples/boot/stm32f3/Cargo.toml2
-rw-r--r--examples/boot/stm32f3/src/bin/a.rs2
-rw-r--r--examples/boot/stm32f7/Cargo.toml2
-rw-r--r--examples/boot/stm32f7/src/bin/a.rs2
-rw-r--r--examples/boot/stm32h7/Cargo.toml2
-rw-r--r--examples/boot/stm32h7/src/bin/a.rs2
-rw-r--r--examples/boot/stm32l0/Cargo.toml2
-rw-r--r--examples/boot/stm32l0/src/bin/a.rs2
-rw-r--r--examples/boot/stm32l1/Cargo.toml2
-rw-r--r--examples/boot/stm32l1/src/bin/a.rs2
-rw-r--r--examples/boot/stm32l4/Cargo.toml2
-rw-r--r--examples/boot/stm32l4/src/bin/a.rs2
-rw-r--r--examples/boot/stm32wl/Cargo.toml2
-rw-r--r--examples/boot/stm32wl/src/bin/a.rs2
-rw-r--r--examples/stm32l4/Cargo.toml2
-rw-r--r--examples/stm32l4/src/bin/i2c_blocking_async.rs2
-rw-r--r--examples/stm32l4/src/bin/spi_blocking_async.rs2
19 files changed, 19 insertions, 19 deletions
diff --git a/examples/boot/nrf/Cargo.toml b/examples/boot/nrf/Cargo.toml
index da8333b7..42bc3543 100644
--- a/examples/boot/nrf/Cargo.toml
+++ b/examples/boot/nrf/Cargo.toml
@@ -8,7 +8,7 @@ version = "0.1.0"
embassy = { version = "0.1.0", path = "../../../embassy", features = ["nightly"] }
embassy-nrf = { version = "0.1.0", path = "../../../embassy-nrf", features = ["time-driver-rtc1", "gpiote", "nightly", "nrf52840"] }
embassy-boot-nrf = { version = "0.1.0", path = "../../../embassy-boot/nrf" }
-embassy-traits = { version = "0.1.0", path = "../../../embassy-traits" }
+embassy-embedded-hal = { version = "0.1.0", path = "../../../embassy-embedded-hal" }
defmt = { version = "0.3", optional = true }
defmt-rtt = { version = "0.3", optional = true }
diff --git a/examples/boot/nrf/src/bin/a.rs b/examples/boot/nrf/src/bin/a.rs
index 7368e36c..d45d0ff3 100644
--- a/examples/boot/nrf/src/bin/a.rs
+++ b/examples/boot/nrf/src/bin/a.rs
@@ -5,13 +5,13 @@
#![feature(type_alias_impl_trait)]
use embassy_boot_nrf::FirmwareUpdater;
+use embassy_embedded_hal::adapter::BlockingAsync;
use embassy_nrf::{
gpio::{Input, Pull},
gpio::{Level, Output, OutputDrive},
nvmc::Nvmc,
Peripherals,
};
-use embassy_traits::adapter::BlockingAsync;
use panic_reset as _;
static APP_B: &[u8] = include_bytes!("../../b.bin");
diff --git a/examples/boot/stm32f3/Cargo.toml b/examples/boot/stm32f3/Cargo.toml
index d4ca600f..fab6fd72 100644
--- a/examples/boot/stm32f3/Cargo.toml
+++ b/examples/boot/stm32f3/Cargo.toml
@@ -8,7 +8,7 @@ version = "0.1.0"
embassy = { version = "0.1.0", path = "../../../embassy", features = ["nightly"] }
embassy-stm32 = { version = "0.1.0", path = "../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32f303re", "time-driver-any", "exti"] }
embassy-boot-stm32 = { version = "0.1.0", path = "../../../embassy-boot/stm32" }
-embassy-traits = { version = "0.1.0", path = "../../../embassy-traits" }
+embassy-embedded-hal = { version = "0.1.0", path = "../../../embassy-embedded-hal" }
defmt = { version = "0.3", optional = true }
defmt-rtt = { version = "0.3", optional = true }
diff --git a/examples/boot/stm32f3/src/bin/a.rs b/examples/boot/stm32f3/src/bin/a.rs
index db9262f4..9ad79838 100644
--- a/examples/boot/stm32f3/src/bin/a.rs
+++ b/examples/boot/stm32f3/src/bin/a.rs
@@ -3,11 +3,11 @@
#![feature(type_alias_impl_trait)]
use embassy_boot_stm32::FirmwareUpdater;
+use embassy_embedded_hal::adapter::BlockingAsync;
use embassy_stm32::exti::ExtiInput;
use embassy_stm32::flash::Flash;
use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
use embassy_stm32::Peripherals;
-use embassy_traits::adapter::BlockingAsync;
use panic_reset as _;
#[cfg(feature = "defmt-rtt")]
diff --git a/examples/boot/stm32f7/Cargo.toml b/examples/boot/stm32f7/Cargo.toml
index 857b287d..14500b19 100644
--- a/examples/boot/stm32f7/Cargo.toml
+++ b/examples/boot/stm32f7/Cargo.toml
@@ -8,7 +8,7 @@ version = "0.1.0"
embassy = { version = "0.1.0", path = "../../../embassy", features = ["nightly"] }
embassy-stm32 = { version = "0.1.0", path = "../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32f767zi", "time-driver-any", "exti"] }
embassy-boot-stm32 = { version = "0.1.0", path = "../../../embassy-boot/stm32" }
-embassy-traits = { version = "0.1.0", path = "../../../embassy-traits" }
+embassy-embedded-hal = { version = "0.1.0", path = "../../../embassy-embedded-hal" }
defmt = { version = "0.3", optional = true }
defmt-rtt = { version = "0.3", optional = true }
diff --git a/examples/boot/stm32f7/src/bin/a.rs b/examples/boot/stm32f7/src/bin/a.rs
index ca154f0a..b4f49d57 100644
--- a/examples/boot/stm32f7/src/bin/a.rs
+++ b/examples/boot/stm32f7/src/bin/a.rs
@@ -3,11 +3,11 @@
#![feature(type_alias_impl_trait)]
use embassy_boot_stm32::FirmwareUpdater;
+use embassy_embedded_hal::adapter::BlockingAsync;
use embassy_stm32::exti::ExtiInput;
use embassy_stm32::flash::Flash;
use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
use embassy_stm32::Peripherals;
-use embassy_traits::adapter::BlockingAsync;
use panic_reset as _;
#[cfg(feature = "defmt-rtt")]
diff --git a/examples/boot/stm32h7/Cargo.toml b/examples/boot/stm32h7/Cargo.toml
index 1fd03906..3069277e 100644
--- a/examples/boot/stm32h7/Cargo.toml
+++ b/examples/boot/stm32h7/Cargo.toml
@@ -8,7 +8,7 @@ version = "0.1.0"
embassy = { version = "0.1.0", path = "../../../embassy", features = ["nightly"] }
embassy-stm32 = { version = "0.1.0", path = "../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32h743zi", "time-driver-any", "exti"] }
embassy-boot-stm32 = { version = "0.1.0", path = "../../../embassy-boot/stm32" }
-embassy-traits = { version = "0.1.0", path = "../../../embassy-traits" }
+embassy-embedded-hal = { version = "0.1.0", path = "../../../embassy-embedded-hal" }
defmt = { version = "0.3", optional = true }
defmt-rtt = { version = "0.3", optional = true }
diff --git a/examples/boot/stm32h7/src/bin/a.rs b/examples/boot/stm32h7/src/bin/a.rs
index 1f23a8bc..1d196e8a 100644
--- a/examples/boot/stm32h7/src/bin/a.rs
+++ b/examples/boot/stm32h7/src/bin/a.rs
@@ -3,11 +3,11 @@
#![feature(type_alias_impl_trait)]
use embassy_boot_stm32::FirmwareUpdater;
+use embassy_embedded_hal::adapter::BlockingAsync;
use embassy_stm32::exti::ExtiInput;
use embassy_stm32::flash::Flash;
use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
use embassy_stm32::Peripherals;
-use embassy_traits::adapter::BlockingAsync;
use panic_reset as _;
#[cfg(feature = "defmt-rtt")]
diff --git a/examples/boot/stm32l0/Cargo.toml b/examples/boot/stm32l0/Cargo.toml
index 5cb1add5..13ca8436 100644
--- a/examples/boot/stm32l0/Cargo.toml
+++ b/examples/boot/stm32l0/Cargo.toml
@@ -8,7 +8,7 @@ version = "0.1.0"
embassy = { version = "0.1.0", path = "../../../embassy", features = ["nightly"] }
embassy-stm32 = { version = "0.1.0", path = "../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l072cz", "time-driver-any", "exti", "memory-x"] }
embassy-boot-stm32 = { version = "0.1.0", path = "../../../embassy-boot/stm32", features = ["thumbv6"] }
-embassy-traits = { version = "0.1.0", path = "../../../embassy-traits" }
+embassy-embedded-hal = { version = "0.1.0", path = "../../../embassy-embedded-hal" }
defmt = { version = "0.3", optional = true }
defmt-rtt = { version = "0.3", optional = true }
diff --git a/examples/boot/stm32l0/src/bin/a.rs b/examples/boot/stm32l0/src/bin/a.rs
index 9e603a22..d4b252bf 100644
--- a/examples/boot/stm32l0/src/bin/a.rs
+++ b/examples/boot/stm32l0/src/bin/a.rs
@@ -4,11 +4,11 @@
use embassy::time::{Duration, Timer};
use embassy_boot_stm32::FirmwareUpdater;
+use embassy_embedded_hal::adapter::BlockingAsync;
use embassy_stm32::exti::ExtiInput;
use embassy_stm32::flash::Flash;
use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
use embassy_stm32::Peripherals;
-use embassy_traits::adapter::BlockingAsync;
use panic_reset as _;
#[cfg(feature = "defmt-rtt")]
diff --git a/examples/boot/stm32l1/Cargo.toml b/examples/boot/stm32l1/Cargo.toml
index 9f97462f..b0b6e3d2 100644
--- a/examples/boot/stm32l1/Cargo.toml
+++ b/examples/boot/stm32l1/Cargo.toml
@@ -8,7 +8,7 @@ version = "0.1.0"
embassy = { version = "0.1.0", path = "../../../embassy", features = ["nightly"] }
embassy-stm32 = { version = "0.1.0", path = "../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l151cb-a", "time-driver-any", "exti"] }
embassy-boot-stm32 = { version = "0.1.0", path = "../../../embassy-boot/stm32" }
-embassy-traits = { version = "0.1.0", path = "../../../embassy-traits" }
+embassy-embedded-hal = { version = "0.1.0", path = "../../../embassy-embedded-hal" }
defmt = { version = "0.3", optional = true }
defmt-rtt = { version = "0.3", optional = true }
diff --git a/examples/boot/stm32l1/src/bin/a.rs b/examples/boot/stm32l1/src/bin/a.rs
index 9e603a22..d4b252bf 100644
--- a/examples/boot/stm32l1/src/bin/a.rs
+++ b/examples/boot/stm32l1/src/bin/a.rs
@@ -4,11 +4,11 @@
use embassy::time::{Duration, Timer};
use embassy_boot_stm32::FirmwareUpdater;
+use embassy_embedded_hal::adapter::BlockingAsync;
use embassy_stm32::exti::ExtiInput;
use embassy_stm32::flash::Flash;
use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
use embassy_stm32::Peripherals;
-use embassy_traits::adapter::BlockingAsync;
use panic_reset as _;
#[cfg(feature = "defmt-rtt")]
diff --git a/examples/boot/stm32l4/Cargo.toml b/examples/boot/stm32l4/Cargo.toml
index 53424a66..705dbd0d 100644
--- a/examples/boot/stm32l4/Cargo.toml
+++ b/examples/boot/stm32l4/Cargo.toml
@@ -8,7 +8,7 @@ version = "0.1.0"
embassy = { version = "0.1.0", path = "../../../embassy", features = ["nightly"] }
embassy-stm32 = { version = "0.1.0", path = "../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l475vg", "time-driver-any", "exti"] }
embassy-boot-stm32 = { version = "0.1.0", path = "../../../embassy-boot/stm32" }
-embassy-traits = { version = "0.1.0", path = "../../../embassy-traits" }
+embassy-embedded-hal = { version = "0.1.0", path = "../../../embassy-embedded-hal" }
defmt = { version = "0.3", optional = true }
defmt-rtt = { version = "0.3", optional = true }
diff --git a/examples/boot/stm32l4/src/bin/a.rs b/examples/boot/stm32l4/src/bin/a.rs
index 41684b2f..23b1d98b 100644
--- a/examples/boot/stm32l4/src/bin/a.rs
+++ b/examples/boot/stm32l4/src/bin/a.rs
@@ -3,11 +3,11 @@
#![feature(type_alias_impl_trait)]
use embassy_boot_stm32::FirmwareUpdater;
+use embassy_embedded_hal::adapter::BlockingAsync;
use embassy_stm32::exti::ExtiInput;
use embassy_stm32::flash::Flash;
use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
use embassy_stm32::Peripherals;
-use embassy_traits::adapter::BlockingAsync;
use panic_reset as _;
#[cfg(feature = "defmt-rtt")]
diff --git a/examples/boot/stm32wl/Cargo.toml b/examples/boot/stm32wl/Cargo.toml
index fb64886e..41e6a112 100644
--- a/examples/boot/stm32wl/Cargo.toml
+++ b/examples/boot/stm32wl/Cargo.toml
@@ -8,7 +8,7 @@ version = "0.1.0"
embassy = { version = "0.1.0", path = "../../../embassy", features = ["nightly"] }
embassy-stm32 = { version = "0.1.0", path = "../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32wl55jc-cm4", "time-driver-any", "exti"] }
embassy-boot-stm32 = { version = "0.1.0", path = "../../../embassy-boot/stm32" }
-embassy-traits = { version = "0.1.0", path = "../../../embassy-traits" }
+embassy-embedded-hal = { version = "0.1.0", path = "../../../embassy-embedded-hal" }
defmt = { version = "0.3", optional = true }
defmt-rtt = { version = "0.3", optional = true }
diff --git a/examples/boot/stm32wl/src/bin/a.rs b/examples/boot/stm32wl/src/bin/a.rs
index b3e9efa7..1089eff1 100644
--- a/examples/boot/stm32wl/src/bin/a.rs
+++ b/examples/boot/stm32wl/src/bin/a.rs
@@ -3,11 +3,11 @@
#![feature(type_alias_impl_trait)]
use embassy_boot_stm32::FirmwareUpdater;
+use embassy_embedded_hal::adapter::BlockingAsync;
use embassy_stm32::exti::ExtiInput;
use embassy_stm32::flash::Flash;
use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
use embassy_stm32::Peripherals;
-use embassy_traits::adapter::BlockingAsync;
use panic_reset as _;
#[cfg(feature = "defmt-rtt")]
diff --git a/examples/stm32l4/Cargo.toml b/examples/stm32l4/Cargo.toml
index b3478f74..afea5a5a 100644
--- a/examples/stm32l4/Cargo.toml
+++ b/examples/stm32l4/Cargo.toml
@@ -9,7 +9,7 @@ resolver = "2"
[dependencies]
embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-timestamp-uptime"] }
-embassy-traits = { version = "0.1.0", path = "../../embassy-traits" }
+embassy-embedded-hal = { version = "0.1.0", path = "../../embassy-embedded-hal" }
embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "stm32l4s5vi", "time-driver-any", "exti", "unstable-traits"] }
defmt = "0.3"
diff --git a/examples/stm32l4/src/bin/i2c_blocking_async.rs b/examples/stm32l4/src/bin/i2c_blocking_async.rs
index 136aea84..eb74223b 100644
--- a/examples/stm32l4/src/bin/i2c_blocking_async.rs
+++ b/examples/stm32l4/src/bin/i2c_blocking_async.rs
@@ -7,12 +7,12 @@ use panic_probe as _;
use defmt::*;
use embassy::executor::Spawner;
+use embassy_embedded_hal::adapter::BlockingAsync;
use embassy_stm32::dma::NoDma;
use embassy_stm32::i2c::I2c;
use embassy_stm32::interrupt;
use embassy_stm32::time::Hertz;
use embassy_stm32::Peripherals;
-use embassy_traits::adapter::BlockingAsync;
use embedded_hal_async::i2c::I2c as I2cTrait;
const ADDRESS: u8 = 0x5F;
diff --git a/examples/stm32l4/src/bin/spi_blocking_async.rs b/examples/stm32l4/src/bin/spi_blocking_async.rs
index 0398965d..e1a40010 100644
--- a/examples/stm32l4/src/bin/spi_blocking_async.rs
+++ b/examples/stm32l4/src/bin/spi_blocking_async.rs
@@ -7,12 +7,12 @@ use panic_probe as _;
use defmt::*;
use embassy::executor::Spawner;
+use embassy_embedded_hal::adapter::BlockingAsync;
use embassy_stm32::dma::NoDma;
use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
use embassy_stm32::spi::{Config, Spi};
use embassy_stm32::time::Hertz;
use embassy_stm32::Peripherals;
-use embassy_traits::adapter::BlockingAsync;
use embedded_hal_async::spi::SpiBus;
#[embassy::main]