aboutsummaryrefslogtreecommitdiff
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
parent77844e2055319e1af7dd50fdb2e39ef88c6a5010 (diff)
Update to embedded-io 0.5 (#1752)
-rwxr-xr-xci.sh14
-rwxr-xr-xci_stable.sh2
-rw-r--r--embassy-net/Cargo.toml11
-rw-r--r--embassy-net/src/dns.rs2
-rw-r--r--embassy-net/src/tcp.rs34
-rw-r--r--embassy-nrf/Cargo.toml7
-rw-r--r--embassy-nrf/src/buffered_uarte.rs22
-rw-r--r--embassy-rp/Cargo.toml5
-rw-r--r--embassy-rp/src/uart/buffered.rs26
-rw-r--r--embassy-stm32/Cargo.toml7
-rw-r--r--embassy-stm32/src/usart/buffered.rs32
-rw-r--r--embassy-stm32/src/usart/mod.rs7
-rw-r--r--embassy-stm32/src/usart/ringbuffered.rs5
-rw-r--r--embassy-sync/Cargo.toml4
-rw-r--r--embassy-sync/src/pipe.rs20
-rw-r--r--examples/nrf52840/Cargo.toml5
-rw-r--r--examples/nrf52840/src/bin/buffered_uart.rs2
-rw-r--r--examples/nrf52840/src/bin/usb_ethernet.rs2
-rw-r--r--examples/nrf52840/src/bin/wifi_esp_hosted.rs2
-rw-r--r--examples/nrf5340/Cargo.toml2
-rw-r--r--examples/rp/Cargo.toml4
-rw-r--r--examples/rp/src/bin/ethernet_w5500_multisocket.rs2
-rw-r--r--examples/rp/src/bin/ethernet_w5500_tcp_client.rs2
-rw-r--r--examples/rp/src/bin/ethernet_w5500_tcp_server.rs2
-rw-r--r--examples/rp/src/bin/pio_uart.rs12
-rw-r--r--examples/rp/src/bin/uart_buffered_split.rs2
-rw-r--r--examples/rp/src/bin/usb_ethernet.rs2
-rw-r--r--examples/rp/src/bin/wifi_ap_tcp_server.rs2
-rw-r--r--examples/rp/src/bin/wifi_tcp_server.rs2
-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
-rw-r--r--examples/stm32f4/Cargo.toml3
-rw-r--r--examples/stm32f4/src/bin/eth.rs2
-rw-r--r--examples/stm32f4/src/bin/usart_buffered.rs2
-rw-r--r--examples/stm32f4/src/bin/usb_ethernet.rs2
-rw-r--r--examples/stm32f7/Cargo.toml2
-rw-r--r--examples/stm32f7/src/bin/eth.rs2
-rw-r--r--examples/stm32h5/Cargo.toml6
-rw-r--r--examples/stm32h5/src/bin/eth.rs2
-rw-r--r--examples/stm32h7/Cargo.toml6
-rw-r--r--examples/stm32h7/src/bin/eth.rs2
-rw-r--r--examples/stm32h7/src/bin/eth_client.rs2
-rw-r--r--examples/stm32l0/Cargo.toml5
-rw-r--r--examples/stm32l0/src/bin/usart_irq.rs2
-rw-r--r--examples/stm32l5/Cargo.toml2
-rw-r--r--examples/stm32l5/src/bin/usb_ethernet.rs2
-rw-r--r--tests/nrf/Cargo.toml2
-rw-r--r--tests/rp/Cargo.toml2
-rw-r--r--tests/rp/src/bin/uart_buffered.rs2
-rw-r--r--tests/rp/src/bin/uart_upgrade.rs2
52 files changed, 149 insertions, 155 deletions
diff --git a/ci.sh b/ci.sh
index e7ad0ead8..146a1c508 100755
--- a/ci.sh
+++ b/ci.sh
@@ -20,25 +20,19 @@ cargo batch \
20 --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features nightly,defmt \ 20 --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features nightly,defmt \
21 --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv6m-none-eabi --features nightly,defmt \ 21 --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv6m-none-eabi --features nightly,defmt \
22 --- build --release --manifest-path embassy-sync/Cargo.toml --target thumbv6m-none-eabi --features nightly,defmt \ 22 --- build --release --manifest-path embassy-sync/Cargo.toml --target thumbv6m-none-eabi --features nightly,defmt \
23 --- build --release --manifest-path embassy-time/Cargo.toml --target thumbv6m-none-eabi --features nightly,unstable-traits,defmt,defmt-timestamp-uptime,tick-hz-32_768,generic-queue-8 \ 23 --- build --release --manifest-path embassy-time/Cargo.toml --target thumbv6m-none-eabi --features nightly,defmt,defmt-timestamp-uptime,tick-hz-32_768,generic-queue-8 \
24 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,medium-ethernet \ 24 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,medium-ethernet \
25 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet \ 25 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet \
26 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,unstable-traits \
27 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,nightly \ 26 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,nightly \
28 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,unstable-traits,nightly \
29 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet \ 27 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet \
30 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ieee802154 \ 28 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ieee802154 \
31 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet,medium-ieee802154 \ 29 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet,medium-ieee802154 \
32 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet,unstable-traits \
33 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet,nightly \ 30 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet,nightly \
34 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet,unstable-traits,nightly \
35 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,proto-ipv6,medium-ethernet \ 31 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,proto-ipv6,medium-ethernet \
36 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,proto-ipv6,medium-ethernet,unstable-traits \
37 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,proto-ipv6,medium-ethernet,nightly \ 32 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,proto-ipv6,medium-ethernet,nightly \
38 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,proto-ipv6,medium-ethernet,unstable-traits,nightly \ 33 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,proto-ipv6,medium-ip,nightly \
39 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,proto-ipv6,medium-ip,unstable-traits,nightly \ 34 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,proto-ipv6,medium-ip,medium-ethernet,nightly \
40 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,proto-ipv6,medium-ip,medium-ethernet,unstable-traits,nightly \ 35 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,proto-ipv6,medium-ip,medium-ethernet,medium-ieee802154,nightly \
41 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,proto-ipv6,medium-ip,medium-ethernet,medium-ieee802154,unstable-traits,nightly \
42 --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nightly,nrf52805,gpiote,time-driver-rtc1 \ 36 --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nightly,nrf52805,gpiote,time-driver-rtc1 \
43 --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nightly,nrf52810,gpiote,time-driver-rtc1 \ 37 --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nightly,nrf52810,gpiote,time-driver-rtc1 \
44 --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nightly,nrf52811,gpiote,time-driver-rtc1 \ 38 --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nightly,nrf52811,gpiote,time-driver-rtc1 \
diff --git a/ci_stable.sh b/ci_stable.sh
index 56f72131f..4ee5f4106 100755
--- a/ci_stable.sh
+++ b/ci_stable.sh
@@ -16,9 +16,7 @@ cargo batch \
16 --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv6m-none-eabi --features defmt \ 16 --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv6m-none-eabi --features defmt \
17 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,medium-ethernet \ 17 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,medium-ethernet \
18 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet \ 18 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet \
19 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,unstable-traits \
20 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet \ 19 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet \
21 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet,unstable-traits \
22 --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52805,gpiote,time-driver-rtc1 \ 20 --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52805,gpiote,time-driver-rtc1 \
23 --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52810,gpiote,time-driver-rtc1 \ 21 --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52810,gpiote,time-driver-rtc1 \
24 --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52811,gpiote,time-driver-rtc1 \ 22 --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52811,gpiote,time-driver-rtc1 \
diff --git a/embassy-net/Cargo.toml b/embassy-net/Cargo.toml
index 15b3ba2d2..0c551f204 100644
--- a/embassy-net/Cargo.toml
+++ b/embassy-net/Cargo.toml
@@ -14,11 +14,11 @@ categories = [
14[package.metadata.embassy_docs] 14[package.metadata.embassy_docs]
15src_base = "https://github.com/embassy-rs/embassy/blob/embassy-net-v$VERSION/embassy-net/src/" 15src_base = "https://github.com/embassy-rs/embassy/blob/embassy-net-v$VERSION/embassy-net/src/"
16src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-net/src/" 16src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-net/src/"
17features = ["nightly", "unstable-traits", "defmt", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6", "medium-ethernet", "medium-ip", "medium-ieee802154", "igmp"] 17features = ["nightly", "defmt", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6", "medium-ethernet", "medium-ip", "medium-ieee802154", "igmp"]
18target = "thumbv7em-none-eabi" 18target = "thumbv7em-none-eabi"
19 19
20[package.metadata.docs.rs] 20[package.metadata.docs.rs]
21features = ["nightly", "unstable-traits", "defmt", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6", "medium-ethernet", "medium-ip", "medium-ieee802154", "igmp"] 21features = ["nightly", "defmt", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6", "medium-ethernet", "medium-ip", "medium-ieee802154", "igmp"]
22 22
23[features] 23[features]
24default = [] 24default = []
@@ -26,8 +26,7 @@ std = []
26 26
27defmt = ["dep:defmt", "smoltcp/defmt", "embassy-net-driver/defmt"] 27defmt = ["dep:defmt", "smoltcp/defmt", "embassy-net-driver/defmt"]
28 28
29nightly = ["dep:embedded-io", "embedded-io?/async", "dep:embedded-nal-async"] 29nightly = ["dep:embedded-io-async", "dep:embedded-nal-async"]
30unstable-traits = []
31 30
32udp = ["smoltcp/socket-udp"] 31udp = ["smoltcp/socket-udp"]
33tcp = ["smoltcp/socket-tcp"] 32tcp = ["smoltcp/socket-tcp"]
@@ -53,7 +52,7 @@ smoltcp = { version = "0.10.0", default-features = false, features = [
53embassy-net-driver = { version = "0.1.0", path = "../embassy-net-driver" } 52embassy-net-driver = { version = "0.1.0", path = "../embassy-net-driver" }
54embassy-time = { version = "0.1.2", path = "../embassy-time" } 53embassy-time = { version = "0.1.2", path = "../embassy-time" }
55embassy-sync = { version = "0.2.0", path = "../embassy-sync" } 54embassy-sync = { version = "0.2.0", path = "../embassy-sync" }
56embedded-io = { version = "0.4.0", optional = true } 55embedded-io-async = { version = "0.5.0", optional = true }
57 56
58managed = { version = "0.8.0", default-features = false, features = [ "map" ] } 57managed = { version = "0.8.0", default-features = false, features = [ "map" ] }
59heapless = { version = "0.7.5", default-features = false } 58heapless = { version = "0.7.5", default-features = false }
@@ -62,5 +61,5 @@ generic-array = { version = "0.14.4", default-features = false }
62stable_deref_trait = { version = "1.2.0", default-features = false } 61stable_deref_trait = { version = "1.2.0", default-features = false }
63futures = { version = "0.3.17", default-features = false, features = [ "async-await" ] } 62futures = { version = "0.3.17", default-features = false, features = [ "async-await" ] }
64atomic-pool = "1.0" 63atomic-pool = "1.0"
65embedded-nal-async = { version = "0.4.0", optional = true } 64embedded-nal-async = { version = "0.5.0", optional = true }
66atomic-polyfill = { version = "1.0" } 65atomic-polyfill = { version = "1.0" }
diff --git a/embassy-net/src/dns.rs b/embassy-net/src/dns.rs
index 94f75f108..fdd45b314 100644
--- a/embassy-net/src/dns.rs
+++ b/embassy-net/src/dns.rs
@@ -68,7 +68,7 @@ where
68 } 68 }
69} 69}
70 70
71#[cfg(all(feature = "unstable-traits", feature = "nightly"))] 71#[cfg(feature = "nightly")]
72impl<'a, D> embedded_nal_async::Dns for DnsSocket<'a, D> 72impl<'a, D> embedded_nal_async::Dns for DnsSocket<'a, D>
73where 73where
74 D: Driver + 'static, 74 D: Driver + 'static,
diff --git a/embassy-net/src/tcp.rs b/embassy-net/src/tcp.rs
index 367675b13..c903fb245 100644
--- a/embassy-net/src/tcp.rs
+++ b/embassy-net/src/tcp.rs
@@ -382,29 +382,29 @@ impl<'d> TcpIo<'d> {
382mod embedded_io_impls { 382mod embedded_io_impls {
383 use super::*; 383 use super::*;
384 384
385 impl embedded_io::Error for ConnectError { 385 impl embedded_io_async::Error for ConnectError {
386 fn kind(&self) -> embedded_io::ErrorKind { 386 fn kind(&self) -> embedded_io_async::ErrorKind {
387 embedded_io::ErrorKind::Other 387 embedded_io_async::ErrorKind::Other
388 } 388 }
389 } 389 }
390 390
391 impl embedded_io::Error for Error { 391 impl embedded_io_async::Error for Error {
392 fn kind(&self) -> embedded_io::ErrorKind { 392 fn kind(&self) -> embedded_io_async::ErrorKind {
393 embedded_io::ErrorKind::Other 393 embedded_io_async::ErrorKind::Other
394 } 394 }
395 } 395 }
396 396
397 impl<'d> embedded_io::Io for TcpSocket<'d> { 397 impl<'d> embedded_io_async::ErrorType for TcpSocket<'d> {
398 type Error = Error; 398 type Error = Error;
399 } 399 }
400 400
401 impl<'d> embedded_io::asynch::Read for TcpSocket<'d> { 401 impl<'d> embedded_io_async::Read for TcpSocket<'d> {
402 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> { 402 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
403 self.io.read(buf).await 403 self.io.read(buf).await
404 } 404 }
405 } 405 }
406 406
407 impl<'d> embedded_io::asynch::Write for TcpSocket<'d> { 407 impl<'d> embedded_io_async::Write for TcpSocket<'d> {
408 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> { 408 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
409 self.io.write(buf).await 409 self.io.write(buf).await
410 } 410 }
@@ -414,21 +414,21 @@ mod embedded_io_impls {
414 } 414 }
415 } 415 }
416 416
417 impl<'d> embedded_io::Io for TcpReader<'d> { 417 impl<'d> embedded_io_async::ErrorType for TcpReader<'d> {
418 type Error = Error; 418 type Error = Error;
419 } 419 }
420 420
421 impl<'d> embedded_io::asynch::Read for TcpReader<'d> { 421 impl<'d> embedded_io_async::Read for TcpReader<'d> {
422 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> { 422 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
423 self.io.read(buf).await 423 self.io.read(buf).await
424 } 424 }
425 } 425 }
426 426
427 impl<'d> embedded_io::Io for TcpWriter<'d> { 427 impl<'d> embedded_io_async::ErrorType for TcpWriter<'d> {
428 type Error = Error; 428 type Error = Error;
429 } 429 }
430 430
431 impl<'d> embedded_io::asynch::Write for TcpWriter<'d> { 431 impl<'d> embedded_io_async::Write for TcpWriter<'d> {
432 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> { 432 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
433 self.io.write(buf).await 433 self.io.write(buf).await
434 } 434 }
@@ -440,7 +440,7 @@ mod embedded_io_impls {
440} 440}
441 441
442/// TCP client compatible with `embedded-nal-async` traits. 442/// TCP client compatible with `embedded-nal-async` traits.
443#[cfg(all(feature = "unstable-traits", feature = "nightly"))] 443#[cfg(feature = "nightly")]
444pub mod client { 444pub mod client {
445 use core::cell::UnsafeCell; 445 use core::cell::UnsafeCell;
446 use core::mem::MaybeUninit; 446 use core::mem::MaybeUninit;
@@ -527,13 +527,13 @@ pub mod client {
527 } 527 }
528 } 528 }
529 529
530 impl<'d, const N: usize, const TX_SZ: usize, const RX_SZ: usize> embedded_io::Io 530 impl<'d, const N: usize, const TX_SZ: usize, const RX_SZ: usize> embedded_io_async::ErrorType
531 for TcpConnection<'d, N, TX_SZ, RX_SZ> 531 for TcpConnection<'d, N, TX_SZ, RX_SZ>
532 { 532 {
533 type Error = Error; 533 type Error = Error;
534 } 534 }
535 535
536 impl<'d, const N: usize, const TX_SZ: usize, const RX_SZ: usize> embedded_io::asynch::Read 536 impl<'d, const N: usize, const TX_SZ: usize, const RX_SZ: usize> embedded_io_async::Read
537 for TcpConnection<'d, N, TX_SZ, RX_SZ> 537 for TcpConnection<'d, N, TX_SZ, RX_SZ>
538 { 538 {
539 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> { 539 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
@@ -541,7 +541,7 @@ pub mod client {
541 } 541 }
542 } 542 }
543 543
544 impl<'d, const N: usize, const TX_SZ: usize, const RX_SZ: usize> embedded_io::asynch::Write 544 impl<'d, const N: usize, const TX_SZ: usize, const RX_SZ: usize> embedded_io_async::Write
545 for TcpConnection<'d, N, TX_SZ, RX_SZ> 545 for TcpConnection<'d, N, TX_SZ, RX_SZ>
546 { 546 {
547 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> { 547 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
diff --git a/embassy-nrf/Cargo.toml b/embassy-nrf/Cargo.toml
index d10cd2c34..da1cd38e1 100644
--- a/embassy-nrf/Cargo.toml
+++ b/embassy-nrf/Cargo.toml
@@ -32,10 +32,10 @@ rt = [
32 32
33time = ["dep:embassy-time"] 33time = ["dep:embassy-time"]
34 34
35defmt = ["dep:defmt", "embassy-sync/defmt", "embassy-usb-driver?/defmt", "embedded-io?/defmt", "embassy-embedded-hal/defmt"] 35defmt = ["dep:defmt", "embassy-sync/defmt", "embassy-usb-driver?/defmt", "embassy-embedded-hal/defmt"]
36 36
37# Enable nightly-only features 37# Enable nightly-only features
38nightly = ["embedded-hal-1", "embedded-hal-async", "dep:embassy-usb-driver", "embedded-storage-async", "dep:embedded-io", "embassy-embedded-hal/nightly"] 38nightly = ["embedded-hal-1", "embedded-hal-async", "dep:embassy-usb-driver", "embedded-storage-async", "dep:embedded-io-async", "embassy-embedded-hal/nightly"]
39 39
40# Reexport the PAC for the currently enabled chip at `embassy_nrf::pac`. 40# Reexport the PAC for the currently enabled chip at `embassy_nrf::pac`.
41# This is unstable because semver-minor (non-breaking) releases of embassy-nrf may major-bump (breaking) the PAC version. 41# This is unstable because semver-minor (non-breaking) releases of embassy-nrf may major-bump (breaking) the PAC version.
@@ -100,7 +100,8 @@ embassy-usb-driver = {version = "0.1.0", path = "../embassy-usb-driver", optiona
100embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } 100embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] }
101embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11", optional = true} 101embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11", optional = true}
102embedded-hal-async = { version = "=0.2.0-alpha.2", optional = true} 102embedded-hal-async = { version = "=0.2.0-alpha.2", optional = true}
103embedded-io = { version = "0.4.0", features = ["async"], optional = true } 103embedded-io = { version = "0.5.0" }
104embedded-io-async = { version = "0.5.0", optional = true }
104 105
105defmt = { version = "0.3", optional = true } 106defmt = { version = "0.3", optional = true }
106log = { version = "0.4.14", optional = true } 107log = { version = "0.4.14", optional = true }
diff --git a/embassy-nrf/src/buffered_uarte.rs b/embassy-nrf/src/buffered_uarte.rs
index 5a0a3c7c0..10b8b0fbe 100644
--- a/embassy-nrf/src/buffered_uarte.rs
+++ b/embassy-nrf/src/buffered_uarte.rs
@@ -572,37 +572,37 @@ impl<'u, 'd, U: UarteInstance, T: TimerInstance> BufferedUarteRx<'u, 'd, U, T> {
572mod _embedded_io { 572mod _embedded_io {
573 use super::*; 573 use super::*;
574 574
575 impl embedded_io::Error for Error { 575 impl embedded_io_async::Error for Error {
576 fn kind(&self) -> embedded_io::ErrorKind { 576 fn kind(&self) -> embedded_io_async::ErrorKind {
577 match *self {} 577 match *self {}
578 } 578 }
579 } 579 }
580 580
581 impl<'d, U: UarteInstance, T: TimerInstance> embedded_io::Io for BufferedUarte<'d, U, T> { 581 impl<'d, U: UarteInstance, T: TimerInstance> embedded_io_async::ErrorType for BufferedUarte<'d, U, T> {
582 type Error = Error; 582 type Error = Error;
583 } 583 }
584 584
585 impl<'u, 'd, U: UarteInstance, T: TimerInstance> embedded_io::Io for BufferedUarteRx<'u, 'd, U, T> { 585 impl<'u, 'd, U: UarteInstance, T: TimerInstance> embedded_io_async::ErrorType for BufferedUarteRx<'u, 'd, U, T> {
586 type Error = Error; 586 type Error = Error;
587 } 587 }
588 588
589 impl<'u, 'd, U: UarteInstance, T: TimerInstance> embedded_io::Io for BufferedUarteTx<'u, 'd, U, T> { 589 impl<'u, 'd, U: UarteInstance, T: TimerInstance> embedded_io_async::ErrorType for BufferedUarteTx<'u, 'd, U, T> {
590 type Error = Error; 590 type Error = Error;
591 } 591 }
592 592
593 impl<'d, U: UarteInstance, T: TimerInstance> embedded_io::asynch::Read for BufferedUarte<'d, U, T> { 593 impl<'d, U: UarteInstance, T: TimerInstance> embedded_io_async::Read for BufferedUarte<'d, U, T> {
594 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> { 594 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
595 self.inner_read(buf).await 595 self.inner_read(buf).await
596 } 596 }
597 } 597 }
598 598
599 impl<'u, 'd: 'u, U: UarteInstance, T: TimerInstance> embedded_io::asynch::Read for BufferedUarteRx<'u, 'd, U, T> { 599 impl<'u, 'd: 'u, U: UarteInstance, T: TimerInstance> embedded_io_async::Read for BufferedUarteRx<'u, 'd, U, T> {
600 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> { 600 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
601 self.inner.inner_read(buf).await 601 self.inner.inner_read(buf).await
602 } 602 }
603 } 603 }
604 604
605 impl<'d, U: UarteInstance, T: TimerInstance> embedded_io::asynch::BufRead for BufferedUarte<'d, U, T> { 605 impl<'d, U: UarteInstance, T: TimerInstance> embedded_io_async::BufRead for BufferedUarte<'d, U, T> {
606 async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> { 606 async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> {
607 self.inner_fill_buf().await 607 self.inner_fill_buf().await
608 } 608 }
@@ -612,7 +612,7 @@ mod _embedded_io {
612 } 612 }
613 } 613 }
614 614
615 impl<'u, 'd: 'u, U: UarteInstance, T: TimerInstance> embedded_io::asynch::BufRead for BufferedUarteRx<'u, 'd, U, T> { 615 impl<'u, 'd: 'u, U: UarteInstance, T: TimerInstance> embedded_io_async::BufRead for BufferedUarteRx<'u, 'd, U, T> {
616 async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> { 616 async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> {
617 self.inner.inner_fill_buf().await 617 self.inner.inner_fill_buf().await
618 } 618 }
@@ -622,7 +622,7 @@ mod _embedded_io {
622 } 622 }
623 } 623 }
624 624
625 impl<'d, U: UarteInstance, T: TimerInstance> embedded_io::asynch::Write for BufferedUarte<'d, U, T> { 625 impl<'d, U: UarteInstance, T: TimerInstance> embedded_io_async::Write for BufferedUarte<'d, U, T> {
626 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> { 626 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
627 self.inner_write(buf).await 627 self.inner_write(buf).await
628 } 628 }
@@ -632,7 +632,7 @@ mod _embedded_io {
632 } 632 }
633 } 633 }
634 634
635 impl<'u, 'd: 'u, U: UarteInstance, T: TimerInstance> embedded_io::asynch::Write for BufferedUarteTx<'u, 'd, U, T> { 635 impl<'u, 'd: 'u, U: UarteInstance, T: TimerInstance> embedded_io_async::Write for BufferedUarteTx<'u, 'd, U, T> {
636 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> { 636 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
637 self.inner.inner_write(buf).await 637 self.inner.inner_write(buf).await
638 } 638 }
diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml
index 564d44ecd..b1680d487 100644
--- a/embassy-rp/Cargo.toml
+++ b/embassy-rp/Cargo.toml
@@ -52,7 +52,7 @@ qspi-as-gpio = []
52run-from-ram = [] 52run-from-ram = []
53 53
54# Enable nightly-only features 54# Enable nightly-only features
55nightly = ["embedded-hal-1", "embedded-hal-async", "embedded-storage-async", "embassy-embedded-hal/nightly", "dep:embassy-usb-driver", "dep:embedded-io"] 55nightly = ["embedded-hal-1", "embedded-hal-async", "embedded-storage-async", "embassy-embedded-hal/nightly", "dep:embassy-usb-driver", "dep:embedded-io-async"]
56 56
57# Implement embedded-hal 1.0 alpha traits. 57# Implement embedded-hal 1.0 alpha traits.
58# Implement embedded-hal-async traits if `nightly` is set as well. 58# Implement embedded-hal-async traits if `nightly` is set as well.
@@ -75,7 +75,8 @@ cortex-m = "0.7.6"
75critical-section = "1.1" 75critical-section = "1.1"
76futures = { version = "0.3.17", default-features = false, features = ["async-await"] } 76futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
77chrono = { version = "0.4", default-features = false, optional = true } 77chrono = { version = "0.4", default-features = false, optional = true }
78embedded-io = { version = "0.4.0", features = ["async"], optional = true } 78embedded-io = { version = "0.5.0" }
79embedded-io-async = { version = "0.5.0", optional = true }
79embedded-storage = { version = "0.3" } 80embedded-storage = { version = "0.3" }
80embedded-storage-async = { version = "0.4.0", optional = true } 81embedded-storage-async = { version = "0.4.0", optional = true }
81rand_core = "0.6.4" 82rand_core = "0.6.4"
diff --git a/embassy-rp/src/uart/buffered.rs b/embassy-rp/src/uart/buffered.rs
index 9d96db12c..58dc0bf1a 100644
--- a/embassy-rp/src/uart/buffered.rs
+++ b/embassy-rp/src/uart/buffered.rs
@@ -574,31 +574,31 @@ impl embedded_io::Error for Error {
574 } 574 }
575} 575}
576 576
577impl<'d, T: Instance> embedded_io::Io for BufferedUart<'d, T> { 577impl<'d, T: Instance> embedded_io_async::ErrorType for BufferedUart<'d, T> {
578 type Error = Error; 578 type Error = Error;
579} 579}
580 580
581impl<'d, T: Instance> embedded_io::Io for BufferedUartRx<'d, T> { 581impl<'d, T: Instance> embedded_io_async::ErrorType for BufferedUartRx<'d, T> {
582 type Error = Error; 582 type Error = Error;
583} 583}
584 584
585impl<'d, T: Instance> embedded_io::Io for BufferedUartTx<'d, T> { 585impl<'d, T: Instance> embedded_io_async::ErrorType for BufferedUartTx<'d, T> {
586 type Error = Error; 586 type Error = Error;
587} 587}
588 588
589impl<'d, T: Instance + 'd> embedded_io::asynch::Read for BufferedUart<'d, T> { 589impl<'d, T: Instance + 'd> embedded_io_async::Read for BufferedUart<'d, T> {
590 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> { 590 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
591 BufferedUartRx::<'d, T>::read(buf).await 591 BufferedUartRx::<'d, T>::read(buf).await
592 } 592 }
593} 593}
594 594
595impl<'d, T: Instance + 'd> embedded_io::asynch::Read for BufferedUartRx<'d, T> { 595impl<'d, T: Instance + 'd> embedded_io_async::Read for BufferedUartRx<'d, T> {
596 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> { 596 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
597 Self::read(buf).await 597 Self::read(buf).await
598 } 598 }
599} 599}
600 600
601impl<'d, T: Instance + 'd> embedded_io::asynch::BufRead for BufferedUart<'d, T> { 601impl<'d, T: Instance + 'd> embedded_io_async::BufRead for BufferedUart<'d, T> {
602 async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> { 602 async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> {
603 BufferedUartRx::<'d, T>::fill_buf().await 603 BufferedUartRx::<'d, T>::fill_buf().await
604 } 604 }
@@ -608,7 +608,7 @@ impl<'d, T: Instance + 'd> embedded_io::asynch::BufRead for BufferedUart<'d, T>
608 } 608 }
609} 609}
610 610
611impl<'d, T: Instance + 'd> embedded_io::asynch::BufRead for BufferedUartRx<'d, T> { 611impl<'d, T: Instance + 'd> embedded_io_async::BufRead for BufferedUartRx<'d, T> {
612 async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> { 612 async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> {
613 Self::fill_buf().await 613 Self::fill_buf().await
614 } 614 }
@@ -618,7 +618,7 @@ impl<'d, T: Instance + 'd> embedded_io::asynch::BufRead for BufferedUartRx<'d, T
618 } 618 }
619} 619}
620 620
621impl<'d, T: Instance + 'd> embedded_io::asynch::Write for BufferedUart<'d, T> { 621impl<'d, T: Instance + 'd> embedded_io_async::Write for BufferedUart<'d, T> {
622 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> { 622 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
623 BufferedUartTx::<'d, T>::write(buf).await 623 BufferedUartTx::<'d, T>::write(buf).await
624 } 624 }
@@ -628,7 +628,7 @@ impl<'d, T: Instance + 'd> embedded_io::asynch::Write for BufferedUart<'d, T> {
628 } 628 }
629} 629}
630 630
631impl<'d, T: Instance + 'd> embedded_io::asynch::Write for BufferedUartTx<'d, T> { 631impl<'d, T: Instance + 'd> embedded_io_async::Write for BufferedUartTx<'d, T> {
632 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> { 632 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
633 Self::write(buf).await 633 Self::write(buf).await
634 } 634 }
@@ -638,19 +638,19 @@ impl<'d, T: Instance + 'd> embedded_io::asynch::Write for BufferedUartTx<'d, T>
638 } 638 }
639} 639}
640 640
641impl<'d, T: Instance + 'd> embedded_io::blocking::Read for BufferedUart<'d, T> { 641impl<'d, T: Instance + 'd> embedded_io::Read for BufferedUart<'d, T> {
642 fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> { 642 fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
643 self.rx.blocking_read(buf) 643 self.rx.blocking_read(buf)
644 } 644 }
645} 645}
646 646
647impl<'d, T: Instance + 'd> embedded_io::blocking::Read for BufferedUartRx<'d, T> { 647impl<'d, T: Instance + 'd> embedded_io::Read for BufferedUartRx<'d, T> {
648 fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> { 648 fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
649 self.blocking_read(buf) 649 self.blocking_read(buf)
650 } 650 }
651} 651}
652 652
653impl<'d, T: Instance + 'd> embedded_io::blocking::Write for BufferedUart<'d, T> { 653impl<'d, T: Instance + 'd> embedded_io::Write for BufferedUart<'d, T> {
654 fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> { 654 fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
655 self.tx.blocking_write(buf) 655 self.tx.blocking_write(buf)
656 } 656 }
@@ -660,7 +660,7 @@ impl<'d, T: Instance + 'd> embedded_io::blocking::Write for BufferedUart<'d, T>
660 } 660 }
661} 661}
662 662
663impl<'d, T: Instance + 'd> embedded_io::blocking::Write for BufferedUartTx<'d, T> { 663impl<'d, T: Instance + 'd> embedded_io::Write for BufferedUartTx<'d, T> {
664 fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> { 664 fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
665 self.blocking_write(buf) 665 self.blocking_write(buf)
666 } 666 }
diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml
index 723c50296..0d713f60d 100644
--- a/embassy-stm32/Cargo.toml
+++ b/embassy-stm32/Cargo.toml
@@ -64,7 +64,8 @@ nb = "1.0.0"
64stm32-fmc = "0.2.4" 64stm32-fmc = "0.2.4"
65seq-macro = "0.3.0" 65seq-macro = "0.3.0"
66cfg-if = "1.0.0" 66cfg-if = "1.0.0"
67embedded-io = { version = "0.4.0", features = ["async"], optional = true } 67embedded-io = { version = "0.5.0" }
68embedded-io-async = { version = "0.5.0", optional = true }
68chrono = { version = "^0.4", default-features = false, optional = true} 69chrono = { version = "^0.4", default-features = false, optional = true}
69bit_field = "0.10.2" 70bit_field = "0.10.2"
70document-features = "0.2.7" 71document-features = "0.2.7"
@@ -84,7 +85,7 @@ default = ["rt"]
84rt = ["stm32-metapac/rt"] 85rt = ["stm32-metapac/rt"]
85 86
86## Use [`defmt`](https://docs.rs/defmt/latest/defmt/) for logging 87## Use [`defmt`](https://docs.rs/defmt/latest/defmt/) for logging
87defmt = ["dep:defmt", "bxcan/unstable-defmt", "embassy-sync/defmt", "embassy-embedded-hal/defmt", "embassy-hal-internal/defmt", "embedded-io?/defmt", "embassy-usb-driver?/defmt", "embassy-net-driver/defmt", "embassy-time?/defmt"] 88defmt = ["dep:defmt", "bxcan/unstable-defmt", "embassy-sync/defmt", "embassy-embedded-hal/defmt", "embassy-hal-internal/defmt", "embedded-io-async?/defmt-03", "embassy-usb-driver?/defmt", "embassy-net-driver/defmt", "embassy-time?/defmt"]
88 89
89exti = [] 90exti = []
90 91
@@ -92,7 +93,7 @@ exti = []
92memory-x = ["stm32-metapac/memory-x"] 93memory-x = ["stm32-metapac/memory-x"]
93 94
94## Enable nightly-only features 95## Enable nightly-only features
95nightly = ["embedded-hal-1", "embedded-hal-async", "embedded-storage-async", "dep:embedded-io", "dep:embassy-usb-driver", "embassy-embedded-hal/nightly"] 96nightly = ["embedded-hal-1", "embedded-hal-async", "embedded-storage-async", "dep:embedded-io-async", "dep:embassy-usb-driver", "embassy-embedded-hal/nightly"]
96 97
97## Re-export stm32-metapac at `embassy_stm32::pac`. 98## Re-export stm32-metapac at `embassy_stm32::pac`.
98## This is unstable because semver-minor (non-breaking) releases of embassy-stm32 may major-bump (breaking) the stm32-metapac version. 99## This is unstable because semver-minor (non-breaking) releases of embassy-stm32 may major-bump (breaking) the stm32-metapac version.
diff --git a/embassy-stm32/src/usart/buffered.rs b/embassy-stm32/src/usart/buffered.rs
index ca117da82..329fc7da6 100644
--- a/embassy-stm32/src/usart/buffered.rs
+++ b/embassy-stm32/src/usart/buffered.rs
@@ -400,37 +400,37 @@ impl<'d, T: BasicInstance> Drop for BufferedUartTx<'d, T> {
400 } 400 }
401} 401}
402 402
403impl embedded_io::Error for Error { 403impl embedded_io_async::Error for Error {
404 fn kind(&self) -> embedded_io::ErrorKind { 404 fn kind(&self) -> embedded_io_async::ErrorKind {
405 embedded_io::ErrorKind::Other 405 embedded_io_async::ErrorKind::Other
406 } 406 }
407} 407}
408 408
409impl<'d, T: BasicInstance> embedded_io::Io for BufferedUart<'d, T> { 409impl<'d, T: BasicInstance> embedded_io_async::ErrorType for BufferedUart<'d, T> {
410 type Error = Error; 410 type Error = Error;
411} 411}
412 412
413impl<'d, T: BasicInstance> embedded_io::Io for BufferedUartRx<'d, T> { 413impl<'d, T: BasicInstance> embedded_io_async::ErrorType for BufferedUartRx<'d, T> {
414 type Error = Error; 414 type Error = Error;
415} 415}
416 416
417impl<'d, T: BasicInstance> embedded_io::Io for BufferedUartTx<'d, T> { 417impl<'d, T: BasicInstance> embedded_io_async::ErrorType for BufferedUartTx<'d, T> {
418 type Error = Error; 418 type Error = Error;
419} 419}
420 420
421impl<'d, T: BasicInstance> embedded_io::asynch::Read for BufferedUart<'d, T> { 421impl<'d, T: BasicInstance> embedded_io_async::Read for BufferedUart<'d, T> {
422 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> { 422 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
423 self.rx.read(buf).await 423 self.rx.read(buf).await
424 } 424 }
425} 425}
426 426
427impl<'d, T: BasicInstance> embedded_io::asynch::Read for BufferedUartRx<'d, T> { 427impl<'d, T: BasicInstance> embedded_io_async::Read for BufferedUartRx<'d, T> {
428 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> { 428 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
429 Self::read(self, buf).await 429 Self::read(self, buf).await
430 } 430 }
431} 431}
432 432
433impl<'d, T: BasicInstance> embedded_io::asynch::BufRead for BufferedUart<'d, T> { 433impl<'d, T: BasicInstance> embedded_io_async::BufRead for BufferedUart<'d, T> {
434 async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> { 434 async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> {
435 self.rx.fill_buf().await 435 self.rx.fill_buf().await
436 } 436 }
@@ -440,7 +440,7 @@ impl<'d, T: BasicInstance> embedded_io::asynch::BufRead for BufferedUart<'d, T>
440 } 440 }
441} 441}
442 442
443impl<'d, T: BasicInstance> embedded_io::asynch::BufRead for BufferedUartRx<'d, T> { 443impl<'d, T: BasicInstance> embedded_io_async::BufRead for BufferedUartRx<'d, T> {
444 async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> { 444 async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> {
445 Self::fill_buf(self).await 445 Self::fill_buf(self).await
446 } 446 }
@@ -450,7 +450,7 @@ impl<'d, T: BasicInstance> embedded_io::asynch::BufRead for BufferedUartRx<'d, T
450 } 450 }
451} 451}
452 452
453impl<'d, T: BasicInstance> embedded_io::asynch::Write for BufferedUart<'d, T> { 453impl<'d, T: BasicInstance> embedded_io_async::Write for BufferedUart<'d, T> {
454 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> { 454 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
455 self.tx.write(buf).await 455 self.tx.write(buf).await
456 } 456 }
@@ -460,7 +460,7 @@ impl<'d, T: BasicInstance> embedded_io::asynch::Write for BufferedUart<'d, T> {
460 } 460 }
461} 461}
462 462
463impl<'d, T: BasicInstance> embedded_io::asynch::Write for BufferedUartTx<'d, T> { 463impl<'d, T: BasicInstance> embedded_io_async::Write for BufferedUartTx<'d, T> {
464 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> { 464 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
465 Self::write(self, buf).await 465 Self::write(self, buf).await
466 } 466 }
@@ -470,19 +470,19 @@ impl<'d, T: BasicInstance> embedded_io::asynch::Write for BufferedUartTx<'d, T>
470 } 470 }
471} 471}
472 472
473impl<'d, T: BasicInstance> embedded_io::blocking::Read for BufferedUart<'d, T> { 473impl<'d, T: BasicInstance> embedded_io::Read for BufferedUart<'d, T> {
474 fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> { 474 fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
475 self.rx.blocking_read(buf) 475 self.rx.blocking_read(buf)
476 } 476 }
477} 477}
478 478
479impl<'d, T: BasicInstance> embedded_io::blocking::Read for BufferedUartRx<'d, T> { 479impl<'d, T: BasicInstance> embedded_io::Read for BufferedUartRx<'d, T> {
480 fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> { 480 fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
481 self.blocking_read(buf) 481 self.blocking_read(buf)
482 } 482 }
483} 483}
484 484
485impl<'d, T: BasicInstance> embedded_io::blocking::Write for BufferedUart<'d, T> { 485impl<'d, T: BasicInstance> embedded_io::Write for BufferedUart<'d, T> {
486 fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> { 486 fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
487 self.tx.blocking_write(buf) 487 self.tx.blocking_write(buf)
488 } 488 }
@@ -492,7 +492,7 @@ impl<'d, T: BasicInstance> embedded_io::blocking::Write for BufferedUart<'d, T>
492 } 492 }
493} 493}
494 494
495impl<'d, T: BasicInstance> embedded_io::blocking::Write for BufferedUartTx<'d, T> { 495impl<'d, T: BasicInstance> embedded_io::Write for BufferedUartTx<'d, T> {
496 fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> { 496 fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
497 Self::blocking_write(self, buf) 497 Self::blocking_write(self, buf)
498 } 498 }
diff --git a/embassy-stm32/src/usart/mod.rs b/embassy-stm32/src/usart/mod.rs
index d99034bca..0c69a4882 100644
--- a/embassy-stm32/src/usart/mod.rs
+++ b/embassy-stm32/src/usart/mod.rs
@@ -1022,12 +1022,11 @@ mod eh1 {
1022 1022
1023#[cfg(all(feature = "unstable-traits", feature = "nightly"))] 1023#[cfg(all(feature = "unstable-traits", feature = "nightly"))]
1024mod eio { 1024mod eio {
1025 use embedded_io::asynch::Write; 1025 use embedded_io_async::{ErrorType, Write};
1026 use embedded_io::Io;
1027 1026
1028 use super::*; 1027 use super::*;
1029 1028
1030 impl<T, TxDma, RxDma> Io for Uart<'_, T, TxDma, RxDma> 1029 impl<T, TxDma, RxDma> ErrorType for Uart<'_, T, TxDma, RxDma>
1031 where 1030 where
1032 T: BasicInstance, 1031 T: BasicInstance,
1033 { 1032 {
@@ -1049,7 +1048,7 @@ mod eio {
1049 } 1048 }
1050 } 1049 }
1051 1050
1052 impl<T, TxDma> Io for UartTx<'_, T, TxDma> 1051 impl<T, TxDma> ErrorType for UartTx<'_, T, TxDma>
1053 where 1052 where
1054 T: BasicInstance, 1053 T: BasicInstance,
1055 { 1054 {
diff --git a/embassy-stm32/src/usart/ringbuffered.rs b/embassy-stm32/src/usart/ringbuffered.rs
index b0e626df6..b3f570624 100644
--- a/embassy-stm32/src/usart/ringbuffered.rs
+++ b/embassy-stm32/src/usart/ringbuffered.rs
@@ -220,13 +220,12 @@ fn clear_idle_flag(r: Regs) -> Sr {
220 220
221#[cfg(all(feature = "unstable-traits", feature = "nightly"))] 221#[cfg(all(feature = "unstable-traits", feature = "nightly"))]
222mod eio { 222mod eio {
223 use embedded_io::asynch::Read; 223 use embedded_io_async::{ErrorType, Read};
224 use embedded_io::Io;
225 224
226 use super::RingBufferedUartRx; 225 use super::RingBufferedUartRx;
227 use crate::usart::{BasicInstance, Error, RxDma}; 226 use crate::usart::{BasicInstance, Error, RxDma};
228 227
229 impl<T, Rx> Io for RingBufferedUartRx<'_, T, Rx> 228 impl<T, Rx> ErrorType for RingBufferedUartRx<'_, T, Rx>
230 where 229 where
231 T: BasicInstance, 230 T: BasicInstance,
232 Rx: RxDma<T>, 231 Rx: RxDma<T>,
diff --git a/embassy-sync/Cargo.toml b/embassy-sync/Cargo.toml
index 340724eab..94d6799e5 100644
--- a/embassy-sync/Cargo.toml
+++ b/embassy-sync/Cargo.toml
@@ -23,7 +23,7 @@ target = "thumbv7em-none-eabi"
23features = ["nightly"] 23features = ["nightly"]
24 24
25[features] 25[features]
26nightly = ["embedded-io/async"] 26nightly = ["dep:embedded-io-async"]
27std = [] 27std = []
28turbowakers = [] 28turbowakers = []
29 29
@@ -35,7 +35,7 @@ futures-util = { version = "0.3.17", default-features = false }
35critical-section = "1.1" 35critical-section = "1.1"
36heapless = "0.7.5" 36heapless = "0.7.5"
37cfg-if = "1.0.0" 37cfg-if = "1.0.0"
38embedded-io = "0.4.0" 38embedded-io-async = { version = "0.5.0", optional = true }
39 39
40[dev-dependencies] 40[dev-dependencies]
41futures-executor = { version = "0.3.17", features = [ "thread-pool" ] } 41futures-executor = { version = "0.3.17", features = [ "thread-pool" ] }
diff --git a/embassy-sync/src/pipe.rs b/embassy-sync/src/pipe.rs
index 13bf4ef01..6e3e77b49 100644
--- a/embassy-sync/src/pipe.rs
+++ b/embassy-sync/src/pipe.rs
@@ -381,17 +381,17 @@ mod io_impls {
381 381
382 use super::*; 382 use super::*;
383 383
384 impl<M: RawMutex, const N: usize> embedded_io::Io for Pipe<M, N> { 384 impl<M: RawMutex, const N: usize> embedded_io_async::ErrorType for Pipe<M, N> {
385 type Error = Infallible; 385 type Error = Infallible;
386 } 386 }
387 387
388 impl<M: RawMutex, const N: usize> embedded_io::asynch::Read for Pipe<M, N> { 388 impl<M: RawMutex, const N: usize> embedded_io_async::Read for Pipe<M, N> {
389 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> { 389 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
390 Ok(Pipe::read(self, buf).await) 390 Ok(Pipe::read(self, buf).await)
391 } 391 }
392 } 392 }
393 393
394 impl<M: RawMutex, const N: usize> embedded_io::asynch::Write for Pipe<M, N> { 394 impl<M: RawMutex, const N: usize> embedded_io_async::Write for Pipe<M, N> {
395 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> { 395 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
396 Ok(Pipe::write(self, buf).await) 396 Ok(Pipe::write(self, buf).await)
397 } 397 }
@@ -401,17 +401,17 @@ mod io_impls {
401 } 401 }
402 } 402 }
403 403
404 impl<M: RawMutex, const N: usize> embedded_io::Io for &Pipe<M, N> { 404 impl<M: RawMutex, const N: usize> embedded_io_async::ErrorType for &Pipe<M, N> {
405 type Error = Infallible; 405 type Error = Infallible;
406 } 406 }
407 407
408 impl<M: RawMutex, const N: usize> embedded_io::asynch::Read for &Pipe<M, N> { 408 impl<M: RawMutex, const N: usize> embedded_io_async::Read for &Pipe<M, N> {
409 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> { 409 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
410 Ok(Pipe::read(self, buf).await) 410 Ok(Pipe::read(self, buf).await)
411 } 411 }
412 } 412 }
413 413
414 impl<M: RawMutex, const N: usize> embedded_io::asynch::Write for &Pipe<M, N> { 414 impl<M: RawMutex, const N: usize> embedded_io_async::Write for &Pipe<M, N> {
415 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> { 415 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
416 Ok(Pipe::write(self, buf).await) 416 Ok(Pipe::write(self, buf).await)
417 } 417 }
@@ -421,21 +421,21 @@ mod io_impls {
421 } 421 }
422 } 422 }
423 423
424 impl<M: RawMutex, const N: usize> embedded_io::Io for Reader<'_, M, N> { 424 impl<M: RawMutex, const N: usize> embedded_io_async::ErrorType for Reader<'_, M, N> {
425 type Error = Infallible; 425 type Error = Infallible;
426 } 426 }
427 427
428 impl<M: RawMutex, const N: usize> embedded_io::asynch::Read for Reader<'_, M, N> { 428 impl<M: RawMutex, const N: usize> embedded_io_async::Read for Reader<'_, M, N> {
429 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> { 429 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
430 Ok(Reader::read(self, buf).await) 430 Ok(Reader::read(self, buf).await)
431 } 431 }
432 } 432 }
433 433
434 impl<M: RawMutex, const N: usize> embedded_io::Io for Writer<'_, M, N> { 434 impl<M: RawMutex, const N: usize> embedded_io_async::ErrorType for Writer<'_, M, N> {
435 type Error = Infallible; 435 type Error = Infallible;
436 } 436 }
437 437
438 impl<M: RawMutex, const N: usize> embedded_io::asynch::Write for Writer<'_, M, N> { 438 impl<M: RawMutex, const N: usize> embedded_io_async::Write for Writer<'_, M, N> {
439 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> { 439 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
440 Ok(Writer::write(self, buf).await) 440 Ok(Writer::write(self, buf).await)
441 } 441 }
diff --git a/examples/nrf52840/Cargo.toml b/examples/nrf52840/Cargo.toml
index 780aaeac2..15fe22d3a 100644
--- a/examples/nrf52840/Cargo.toml
+++ b/examples/nrf52840/Cargo.toml
@@ -17,7 +17,7 @@ nightly = [
17 "embassy-time/unstable-traits", 17 "embassy-time/unstable-traits",
18 "static_cell/nightly", 18 "static_cell/nightly",
19 "embassy-usb", 19 "embassy-usb",
20 "embedded-io/async", 20 "embedded-io-async",
21 "embassy-net", 21 "embassy-net",
22 "embassy-lora", 22 "embassy-lora",
23 "lora-phy", 23 "lora-phy",
@@ -33,7 +33,8 @@ embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["de
33embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } 33embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
34embassy-net = { version = "0.1.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"], optional = true } 34embassy-net = { version = "0.1.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"], optional = true }
35embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt", "msos-descriptor",], optional = true } 35embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt", "msos-descriptor",], optional = true }
36embedded-io = "0.4.0" 36embedded-io = { version = "0.5.0", features = ["defmt-03"] }
37embedded-io-async = { version = "0.5.0", optional = true, features = ["defmt-03"] }
37embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["time", "defmt"], optional = true } 38embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["time", "defmt"], optional = true }
38lora-phy = { version = "1", optional = true } 39lora-phy = { version = "1", optional = true }
39lorawan-device = { version = "0.10.0", default-features = false, features = ["async", "external-lora-phy"], optional = true } 40lorawan-device = { version = "0.10.0", default-features = false, features = ["async", "external-lora-phy"], optional = true }
diff --git a/examples/nrf52840/src/bin/buffered_uart.rs b/examples/nrf52840/src/bin/buffered_uart.rs
index 238695371..d9c505786 100644
--- a/examples/nrf52840/src/bin/buffered_uart.rs
+++ b/examples/nrf52840/src/bin/buffered_uart.rs
@@ -6,7 +6,7 @@ use defmt::*;
6use embassy_executor::Spawner; 6use embassy_executor::Spawner;
7use embassy_nrf::buffered_uarte::{self, BufferedUarte}; 7use embassy_nrf::buffered_uarte::{self, BufferedUarte};
8use embassy_nrf::{bind_interrupts, peripherals, uarte}; 8use embassy_nrf::{bind_interrupts, peripherals, uarte};
9use embedded_io::asynch::Write; 9use embedded_io_async::Write;
10use {defmt_rtt as _, panic_probe as _}; 10use {defmt_rtt as _, panic_probe as _};
11 11
12bind_interrupts!(struct Irqs { 12bind_interrupts!(struct Irqs {
diff --git a/examples/nrf52840/src/bin/usb_ethernet.rs b/examples/nrf52840/src/bin/usb_ethernet.rs
index f527c0d7f..b7806f418 100644
--- a/examples/nrf52840/src/bin/usb_ethernet.rs
+++ b/examples/nrf52840/src/bin/usb_ethernet.rs
@@ -15,7 +15,7 @@ use embassy_nrf::{bind_interrupts, pac, peripherals, rng, usb};
15use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState}; 15use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState};
16use embassy_usb::class::cdc_ncm::{CdcNcmClass, State}; 16use embassy_usb::class::cdc_ncm::{CdcNcmClass, State};
17use embassy_usb::{Builder, Config, UsbDevice}; 17use embassy_usb::{Builder, Config, UsbDevice};
18use embedded_io::asynch::Write; 18use embedded_io_async::Write;
19use static_cell::make_static; 19use static_cell::make_static;
20use {defmt_rtt as _, panic_probe as _}; 20use {defmt_rtt as _, panic_probe as _};
21 21
diff --git a/examples/nrf52840/src/bin/wifi_esp_hosted.rs b/examples/nrf52840/src/bin/wifi_esp_hosted.rs
index 112e41bcd..e3b80d821 100644
--- a/examples/nrf52840/src/bin/wifi_esp_hosted.rs
+++ b/examples/nrf52840/src/bin/wifi_esp_hosted.rs
@@ -12,7 +12,7 @@ use embassy_nrf::spim::{self, Spim};
12use embassy_nrf::{bind_interrupts, peripherals}; 12use embassy_nrf::{bind_interrupts, peripherals};
13use embassy_time::Delay; 13use embassy_time::Delay;
14use embedded_hal_async::spi::ExclusiveDevice; 14use embedded_hal_async::spi::ExclusiveDevice;
15use embedded_io::asynch::Write; 15use embedded_io_async::Write;
16use static_cell::make_static; 16use static_cell::make_static;
17use {defmt_rtt as _, embassy_net_esp_hosted as hosted, panic_probe as _}; 17use {defmt_rtt as _, embassy_net_esp_hosted as hosted, panic_probe as _};
18 18
diff --git a/examples/nrf5340/Cargo.toml b/examples/nrf5340/Cargo.toml
index b0e51dcf4..57660f125 100644
--- a/examples/nrf5340/Cargo.toml
+++ b/examples/nrf5340/Cargo.toml
@@ -37,7 +37,7 @@ embassy-net = { version = "0.1.0", path = "../../embassy-net", features = [
37embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = [ 37embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = [
38 "defmt", 38 "defmt",
39] } 39] }
40embedded-io = { version = "0.4.0", features = [ "async" ]} 40embedded-io-async = { version = "0.5.0" }
41 41
42defmt = "0.3" 42defmt = "0.3"
43defmt-rtt = "0.4" 43defmt-rtt = "0.4"
diff --git a/examples/rp/Cargo.toml b/examples/rp/Cargo.toml
index 8c61dc5e1..d83e370df 100644
--- a/examples/rp/Cargo.toml
+++ b/examples/rp/Cargo.toml
@@ -44,7 +44,7 @@ usbd-hid = "0.6.1"
44 44
45embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11" } 45embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11" }
46embedded-hal-async = "0.2.0-alpha.2" 46embedded-hal-async = "0.2.0-alpha.2"
47embedded-io = { version = "0.4.0", features = ["async", "defmt"] } 47embedded-io-async = { version = "0.5.0", features = ["defmt-03"] }
48embedded-storage = { version = "0.3" } 48embedded-storage = { version = "0.3" }
49static_cell = { version = "1.1", features = ["nightly"]} 49static_cell = { version = "1.1", features = ["nightly"]}
50log = "0.4" 50log = "0.4"
@@ -53,4 +53,4 @@ pio = "0.2.1"
53rand = { version = "0.8.5", default-features = false } 53rand = { version = "0.8.5", default-features = false }
54 54
55[profile.release] 55[profile.release]
56debug = 2 56debug = 2 \ No newline at end of file
diff --git a/examples/rp/src/bin/ethernet_w5500_multisocket.rs b/examples/rp/src/bin/ethernet_w5500_multisocket.rs
index e81da177b..9f800d0d9 100644
--- a/examples/rp/src/bin/ethernet_w5500_multisocket.rs
+++ b/examples/rp/src/bin/ethernet_w5500_multisocket.rs
@@ -17,7 +17,7 @@ use embassy_rp::peripherals::{PIN_17, PIN_20, PIN_21, SPI0};
17use embassy_rp::spi::{Async, Config as SpiConfig, Spi}; 17use embassy_rp::spi::{Async, Config as SpiConfig, Spi};
18use embassy_time::{Delay, Duration}; 18use embassy_time::{Delay, Duration};
19use embedded_hal_async::spi::ExclusiveDevice; 19use embedded_hal_async::spi::ExclusiveDevice;
20use embedded_io::asynch::Write; 20use embedded_io_async::Write;
21use rand::RngCore; 21use rand::RngCore;
22use static_cell::make_static; 22use static_cell::make_static;
23use {defmt_rtt as _, panic_probe as _}; 23use {defmt_rtt as _, panic_probe as _};
diff --git a/examples/rp/src/bin/ethernet_w5500_tcp_client.rs b/examples/rp/src/bin/ethernet_w5500_tcp_client.rs
index 9dd7ae973..fee84b613 100644
--- a/examples/rp/src/bin/ethernet_w5500_tcp_client.rs
+++ b/examples/rp/src/bin/ethernet_w5500_tcp_client.rs
@@ -19,7 +19,7 @@ use embassy_rp::peripherals::{PIN_17, PIN_20, PIN_21, SPI0};
19use embassy_rp::spi::{Async, Config as SpiConfig, Spi}; 19use embassy_rp::spi::{Async, Config as SpiConfig, Spi};
20use embassy_time::{Delay, Duration, Timer}; 20use embassy_time::{Delay, Duration, Timer};
21use embedded_hal_async::spi::ExclusiveDevice; 21use embedded_hal_async::spi::ExclusiveDevice;
22use embedded_io::asynch::Write; 22use embedded_io_async::Write;
23use rand::RngCore; 23use rand::RngCore;
24use static_cell::make_static; 24use static_cell::make_static;
25use {defmt_rtt as _, panic_probe as _}; 25use {defmt_rtt as _, panic_probe as _};
diff --git a/examples/rp/src/bin/ethernet_w5500_tcp_server.rs b/examples/rp/src/bin/ethernet_w5500_tcp_server.rs
index db21c2b6f..024574267 100644
--- a/examples/rp/src/bin/ethernet_w5500_tcp_server.rs
+++ b/examples/rp/src/bin/ethernet_w5500_tcp_server.rs
@@ -18,7 +18,7 @@ use embassy_rp::peripherals::{PIN_17, PIN_20, PIN_21, SPI0};
18use embassy_rp::spi::{Async, Config as SpiConfig, Spi}; 18use embassy_rp::spi::{Async, Config as SpiConfig, Spi};
19use embassy_time::{Delay, Duration}; 19use embassy_time::{Delay, Duration};
20use embedded_hal_async::spi::ExclusiveDevice; 20use embedded_hal_async::spi::ExclusiveDevice;
21use embedded_io::asynch::Write; 21use embedded_io_async::Write;
22use rand::RngCore; 22use rand::RngCore;
23use static_cell::make_static; 23use static_cell::make_static;
24use {defmt_rtt as _, panic_probe as _}; 24use {defmt_rtt as _, panic_probe as _};
diff --git a/examples/rp/src/bin/pio_uart.rs b/examples/rp/src/bin/pio_uart.rs
index 4c382c2ee..707c99b78 100644
--- a/examples/rp/src/bin/pio_uart.rs
+++ b/examples/rp/src/bin/pio_uart.rs
@@ -23,7 +23,7 @@ use embassy_sync::pipe::Pipe;
23use embassy_usb::class::cdc_acm::{CdcAcmClass, Receiver, Sender, State}; 23use embassy_usb::class::cdc_acm::{CdcAcmClass, Receiver, Sender, State};
24use embassy_usb::driver::EndpointError; 24use embassy_usb::driver::EndpointError;
25use embassy_usb::{Builder, Config}; 25use embassy_usb::{Builder, Config};
26use embedded_io::asynch::{Read, Write}; 26use embedded_io_async::{Read, Write};
27use {defmt_rtt as _, panic_probe as _}; 27use {defmt_rtt as _, panic_probe as _};
28 28
29use crate::uart::PioUart; 29use crate::uart::PioUart;
@@ -240,8 +240,7 @@ mod uart_tx {
240 use embassy_rp::gpio::Level; 240 use embassy_rp::gpio::Level;
241 use embassy_rp::peripherals::PIO0; 241 use embassy_rp::peripherals::PIO0;
242 use embassy_rp::pio::{Common, Config, Direction, FifoJoin, PioPin, ShiftDirection, StateMachine}; 242 use embassy_rp::pio::{Common, Config, Direction, FifoJoin, PioPin, ShiftDirection, StateMachine};
243 use embedded_io::asynch::Write; 243 use embedded_io_async::{ErrorType, Write};
244 use embedded_io::Io;
245 use fixed::traits::ToFixed; 244 use fixed::traits::ToFixed;
246 use fixed_macro::types::U56F8; 245 use fixed_macro::types::U56F8;
247 246
@@ -293,7 +292,7 @@ mod uart_tx {
293 } 292 }
294 } 293 }
295 294
296 impl Io for PioUartTx<'_> { 295 impl ErrorType for PioUartTx<'_> {
297 type Error = Infallible; 296 type Error = Infallible;
298 } 297 }
299 298
@@ -313,8 +312,7 @@ mod uart_rx {
313 use embassy_rp::gpio::Level; 312 use embassy_rp::gpio::Level;
314 use embassy_rp::peripherals::PIO0; 313 use embassy_rp::peripherals::PIO0;
315 use embassy_rp::pio::{Common, Config, Direction, FifoJoin, PioPin, ShiftDirection, StateMachine}; 314 use embassy_rp::pio::{Common, Config, Direction, FifoJoin, PioPin, ShiftDirection, StateMachine};
316 use embedded_io::asynch::Read; 315 use embedded_io_async::{ErrorType, Read};
317 use embedded_io::Io;
318 use fixed::traits::ToFixed; 316 use fixed::traits::ToFixed;
319 use fixed_macro::types::U56F8; 317 use fixed_macro::types::U56F8;
320 318
@@ -377,7 +375,7 @@ mod uart_rx {
377 } 375 }
378 } 376 }
379 377
380 impl Io for PioUartRx<'_> { 378 impl ErrorType for PioUartRx<'_> {
381 type Error = Infallible; 379 type Error = Infallible;
382 } 380 }
383 381
diff --git a/examples/rp/src/bin/uart_buffered_split.rs b/examples/rp/src/bin/uart_buffered_split.rs
index 735201718..d3e67c8ed 100644
--- a/examples/rp/src/bin/uart_buffered_split.rs
+++ b/examples/rp/src/bin/uart_buffered_split.rs
@@ -14,7 +14,7 @@ use embassy_rp::bind_interrupts;
14use embassy_rp::peripherals::UART0; 14use embassy_rp::peripherals::UART0;
15use embassy_rp::uart::{BufferedInterruptHandler, BufferedUart, BufferedUartRx, Config}; 15use embassy_rp::uart::{BufferedInterruptHandler, BufferedUart, BufferedUartRx, Config};
16use embassy_time::{Duration, Timer}; 16use embassy_time::{Duration, Timer};
17use embedded_io::asynch::{Read, Write}; 17use embedded_io_async::{Read, Write};
18use static_cell::make_static; 18use static_cell::make_static;
19use {defmt_rtt as _, panic_probe as _}; 19use {defmt_rtt as _, panic_probe as _};
20 20
diff --git a/examples/rp/src/bin/usb_ethernet.rs b/examples/rp/src/bin/usb_ethernet.rs
index 0a08f667e..6c2f27acf 100644
--- a/examples/rp/src/bin/usb_ethernet.rs
+++ b/examples/rp/src/bin/usb_ethernet.rs
@@ -16,7 +16,7 @@ use embassy_rp::{bind_interrupts, peripherals};
16use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState}; 16use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState};
17use embassy_usb::class::cdc_ncm::{CdcNcmClass, State}; 17use embassy_usb::class::cdc_ncm::{CdcNcmClass, State};
18use embassy_usb::{Builder, Config, UsbDevice}; 18use embassy_usb::{Builder, Config, UsbDevice};
19use embedded_io::asynch::Write; 19use embedded_io_async::Write;
20use static_cell::make_static; 20use static_cell::make_static;
21use {defmt_rtt as _, panic_probe as _}; 21use {defmt_rtt as _, panic_probe as _};
22 22
diff --git a/examples/rp/src/bin/wifi_ap_tcp_server.rs b/examples/rp/src/bin/wifi_ap_tcp_server.rs
index e3e393445..cd61ad789 100644
--- a/examples/rp/src/bin/wifi_ap_tcp_server.rs
+++ b/examples/rp/src/bin/wifi_ap_tcp_server.rs
@@ -19,7 +19,7 @@ use embassy_rp::gpio::{Level, Output};
19use embassy_rp::peripherals::{DMA_CH0, PIN_23, PIN_25, PIO0}; 19use embassy_rp::peripherals::{DMA_CH0, PIN_23, PIN_25, PIO0};
20use embassy_rp::pio::{InterruptHandler, Pio}; 20use embassy_rp::pio::{InterruptHandler, Pio};
21use embassy_time::Duration; 21use embassy_time::Duration;
22use embedded_io::asynch::Write; 22use embedded_io_async::Write;
23use static_cell::make_static; 23use static_cell::make_static;
24use {defmt_rtt as _, panic_probe as _}; 24use {defmt_rtt as _, panic_probe as _};
25 25
diff --git a/examples/rp/src/bin/wifi_tcp_server.rs b/examples/rp/src/bin/wifi_tcp_server.rs
index 0223a3636..55fcb4a6a 100644
--- a/examples/rp/src/bin/wifi_tcp_server.rs
+++ b/examples/rp/src/bin/wifi_tcp_server.rs
@@ -19,7 +19,7 @@ use embassy_rp::gpio::{Level, Output};
19use embassy_rp::peripherals::{DMA_CH0, PIN_23, PIN_25, PIO0}; 19use embassy_rp::peripherals::{DMA_CH0, PIN_23, PIN_25, PIO0};
20use embassy_rp::pio::{InterruptHandler, Pio}; 20use embassy_rp::pio::{InterruptHandler, Pio};
21use embassy_time::Duration; 21use embassy_time::Duration;
22use embedded_io::asynch::Write; 22use embedded_io_async::Write;
23use static_cell::make_static; 23use static_cell::make_static;
24use {defmt_rtt as _, panic_probe as _}; 24use {defmt_rtt as _, panic_probe as _};
25 25
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};
diff --git a/examples/stm32f4/Cargo.toml b/examples/stm32f4/Cargo.toml
index fdd3b7d4f..65a4e51fc 100644
--- a/examples/stm32f4/Cargo.toml
+++ b/examples/stm32f4/Cargo.toml
@@ -19,7 +19,8 @@ defmt-rtt = "0.4"
19cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } 19cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] }
20cortex-m-rt = "0.7.0" 20cortex-m-rt = "0.7.0"
21embedded-hal = "0.2.6" 21embedded-hal = "0.2.6"
22embedded-io = "0.4.0" 22embedded-io = { version = "0.5.0" }
23embedded-io-async = { version = "0.5.0" }
23panic-probe = { version = "0.3", features = ["print-defmt"] } 24panic-probe = { version = "0.3", features = ["print-defmt"] }
24futures = { version = "0.3.17", default-features = false, features = ["async-await"] } 25futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
25heapless = { version = "0.7.5", default-features = false } 26heapless = { version = "0.7.5", default-features = false }
diff --git a/examples/stm32f4/src/bin/eth.rs b/examples/stm32f4/src/bin/eth.rs
index 496016687..393e60b73 100644
--- a/examples/stm32f4/src/bin/eth.rs
+++ b/examples/stm32f4/src/bin/eth.rs
@@ -13,7 +13,7 @@ use embassy_stm32::rng::Rng;
13use embassy_stm32::time::mhz; 13use embassy_stm32::time::mhz;
14use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; 14use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config};
15use embassy_time::{Duration, Timer}; 15use embassy_time::{Duration, Timer};
16use embedded_io::asynch::Write; 16use embedded_io_async::Write;
17use static_cell::make_static; 17use static_cell::make_static;
18use {defmt_rtt as _, panic_probe as _}; 18use {defmt_rtt as _, panic_probe as _};
19 19
diff --git a/examples/stm32f4/src/bin/usart_buffered.rs b/examples/stm32f4/src/bin/usart_buffered.rs
index c573dc3a3..c0a64d94b 100644
--- a/examples/stm32f4/src/bin/usart_buffered.rs
+++ b/examples/stm32f4/src/bin/usart_buffered.rs
@@ -6,7 +6,7 @@ use defmt::*;
6use embassy_executor::Spawner; 6use embassy_executor::Spawner;
7use embassy_stm32::usart::{BufferedUart, Config}; 7use embassy_stm32::usart::{BufferedUart, Config};
8use embassy_stm32::{bind_interrupts, peripherals, usart}; 8use embassy_stm32::{bind_interrupts, peripherals, usart};
9use embedded_io::asynch::BufRead; 9use embedded_io_async::BufRead;
10use {defmt_rtt as _, panic_probe as _}; 10use {defmt_rtt as _, panic_probe as _};
11 11
12bind_interrupts!(struct Irqs { 12bind_interrupts!(struct Irqs {
diff --git a/examples/stm32f4/src/bin/usb_ethernet.rs b/examples/stm32f4/src/bin/usb_ethernet.rs
index 740d3018e..763e3a9e7 100644
--- a/examples/stm32f4/src/bin/usb_ethernet.rs
+++ b/examples/stm32f4/src/bin/usb_ethernet.rs
@@ -13,7 +13,7 @@ use embassy_stm32::{bind_interrupts, peripherals, usb_otg, Config};
13use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState}; 13use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState};
14use embassy_usb::class::cdc_ncm::{CdcNcmClass, State}; 14use embassy_usb::class::cdc_ncm::{CdcNcmClass, State};
15use embassy_usb::{Builder, UsbDevice}; 15use embassy_usb::{Builder, UsbDevice};
16use embedded_io::asynch::Write; 16use embedded_io_async::Write;
17use static_cell::make_static; 17use static_cell::make_static;
18use {defmt_rtt as _, panic_probe as _}; 18use {defmt_rtt as _, panic_probe as _};
19 19
diff --git a/examples/stm32f7/Cargo.toml b/examples/stm32f7/Cargo.toml
index a379cbbe3..41170f2c7 100644
--- a/examples/stm32f7/Cargo.toml
+++ b/examples/stm32f7/Cargo.toml
@@ -11,7 +11,7 @@ embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["de
11embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } 11embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
12embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } 12embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
13embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet"] } 13embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet"] }
14embedded-io = { version = "0.4.0", features = ["async"] } 14embedded-io-async = { version = "0.5.0" }
15embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } 15embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] }
16 16
17defmt = "0.3" 17defmt = "0.3"
diff --git a/examples/stm32f7/src/bin/eth.rs b/examples/stm32f7/src/bin/eth.rs
index e5abf52bc..f0e280c35 100644
--- a/examples/stm32f7/src/bin/eth.rs
+++ b/examples/stm32f7/src/bin/eth.rs
@@ -13,7 +13,7 @@ use embassy_stm32::rng::Rng;
13use embassy_stm32::time::mhz; 13use embassy_stm32::time::mhz;
14use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; 14use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config};
15use embassy_time::{Duration, Timer}; 15use embassy_time::{Duration, Timer};
16use embedded_io::asynch::Write; 16use embedded_io_async::Write;
17use rand_core::RngCore; 17use rand_core::RngCore;
18use static_cell::make_static; 18use static_cell::make_static;
19use {defmt_rtt as _, panic_probe as _}; 19use {defmt_rtt as _, panic_probe as _};
diff --git a/examples/stm32h5/Cargo.toml b/examples/stm32h5/Cargo.toml
index 51d3bad1f..44d0a9574 100644
--- a/examples/stm32h5/Cargo.toml
+++ b/examples/stm32h5/Cargo.toml
@@ -10,8 +10,8 @@ embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["
10embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } 10embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
11embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } 11embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
12embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } 12embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] }
13embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "unstable-traits", "proto-ipv6"] } 13embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6"] }
14embedded-io = { version = "0.4.0", features = ["async"] } 14embedded-io-async = { version = "0.5.0" }
15embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } 15embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] }
16 16
17defmt = "0.3" 17defmt = "0.3"
@@ -22,7 +22,7 @@ cortex-m-rt = "0.7.0"
22embedded-hal = "0.2.6" 22embedded-hal = "0.2.6"
23embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11" } 23embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11" }
24embedded-hal-async = { version = "=0.2.0-alpha.2" } 24embedded-hal-async = { version = "=0.2.0-alpha.2" }
25embedded-nal-async = "0.4.0" 25embedded-nal-async = { version = "0.5.0" }
26panic-probe = { version = "0.3", features = ["print-defmt"] } 26panic-probe = { version = "0.3", features = ["print-defmt"] }
27futures = { version = "0.3.17", default-features = false, features = ["async-await"] } 27futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
28heapless = { version = "0.7.5", default-features = false } 28heapless = { version = "0.7.5", default-features = false }
diff --git a/examples/stm32h5/src/bin/eth.rs b/examples/stm32h5/src/bin/eth.rs
index 2aa2ab62b..763520ab8 100644
--- a/examples/stm32h5/src/bin/eth.rs
+++ b/examples/stm32h5/src/bin/eth.rs
@@ -14,7 +14,7 @@ use embassy_stm32::rng::Rng;
14use embassy_stm32::time::Hertz; 14use embassy_stm32::time::Hertz;
15use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; 15use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config};
16use embassy_time::{Duration, Timer}; 16use embassy_time::{Duration, Timer};
17use embedded_io::asynch::Write; 17use embedded_io_async::Write;
18use rand_core::RngCore; 18use rand_core::RngCore;
19use static_cell::make_static; 19use static_cell::make_static;
20use {defmt_rtt as _, panic_probe as _}; 20use {defmt_rtt as _, panic_probe as _};
diff --git a/examples/stm32h7/Cargo.toml b/examples/stm32h7/Cargo.toml
index 3c1232e67..e2e5f9364 100644
--- a/examples/stm32h7/Cargo.toml
+++ b/examples/stm32h7/Cargo.toml
@@ -10,8 +10,8 @@ embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["
10embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } 10embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
11embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } 11embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
12embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } 12embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] }
13embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "unstable-traits", "proto-ipv6"] } 13embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6"] }
14embedded-io = { version = "0.4.0", features = ["async"] } 14embedded-io-async = { version = "0.5.0" }
15embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } 15embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] }
16 16
17defmt = "0.3" 17defmt = "0.3"
@@ -22,7 +22,7 @@ cortex-m-rt = "0.7.0"
22embedded-hal = "0.2.6" 22embedded-hal = "0.2.6"
23embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11" } 23embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11" }
24embedded-hal-async = { version = "=0.2.0-alpha.2" } 24embedded-hal-async = { version = "=0.2.0-alpha.2" }
25embedded-nal-async = "0.4.0" 25embedded-nal-async = { version = "0.5.0" }
26panic-probe = { version = "0.3", features = ["print-defmt"] } 26panic-probe = { version = "0.3", features = ["print-defmt"] }
27futures = { version = "0.3.17", default-features = false, features = ["async-await"] } 27futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
28heapless = { version = "0.7.5", default-features = false } 28heapless = { version = "0.7.5", default-features = false }
diff --git a/examples/stm32h7/src/bin/eth.rs b/examples/stm32h7/src/bin/eth.rs
index c93be9f00..26a386e49 100644
--- a/examples/stm32h7/src/bin/eth.rs
+++ b/examples/stm32h7/src/bin/eth.rs
@@ -13,7 +13,7 @@ use embassy_stm32::rng::Rng;
13use embassy_stm32::time::mhz; 13use embassy_stm32::time::mhz;
14use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; 14use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config};
15use embassy_time::{Duration, Timer}; 15use embassy_time::{Duration, Timer};
16use embedded_io::asynch::Write; 16use embedded_io_async::Write;
17use rand_core::RngCore; 17use rand_core::RngCore;
18use static_cell::make_static; 18use static_cell::make_static;
19use {defmt_rtt as _, panic_probe as _}; 19use {defmt_rtt as _, panic_probe as _};
diff --git a/examples/stm32h7/src/bin/eth_client.rs b/examples/stm32h7/src/bin/eth_client.rs
index 78005e91f..6664410c8 100644
--- a/examples/stm32h7/src/bin/eth_client.rs
+++ b/examples/stm32h7/src/bin/eth_client.rs
@@ -13,7 +13,7 @@ use embassy_stm32::rng::Rng;
13use embassy_stm32::time::mhz; 13use embassy_stm32::time::mhz;
14use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; 14use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config};
15use embassy_time::{Duration, Timer}; 15use embassy_time::{Duration, Timer};
16use embedded_io::asynch::Write; 16use embedded_io_async::Write;
17use embedded_nal_async::{Ipv4Addr, SocketAddr, SocketAddrV4, TcpConnect}; 17use embedded_nal_async::{Ipv4Addr, SocketAddr, SocketAddrV4, TcpConnect};
18use rand_core::RngCore; 18use rand_core::RngCore;
19use static_cell::make_static; 19use static_cell::make_static;
diff --git a/examples/stm32l0/Cargo.toml b/examples/stm32l0/Cargo.toml
index c325751c6..33aa05e65 100644
--- a/examples/stm32l0/Cargo.toml
+++ b/examples/stm32l0/Cargo.toml
@@ -7,7 +7,7 @@ license = "MIT OR Apache-2.0"
7[features] 7[features]
8default = ["nightly"] 8default = ["nightly"]
9nightly = ["embassy-stm32/nightly", "embassy-time/nightly", "embassy-time/unstable-traits", "embassy-executor/nightly", 9nightly = ["embassy-stm32/nightly", "embassy-time/nightly", "embassy-time/unstable-traits", "embassy-executor/nightly",
10 "embassy-lora", "lora-phy", "lorawan-device", "lorawan", "embedded-io/async"] 10 "embassy-lora", "lora-phy", "lorawan-device", "lorawan", "dep:embedded-io-async"]
11 11
12[dependencies] 12[dependencies]
13# Change stm32l072cz to your chip name, if necessary. 13# Change stm32l072cz to your chip name, if necessary.
@@ -24,7 +24,8 @@ defmt = "0.3"
24defmt-rtt = "0.4" 24defmt-rtt = "0.4"
25 25
26embedded-storage = "0.3.0" 26embedded-storage = "0.3.0"
27embedded-io = "0.4.0" 27embedded-io = { version = "0.5.0" }
28embedded-io-async = { version = "0.5.0", optional = true }
28 29
29cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } 30cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] }
30cortex-m-rt = "0.7.0" 31cortex-m-rt = "0.7.0"
diff --git a/examples/stm32l0/src/bin/usart_irq.rs b/examples/stm32l0/src/bin/usart_irq.rs
index f2c72a107..f5dabcc42 100644
--- a/examples/stm32l0/src/bin/usart_irq.rs
+++ b/examples/stm32l0/src/bin/usart_irq.rs
@@ -6,7 +6,7 @@ use defmt::*;
6use embassy_executor::Spawner; 6use embassy_executor::Spawner;
7use embassy_stm32::usart::{BufferedUart, Config}; 7use embassy_stm32::usart::{BufferedUart, Config};
8use embassy_stm32::{bind_interrupts, peripherals, usart}; 8use embassy_stm32::{bind_interrupts, peripherals, usart};
9use embedded_io::asynch::{Read, Write}; 9use embedded_io_async::{Read, Write};
10use {defmt_rtt as _, panic_probe as _}; 10use {defmt_rtt as _, panic_probe as _};
11 11
12bind_interrupts!(struct Irqs { 12bind_interrupts!(struct Irqs {
diff --git a/examples/stm32l5/Cargo.toml b/examples/stm32l5/Cargo.toml
index 1afd00398..9dfc08f2e 100644
--- a/examples/stm32l5/Cargo.toml
+++ b/examples/stm32l5/Cargo.toml
@@ -25,7 +25,7 @@ embedded-hal = "0.2.6"
25futures = { version = "0.3.17", default-features = false, features = ["async-await"] } 25futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
26heapless = { version = "0.7.5", default-features = false } 26heapless = { version = "0.7.5", default-features = false }
27rand_core = { version = "0.6.3", default-features = false } 27rand_core = { version = "0.6.3", default-features = false }
28embedded-io = { version = "0.4.0", features = ["async"] } 28embedded-io-async = { version = "0.5.0" }
29static_cell = { version = "1.1", features = ["nightly"]} 29static_cell = { version = "1.1", features = ["nightly"]}
30 30
31[profile.release] 31[profile.release]
diff --git a/examples/stm32l5/src/bin/usb_ethernet.rs b/examples/stm32l5/src/bin/usb_ethernet.rs
index 5e75b21c9..15b84761b 100644
--- a/examples/stm32l5/src/bin/usb_ethernet.rs
+++ b/examples/stm32l5/src/bin/usb_ethernet.rs
@@ -13,7 +13,7 @@ use embassy_stm32::{bind_interrupts, peripherals, rng, usb, Config};
13use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState}; 13use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState};
14use embassy_usb::class::cdc_ncm::{CdcNcmClass, State}; 14use embassy_usb::class::cdc_ncm::{CdcNcmClass, State};
15use embassy_usb::{Builder, UsbDevice}; 15use embassy_usb::{Builder, UsbDevice};
16use embedded_io::asynch::Write; 16use embedded_io_async::Write;
17use rand_core::RngCore; 17use rand_core::RngCore;
18use static_cell::make_static; 18use static_cell::make_static;
19use {defmt_rtt as _, panic_probe as _}; 19use {defmt_rtt as _, panic_probe as _};
diff --git a/tests/nrf/Cargo.toml b/tests/nrf/Cargo.toml
index 7ce51aa5e..974a9413f 100644
--- a/tests/nrf/Cargo.toml
+++ b/tests/nrf/Cargo.toml
@@ -12,7 +12,7 @@ embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["de
12embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "nightly", "integrated-timers"] } 12embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "nightly", "integrated-timers"] }
13embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "nightly", "unstable-traits", "defmt-timestamp-uptime"] } 13embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "nightly", "unstable-traits", "defmt-timestamp-uptime"] }
14embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nightly", "unstable-traits", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac"] } 14embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nightly", "unstable-traits", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac"] }
15embedded-io = { version = "0.4.0", features = ["async"] } 15embedded-io-async = { version = "0.5.0" }
16embassy-net = { version = "0.1.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "nightly"] } 16embassy-net = { version = "0.1.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "nightly"] }
17embassy-net-esp-hosted = { version = "0.1.0", path = "../../embassy-net-esp-hosted", features = ["defmt"] } 17embassy-net-esp-hosted = { version = "0.1.0", path = "../../embassy-net-esp-hosted", features = ["defmt"] }
18embedded-hal-async = { version = "0.2.0-alpha.2" } 18embedded-hal-async = { version = "0.2.0-alpha.2" }
diff --git a/tests/rp/Cargo.toml b/tests/rp/Cargo.toml
index f2c902787..90a3bd0cf 100644
--- a/tests/rp/Cargo.toml
+++ b/tests/rp/Cargo.toml
@@ -26,7 +26,7 @@ embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11" }
26embedded-hal-async = { version = "=0.2.0-alpha.2" } 26embedded-hal-async = { version = "=0.2.0-alpha.2" }
27panic-probe = { version = "0.3.0", features = ["print-defmt"] } 27panic-probe = { version = "0.3.0", features = ["print-defmt"] }
28futures = { version = "0.3.17", default-features = false, features = ["async-await"] } 28futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
29embedded-io = { version = "0.4.0", features = ["async"] } 29embedded-io-async = { version = "0.5.0" }
30embedded-storage = { version = "0.3" } 30embedded-storage = { version = "0.3" }
31static_cell = { version = "1.1", features = ["nightly"]} 31static_cell = { version = "1.1", features = ["nightly"]}
32pio = "0.2" 32pio = "0.2"
diff --git a/tests/rp/src/bin/uart_buffered.rs b/tests/rp/src/bin/uart_buffered.rs
index e74e9986c..edabf55b7 100644
--- a/tests/rp/src/bin/uart_buffered.rs
+++ b/tests/rp/src/bin/uart_buffered.rs
@@ -11,7 +11,7 @@ use embassy_rp::gpio::{Level, Output};
11use embassy_rp::peripherals::UART0; 11use embassy_rp::peripherals::UART0;
12use embassy_rp::uart::{BufferedInterruptHandler, BufferedUart, BufferedUartRx, Config, Error, Instance, Parity}; 12use embassy_rp::uart::{BufferedInterruptHandler, BufferedUart, BufferedUartRx, Config, Error, Instance, Parity};
13use embassy_time::{Duration, Timer}; 13use embassy_time::{Duration, Timer};
14use embedded_io::asynch::{Read, ReadExactError, Write}; 14use embedded_io_async::{Read, ReadExactError, Write};
15use {defmt_rtt as _, panic_probe as _}; 15use {defmt_rtt as _, panic_probe as _};
16 16
17bind_interrupts!(struct Irqs { 17bind_interrupts!(struct Irqs {
diff --git a/tests/rp/src/bin/uart_upgrade.rs b/tests/rp/src/bin/uart_upgrade.rs
index 760e53954..effd0bc49 100644
--- a/tests/rp/src/bin/uart_upgrade.rs
+++ b/tests/rp/src/bin/uart_upgrade.rs
@@ -9,7 +9,7 @@ use embassy_executor::Spawner;
9use embassy_rp::bind_interrupts; 9use embassy_rp::bind_interrupts;
10use embassy_rp::peripherals::UART0; 10use embassy_rp::peripherals::UART0;
11use embassy_rp::uart::{BufferedInterruptHandler, Config, Uart}; 11use embassy_rp::uart::{BufferedInterruptHandler, Config, Uart};
12use embedded_io::asynch::{Read, Write}; 12use embedded_io_async::{Read, Write};
13use {defmt_rtt as _, panic_probe as _}; 13use {defmt_rtt as _, panic_probe as _};
14 14
15bind_interrupts!(struct Irqs { 15bind_interrupts!(struct Irqs {