summaryrefslogtreecommitdiff
path: root/examples/stm32h7
diff options
context:
space:
mode:
authorDario Nieuwenhuis <dirbaio@dirbaio.net>2022-05-04 20:48:37 +0200
committerDario Nieuwenhuis <dirbaio@dirbaio.net>2022-05-07 01:45:54 +0200
commit931a137f8c5a760c2e06c437c98d14eff3e3a587 (patch)
tree7b79ba8397c3eff730f634cbaf77aa5571337191 /examples/stm32h7
parentfc32b3750c448a81b7dd44cf9de98723b8eb4fcf (diff)
downloadembassy-931a137f8c5a760c2e06c437c98d14eff3e3a587.zip
Replace embassy::io with embedded_io.
Diffstat (limited to 'examples/stm32h7')
-rw-r--r--examples/stm32h7/Cargo.toml3
-rw-r--r--examples/stm32h7/src/bin/eth.rs7
2 files changed, 4 insertions, 6 deletions
diff --git a/examples/stm32h7/Cargo.toml b/examples/stm32h7/Cargo.toml
index 419bbec3..ff70e6db 100644
--- a/examples/stm32h7/Cargo.toml
+++ b/examples/stm32h7/Cargo.toml
@@ -5,12 +5,11 @@ name = "embassy-stm32h7-examples"
version = "0.1.0"
resolver = "2"
-[features]
-
[dependencies]
embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits"] }
embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32h743bi", "net", "time-driver-any", "exti", "unstable-pac", "unstable-traits"] }
embassy-net = { path = "../../embassy-net", features = ["defmt", "tcp", "medium-ethernet", "pool-16"] }
+embedded-io = { version = "0.2.0", features = ["async"] }
defmt = "0.3"
defmt-rtt = "0.3"
diff --git a/examples/stm32h7/src/bin/eth.rs b/examples/stm32h7/src/bin/eth.rs
index 9a2e7a33..8ece2940 100644
--- a/examples/stm32h7/src/bin/eth.rs
+++ b/examples/stm32h7/src/bin/eth.rs
@@ -8,12 +8,10 @@ use panic_probe as _;
use cortex_m_rt::entry;
use defmt::*;
use embassy::executor::{Executor, Spawner};
-use embassy::io::AsyncWriteExt;
use embassy::time::{Duration, Timer};
use embassy::util::Forever;
-use embassy_net::{
- Config as NetConfig, Ipv4Address, Ipv4Cidr, StackResources, StaticConfigurator, TcpSocket,
-};
+use embassy_net::tcp::TcpSocket;
+use embassy_net::{Config as NetConfig, Ipv4Address, Ipv4Cidr, StackResources, StaticConfigurator};
use embassy_stm32::eth::generic_smi::GenericSMI;
use embassy_stm32::eth::{Ethernet, State};
use embassy_stm32::interrupt;
@@ -22,6 +20,7 @@ use embassy_stm32::peripherals::RNG;
use embassy_stm32::rng::Rng;
use embassy_stm32::time::U32Ext;
use embassy_stm32::Config;
+use embedded_io::asynch::Write;
use heapless::Vec;
#[embassy::task]