aboutsummaryrefslogtreecommitdiff
path: root/examples/std
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-08-07 13:43:09 +0200
committerGitHub <[email protected]>2023-08-07 13:43:09 +0200
commit5d5cd2371504915a531e669dce3558485a51a2e1 (patch)
tree5d0093e9e5005d3a946e92686a9dc79565c3043f /examples/std
parent77844e2055319e1af7dd50fdb2e39ef88c6a5010 (diff)
Update to embedded-io 0.5 (#1752)
Diffstat (limited to 'examples/std')
-rw-r--r--examples/std/Cargo.toml5
-rw-r--r--examples/std/src/bin/net.rs2
-rw-r--r--examples/std/src/bin/serial.rs4
-rw-r--r--examples/std/src/bin/tcp_accept.rs2
4 files changed, 7 insertions, 6 deletions
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"
8embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["log"] } 8embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["log"] }
9embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-std", "executor-thread", "log", "nightly", "integrated-timers"] } 9embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-std", "executor-thread", "log", "nightly", "integrated-timers"] }
10embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["log", "std", "nightly"] } 10embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["log", "std", "nightly"] }
11embassy-net = { version = "0.1.0", path = "../../embassy-net", features=[ "std", "nightly", "log", "medium-ethernet", "tcp", "udp", "dns", "dhcpv4", "unstable-traits", "proto-ipv6"] } 11embassy-net = { version = "0.1.0", path = "../../embassy-net", features=[ "std", "nightly", "log", "medium-ethernet", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6"] }
12embassy-net-tuntap = { version = "0.1.0", path = "../../embassy-net-tuntap" } 12embassy-net-tuntap = { version = "0.1.0", path = "../../embassy-net-tuntap" }
13embedded-io = { version = "0.4.0", features = ["async", "std", "futures"] } 13embedded-io-async = { version = "0.5.0" }
14embedded-io-adapters = { version = "0.5.0", features = ["futures-03"] }
14critical-section = { version = "1.1", features = ["std"] } 15critical-section = { version = "1.1", features = ["std"] }
15 16
16async-io = "1.6.0" 17async-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;
8use embassy_net::{Config, Ipv4Address, Ipv4Cidr, Stack, StackResources}; 8use embassy_net::{Config, Ipv4Address, Ipv4Cidr, Stack, StackResources};
9use embassy_net_tuntap::TunTapDevice; 9use embassy_net_tuntap::TunTapDevice;
10use embassy_time::Duration; 10use embassy_time::Duration;
11use embedded_io::asynch::Write; 11use embedded_io_async::Write;
12use heapless::Vec; 12use heapless::Vec;
13use log::*; 13use log::*;
14use rand_core::{OsRng, RngCore}; 14use 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;
5 5
6use async_io::Async; 6use async_io::Async;
7use embassy_executor::Executor; 7use embassy_executor::Executor;
8use embedded_io::asynch::Read; 8use embedded_io_async::Read;
9use log::*; 9use log::*;
10use nix::sys::termios; 10use nix::sys::termios;
11use static_cell::StaticCell; 11use static_cell::StaticCell;
@@ -29,7 +29,7 @@ async fn run() {
29 // 29 //
30 // This is not really needed, you could write the code below using futures::io directly. 30 // This is not really needed, you could write the code below using futures::io directly.
31 // It's useful if you want to have portable code across embedded and std. 31 // It's useful if you want to have portable code across embedded and std.
32 let mut port = embedded_io::adapters::FromFutures::new(port); 32 let mut port = embedded_io_adapters::futures_03::FromFutures::new(port);
33 33
34 info!("Serial opened!"); 34 info!("Serial opened!");
35 35
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;
9use embassy_net::{Config, Ipv4Address, Ipv4Cidr, Stack, StackResources}; 9use embassy_net::{Config, Ipv4Address, Ipv4Cidr, Stack, StackResources};
10use embassy_net_tuntap::TunTapDevice; 10use embassy_net_tuntap::TunTapDevice;
11use embassy_time::{Duration, Timer}; 11use embassy_time::{Duration, Timer};
12use embedded_io::asynch::Write as _; 12use embedded_io_async::Write as _;
13use heapless::Vec; 13use heapless::Vec;
14use log::*; 14use log::*;
15use rand_core::{OsRng, RngCore}; 15use rand_core::{OsRng, RngCore};