From 5d5cd2371504915a531e669dce3558485a51a2e1 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Mon, 7 Aug 2023 13:43:09 +0200 Subject: Update to embedded-io 0.5 (#1752) --- examples/std/Cargo.toml | 5 +++-- examples/std/src/bin/net.rs | 2 +- examples/std/src/bin/serial.rs | 4 ++-- examples/std/src/bin/tcp_accept.rs | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) (limited to 'examples/std') diff --git a/examples/std/Cargo.toml b/examples/std/Cargo.toml index 544176828..3e26d2e2f 100644 --- a/examples/std/Cargo.toml +++ b/examples/std/Cargo.toml @@ -8,9 +8,10 @@ license = "MIT OR Apache-2.0" embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["log"] } embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-std", "executor-thread", "log", "nightly", "integrated-timers"] } embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["log", "std", "nightly"] } -embassy-net = { version = "0.1.0", path = "../../embassy-net", features=[ "std", "nightly", "log", "medium-ethernet", "tcp", "udp", "dns", "dhcpv4", "unstable-traits", "proto-ipv6"] } +embassy-net = { version = "0.1.0", path = "../../embassy-net", features=[ "std", "nightly", "log", "medium-ethernet", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6"] } embassy-net-tuntap = { version = "0.1.0", path = "../../embassy-net-tuntap" } -embedded-io = { version = "0.4.0", features = ["async", "std", "futures"] } +embedded-io-async = { version = "0.5.0" } +embedded-io-adapters = { version = "0.5.0", features = ["futures-03"] } critical-section = { version = "1.1", features = ["std"] } async-io = "1.6.0" diff --git a/examples/std/src/bin/net.rs b/examples/std/src/bin/net.rs index e0de14162..8d8345057 100644 --- a/examples/std/src/bin/net.rs +++ b/examples/std/src/bin/net.rs @@ -8,7 +8,7 @@ use embassy_net::tcp::TcpSocket; use embassy_net::{Config, Ipv4Address, Ipv4Cidr, Stack, StackResources}; use embassy_net_tuntap::TunTapDevice; use embassy_time::Duration; -use embedded_io::asynch::Write; +use embedded_io_async::Write; use heapless::Vec; use log::*; use rand_core::{OsRng, RngCore}; diff --git a/examples/std/src/bin/serial.rs b/examples/std/src/bin/serial.rs index 85ee54f70..0b289c74d 100644 --- a/examples/std/src/bin/serial.rs +++ b/examples/std/src/bin/serial.rs @@ -5,7 +5,7 @@ mod serial_port; use async_io::Async; use embassy_executor::Executor; -use embedded_io::asynch::Read; +use embedded_io_async::Read; use log::*; use nix::sys::termios; use static_cell::StaticCell; @@ -29,7 +29,7 @@ async fn run() { // // This is not really needed, you could write the code below using futures::io directly. // It's useful if you want to have portable code across embedded and std. - let mut port = embedded_io::adapters::FromFutures::new(port); + let mut port = embedded_io_adapters::futures_03::FromFutures::new(port); info!("Serial opened!"); diff --git a/examples/std/src/bin/tcp_accept.rs b/examples/std/src/bin/tcp_accept.rs index 0c920a3fb..199e4c9ec 100644 --- a/examples/std/src/bin/tcp_accept.rs +++ b/examples/std/src/bin/tcp_accept.rs @@ -9,7 +9,7 @@ use embassy_net::tcp::TcpSocket; use embassy_net::{Config, Ipv4Address, Ipv4Cidr, Stack, StackResources}; use embassy_net_tuntap::TunTapDevice; use embassy_time::{Duration, Timer}; -use embedded_io::asynch::Write as _; +use embedded_io_async::Write as _; use heapless::Vec; use log::*; use rand_core::{OsRng, RngCore}; -- cgit