diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-08-07 13:43:09 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-08-07 13:43:09 +0200 |
| commit | 5d5cd2371504915a531e669dce3558485a51a2e1 (patch) | |
| tree | 5d0093e9e5005d3a946e92686a9dc79565c3043f | |
| parent | 77844e2055319e1af7dd50fdb2e39ef88c6a5010 (diff) | |
Update to embedded-io 0.5 (#1752)
52 files changed, 149 insertions, 155 deletions
| @@ -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] |
| 15 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-net-v$VERSION/embassy-net/src/" | 15 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-net-v$VERSION/embassy-net/src/" |
| 16 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-net/src/" | 16 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-net/src/" |
| 17 | features = ["nightly", "unstable-traits", "defmt", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6", "medium-ethernet", "medium-ip", "medium-ieee802154", "igmp"] | 17 | features = ["nightly", "defmt", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6", "medium-ethernet", "medium-ip", "medium-ieee802154", "igmp"] |
| 18 | target = "thumbv7em-none-eabi" | 18 | target = "thumbv7em-none-eabi" |
| 19 | 19 | ||
| 20 | [package.metadata.docs.rs] | 20 | [package.metadata.docs.rs] |
| 21 | features = ["nightly", "unstable-traits", "defmt", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6", "medium-ethernet", "medium-ip", "medium-ieee802154", "igmp"] | 21 | features = ["nightly", "defmt", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6", "medium-ethernet", "medium-ip", "medium-ieee802154", "igmp"] |
| 22 | 22 | ||
| 23 | [features] | 23 | [features] |
| 24 | default = [] | 24 | default = [] |
| @@ -26,8 +26,7 @@ std = [] | |||
| 26 | 26 | ||
| 27 | defmt = ["dep:defmt", "smoltcp/defmt", "embassy-net-driver/defmt"] | 27 | defmt = ["dep:defmt", "smoltcp/defmt", "embassy-net-driver/defmt"] |
| 28 | 28 | ||
| 29 | nightly = ["dep:embedded-io", "embedded-io?/async", "dep:embedded-nal-async"] | 29 | nightly = ["dep:embedded-io-async", "dep:embedded-nal-async"] |
| 30 | unstable-traits = [] | ||
| 31 | 30 | ||
| 32 | udp = ["smoltcp/socket-udp"] | 31 | udp = ["smoltcp/socket-udp"] |
| 33 | tcp = ["smoltcp/socket-tcp"] | 32 | tcp = ["smoltcp/socket-tcp"] |
| @@ -53,7 +52,7 @@ smoltcp = { version = "0.10.0", default-features = false, features = [ | |||
| 53 | embassy-net-driver = { version = "0.1.0", path = "../embassy-net-driver" } | 52 | embassy-net-driver = { version = "0.1.0", path = "../embassy-net-driver" } |
| 54 | embassy-time = { version = "0.1.2", path = "../embassy-time" } | 53 | embassy-time = { version = "0.1.2", path = "../embassy-time" } |
| 55 | embassy-sync = { version = "0.2.0", path = "../embassy-sync" } | 54 | embassy-sync = { version = "0.2.0", path = "../embassy-sync" } |
| 56 | embedded-io = { version = "0.4.0", optional = true } | 55 | embedded-io-async = { version = "0.5.0", optional = true } |
| 57 | 56 | ||
| 58 | managed = { version = "0.8.0", default-features = false, features = [ "map" ] } | 57 | managed = { version = "0.8.0", default-features = false, features = [ "map" ] } |
| 59 | heapless = { version = "0.7.5", default-features = false } | 58 | heapless = { version = "0.7.5", default-features = false } |
| @@ -62,5 +61,5 @@ generic-array = { version = "0.14.4", default-features = false } | |||
| 62 | stable_deref_trait = { version = "1.2.0", default-features = false } | 61 | stable_deref_trait = { version = "1.2.0", default-features = false } |
| 63 | futures = { version = "0.3.17", default-features = false, features = [ "async-await" ] } | 62 | futures = { version = "0.3.17", default-features = false, features = [ "async-await" ] } |
| 64 | atomic-pool = "1.0" | 63 | atomic-pool = "1.0" |
| 65 | embedded-nal-async = { version = "0.4.0", optional = true } | 64 | embedded-nal-async = { version = "0.5.0", optional = true } |
| 66 | atomic-polyfill = { version = "1.0" } | 65 | atomic-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")] |
| 72 | impl<'a, D> embedded_nal_async::Dns for DnsSocket<'a, D> | 72 | impl<'a, D> embedded_nal_async::Dns for DnsSocket<'a, D> |
| 73 | where | 73 | where |
| 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> { | |||
| 382 | mod embedded_io_impls { | 382 | mod 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")] |
| 444 | pub mod client { | 444 | pub 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 | ||
| 33 | time = ["dep:embassy-time"] | 33 | time = ["dep:embassy-time"] |
| 34 | 34 | ||
| 35 | defmt = ["dep:defmt", "embassy-sync/defmt", "embassy-usb-driver?/defmt", "embedded-io?/defmt", "embassy-embedded-hal/defmt"] | 35 | defmt = ["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 |
| 38 | nightly = ["embedded-hal-1", "embedded-hal-async", "dep:embassy-usb-driver", "embedded-storage-async", "dep:embedded-io", "embassy-embedded-hal/nightly"] | 38 | nightly = ["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 | |||
| 100 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } | 100 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } |
| 101 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11", optional = true} | 101 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11", optional = true} |
| 102 | embedded-hal-async = { version = "=0.2.0-alpha.2", optional = true} | 102 | embedded-hal-async = { version = "=0.2.0-alpha.2", optional = true} |
| 103 | embedded-io = { version = "0.4.0", features = ["async"], optional = true } | 103 | embedded-io = { version = "0.5.0" } |
| 104 | embedded-io-async = { version = "0.5.0", optional = true } | ||
| 104 | 105 | ||
| 105 | defmt = { version = "0.3", optional = true } | 106 | defmt = { version = "0.3", optional = true } |
| 106 | log = { version = "0.4.14", optional = true } | 107 | log = { 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> { | |||
| 572 | mod _embedded_io { | 572 | mod _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 = [] | |||
| 52 | run-from-ram = [] | 52 | run-from-ram = [] |
| 53 | 53 | ||
| 54 | # Enable nightly-only features | 54 | # Enable nightly-only features |
| 55 | nightly = ["embedded-hal-1", "embedded-hal-async", "embedded-storage-async", "embassy-embedded-hal/nightly", "dep:embassy-usb-driver", "dep:embedded-io"] | 55 | nightly = ["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" | |||
| 75 | critical-section = "1.1" | 75 | critical-section = "1.1" |
| 76 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | 76 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
| 77 | chrono = { version = "0.4", default-features = false, optional = true } | 77 | chrono = { version = "0.4", default-features = false, optional = true } |
| 78 | embedded-io = { version = "0.4.0", features = ["async"], optional = true } | 78 | embedded-io = { version = "0.5.0" } |
| 79 | embedded-io-async = { version = "0.5.0", optional = true } | ||
| 79 | embedded-storage = { version = "0.3" } | 80 | embedded-storage = { version = "0.3" } |
| 80 | embedded-storage-async = { version = "0.4.0", optional = true } | 81 | embedded-storage-async = { version = "0.4.0", optional = true } |
| 81 | rand_core = "0.6.4" | 82 | rand_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 | ||
| 577 | impl<'d, T: Instance> embedded_io::Io for BufferedUart<'d, T> { | 577 | impl<'d, T: Instance> embedded_io_async::ErrorType for BufferedUart<'d, T> { |
| 578 | type Error = Error; | 578 | type Error = Error; |
| 579 | } | 579 | } |
| 580 | 580 | ||
| 581 | impl<'d, T: Instance> embedded_io::Io for BufferedUartRx<'d, T> { | 581 | impl<'d, T: Instance> embedded_io_async::ErrorType for BufferedUartRx<'d, T> { |
| 582 | type Error = Error; | 582 | type Error = Error; |
| 583 | } | 583 | } |
| 584 | 584 | ||
| 585 | impl<'d, T: Instance> embedded_io::Io for BufferedUartTx<'d, T> { | 585 | impl<'d, T: Instance> embedded_io_async::ErrorType for BufferedUartTx<'d, T> { |
| 586 | type Error = Error; | 586 | type Error = Error; |
| 587 | } | 587 | } |
| 588 | 588 | ||
| 589 | impl<'d, T: Instance + 'd> embedded_io::asynch::Read for BufferedUart<'d, T> { | 589 | impl<'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 | ||
| 595 | impl<'d, T: Instance + 'd> embedded_io::asynch::Read for BufferedUartRx<'d, T> { | 595 | impl<'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 | ||
| 601 | impl<'d, T: Instance + 'd> embedded_io::asynch::BufRead for BufferedUart<'d, T> { | 601 | impl<'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 | ||
| 611 | impl<'d, T: Instance + 'd> embedded_io::asynch::BufRead for BufferedUartRx<'d, T> { | 611 | impl<'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 | ||
| 621 | impl<'d, T: Instance + 'd> embedded_io::asynch::Write for BufferedUart<'d, T> { | 621 | impl<'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 | ||
| 631 | impl<'d, T: Instance + 'd> embedded_io::asynch::Write for BufferedUartTx<'d, T> { | 631 | impl<'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 | ||
| 641 | impl<'d, T: Instance + 'd> embedded_io::blocking::Read for BufferedUart<'d, T> { | 641 | impl<'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 | ||
| 647 | impl<'d, T: Instance + 'd> embedded_io::blocking::Read for BufferedUartRx<'d, T> { | 647 | impl<'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 | ||
| 653 | impl<'d, T: Instance + 'd> embedded_io::blocking::Write for BufferedUart<'d, T> { | 653 | impl<'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 | ||
| 663 | impl<'d, T: Instance + 'd> embedded_io::blocking::Write for BufferedUartTx<'d, T> { | 663 | impl<'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" | |||
| 64 | stm32-fmc = "0.2.4" | 64 | stm32-fmc = "0.2.4" |
| 65 | seq-macro = "0.3.0" | 65 | seq-macro = "0.3.0" |
| 66 | cfg-if = "1.0.0" | 66 | cfg-if = "1.0.0" |
| 67 | embedded-io = { version = "0.4.0", features = ["async"], optional = true } | 67 | embedded-io = { version = "0.5.0" } |
| 68 | embedded-io-async = { version = "0.5.0", optional = true } | ||
| 68 | chrono = { version = "^0.4", default-features = false, optional = true} | 69 | chrono = { version = "^0.4", default-features = false, optional = true} |
| 69 | bit_field = "0.10.2" | 70 | bit_field = "0.10.2" |
| 70 | document-features = "0.2.7" | 71 | document-features = "0.2.7" |
| @@ -84,7 +85,7 @@ default = ["rt"] | |||
| 84 | rt = ["stm32-metapac/rt"] | 85 | rt = ["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 |
| 87 | defmt = ["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"] | 88 | defmt = ["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 | ||
| 89 | exti = [] | 90 | exti = [] |
| 90 | 91 | ||
| @@ -92,7 +93,7 @@ exti = [] | |||
| 92 | memory-x = ["stm32-metapac/memory-x"] | 93 | memory-x = ["stm32-metapac/memory-x"] |
| 93 | 94 | ||
| 94 | ## Enable nightly-only features | 95 | ## Enable nightly-only features |
| 95 | nightly = ["embedded-hal-1", "embedded-hal-async", "embedded-storage-async", "dep:embedded-io", "dep:embassy-usb-driver", "embassy-embedded-hal/nightly"] | 96 | nightly = ["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 | ||
| 403 | impl embedded_io::Error for Error { | 403 | impl 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 | ||
| 409 | impl<'d, T: BasicInstance> embedded_io::Io for BufferedUart<'d, T> { | 409 | impl<'d, T: BasicInstance> embedded_io_async::ErrorType for BufferedUart<'d, T> { |
| 410 | type Error = Error; | 410 | type Error = Error; |
| 411 | } | 411 | } |
| 412 | 412 | ||
| 413 | impl<'d, T: BasicInstance> embedded_io::Io for BufferedUartRx<'d, T> { | 413 | impl<'d, T: BasicInstance> embedded_io_async::ErrorType for BufferedUartRx<'d, T> { |
| 414 | type Error = Error; | 414 | type Error = Error; |
| 415 | } | 415 | } |
| 416 | 416 | ||
| 417 | impl<'d, T: BasicInstance> embedded_io::Io for BufferedUartTx<'d, T> { | 417 | impl<'d, T: BasicInstance> embedded_io_async::ErrorType for BufferedUartTx<'d, T> { |
| 418 | type Error = Error; | 418 | type Error = Error; |
| 419 | } | 419 | } |
| 420 | 420 | ||
| 421 | impl<'d, T: BasicInstance> embedded_io::asynch::Read for BufferedUart<'d, T> { | 421 | impl<'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 | ||
| 427 | impl<'d, T: BasicInstance> embedded_io::asynch::Read for BufferedUartRx<'d, T> { | 427 | impl<'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 | ||
| 433 | impl<'d, T: BasicInstance> embedded_io::asynch::BufRead for BufferedUart<'d, T> { | 433 | impl<'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 | ||
| 443 | impl<'d, T: BasicInstance> embedded_io::asynch::BufRead for BufferedUartRx<'d, T> { | 443 | impl<'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 | ||
| 453 | impl<'d, T: BasicInstance> embedded_io::asynch::Write for BufferedUart<'d, T> { | 453 | impl<'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 | ||
| 463 | impl<'d, T: BasicInstance> embedded_io::asynch::Write for BufferedUartTx<'d, T> { | 463 | impl<'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 | ||
| 473 | impl<'d, T: BasicInstance> embedded_io::blocking::Read for BufferedUart<'d, T> { | 473 | impl<'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 | ||
| 479 | impl<'d, T: BasicInstance> embedded_io::blocking::Read for BufferedUartRx<'d, T> { | 479 | impl<'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 | ||
| 485 | impl<'d, T: BasicInstance> embedded_io::blocking::Write for BufferedUart<'d, T> { | 485 | impl<'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 | ||
| 495 | impl<'d, T: BasicInstance> embedded_io::blocking::Write for BufferedUartTx<'d, T> { | 495 | impl<'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"))] |
| 1024 | mod eio { | 1024 | mod 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"))] |
| 222 | mod eio { | 222 | mod 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" | |||
| 23 | features = ["nightly"] | 23 | features = ["nightly"] |
| 24 | 24 | ||
| 25 | [features] | 25 | [features] |
| 26 | nightly = ["embedded-io/async"] | 26 | nightly = ["dep:embedded-io-async"] |
| 27 | std = [] | 27 | std = [] |
| 28 | turbowakers = [] | 28 | turbowakers = [] |
| 29 | 29 | ||
| @@ -35,7 +35,7 @@ futures-util = { version = "0.3.17", default-features = false } | |||
| 35 | critical-section = "1.1" | 35 | critical-section = "1.1" |
| 36 | heapless = "0.7.5" | 36 | heapless = "0.7.5" |
| 37 | cfg-if = "1.0.0" | 37 | cfg-if = "1.0.0" |
| 38 | embedded-io = "0.4.0" | 38 | embedded-io-async = { version = "0.5.0", optional = true } |
| 39 | 39 | ||
| 40 | [dev-dependencies] | 40 | [dev-dependencies] |
| 41 | futures-executor = { version = "0.3.17", features = [ "thread-pool" ] } | 41 | futures-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 | |||
| 33 | embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } | 33 | embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } |
| 34 | embassy-net = { version = "0.1.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"], optional = true } | 34 | embassy-net = { version = "0.1.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"], optional = true } |
| 35 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt", "msos-descriptor",], optional = true } | 35 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt", "msos-descriptor",], optional = true } |
| 36 | embedded-io = "0.4.0" | 36 | embedded-io = { version = "0.5.0", features = ["defmt-03"] } |
| 37 | embedded-io-async = { version = "0.5.0", optional = true, features = ["defmt-03"] } | ||
| 37 | embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["time", "defmt"], optional = true } | 38 | embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["time", "defmt"], optional = true } |
| 38 | lora-phy = { version = "1", optional = true } | 39 | lora-phy = { version = "1", optional = true } |
| 39 | lorawan-device = { version = "0.10.0", default-features = false, features = ["async", "external-lora-phy"], optional = true } | 40 | lorawan-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::*; | |||
| 6 | use embassy_executor::Spawner; | 6 | use embassy_executor::Spawner; |
| 7 | use embassy_nrf::buffered_uarte::{self, BufferedUarte}; | 7 | use embassy_nrf::buffered_uarte::{self, BufferedUarte}; |
| 8 | use embassy_nrf::{bind_interrupts, peripherals, uarte}; | 8 | use embassy_nrf::{bind_interrupts, peripherals, uarte}; |
| 9 | use embedded_io::asynch::Write; | 9 | use embedded_io_async::Write; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 10 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 11 | ||
| 12 | bind_interrupts!(struct Irqs { | 12 | bind_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}; | |||
| 15 | use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState}; | 15 | use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState}; |
| 16 | use embassy_usb::class::cdc_ncm::{CdcNcmClass, State}; | 16 | use embassy_usb::class::cdc_ncm::{CdcNcmClass, State}; |
| 17 | use embassy_usb::{Builder, Config, UsbDevice}; | 17 | use embassy_usb::{Builder, Config, UsbDevice}; |
| 18 | use embedded_io::asynch::Write; | 18 | use embedded_io_async::Write; |
| 19 | use static_cell::make_static; | 19 | use static_cell::make_static; |
| 20 | use {defmt_rtt as _, panic_probe as _}; | 20 | use {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}; | |||
| 12 | use embassy_nrf::{bind_interrupts, peripherals}; | 12 | use embassy_nrf::{bind_interrupts, peripherals}; |
| 13 | use embassy_time::Delay; | 13 | use embassy_time::Delay; |
| 14 | use embedded_hal_async::spi::ExclusiveDevice; | 14 | use embedded_hal_async::spi::ExclusiveDevice; |
| 15 | use embedded_io::asynch::Write; | 15 | use embedded_io_async::Write; |
| 16 | use static_cell::make_static; | 16 | use static_cell::make_static; |
| 17 | use {defmt_rtt as _, embassy_net_esp_hosted as hosted, panic_probe as _}; | 17 | use {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 = [ | |||
| 37 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = [ | 37 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = [ |
| 38 | "defmt", | 38 | "defmt", |
| 39 | ] } | 39 | ] } |
| 40 | embedded-io = { version = "0.4.0", features = [ "async" ]} | 40 | embedded-io-async = { version = "0.5.0" } |
| 41 | 41 | ||
| 42 | defmt = "0.3" | 42 | defmt = "0.3" |
| 43 | defmt-rtt = "0.4" | 43 | defmt-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 | ||
| 45 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11" } | 45 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11" } |
| 46 | embedded-hal-async = "0.2.0-alpha.2" | 46 | embedded-hal-async = "0.2.0-alpha.2" |
| 47 | embedded-io = { version = "0.4.0", features = ["async", "defmt"] } | 47 | embedded-io-async = { version = "0.5.0", features = ["defmt-03"] } |
| 48 | embedded-storage = { version = "0.3" } | 48 | embedded-storage = { version = "0.3" } |
| 49 | static_cell = { version = "1.1", features = ["nightly"]} | 49 | static_cell = { version = "1.1", features = ["nightly"]} |
| 50 | log = "0.4" | 50 | log = "0.4" |
| @@ -53,4 +53,4 @@ pio = "0.2.1" | |||
| 53 | rand = { version = "0.8.5", default-features = false } | 53 | rand = { version = "0.8.5", default-features = false } |
| 54 | 54 | ||
| 55 | [profile.release] | 55 | [profile.release] |
| 56 | debug = 2 | 56 | debug = 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}; | |||
| 17 | use embassy_rp::spi::{Async, Config as SpiConfig, Spi}; | 17 | use embassy_rp::spi::{Async, Config as SpiConfig, Spi}; |
| 18 | use embassy_time::{Delay, Duration}; | 18 | use embassy_time::{Delay, Duration}; |
| 19 | use embedded_hal_async::spi::ExclusiveDevice; | 19 | use embedded_hal_async::spi::ExclusiveDevice; |
| 20 | use embedded_io::asynch::Write; | 20 | use embedded_io_async::Write; |
| 21 | use rand::RngCore; | 21 | use rand::RngCore; |
| 22 | use static_cell::make_static; | 22 | use static_cell::make_static; |
| 23 | use {defmt_rtt as _, panic_probe as _}; | 23 | use {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}; | |||
| 19 | use embassy_rp::spi::{Async, Config as SpiConfig, Spi}; | 19 | use embassy_rp::spi::{Async, Config as SpiConfig, Spi}; |
| 20 | use embassy_time::{Delay, Duration, Timer}; | 20 | use embassy_time::{Delay, Duration, Timer}; |
| 21 | use embedded_hal_async::spi::ExclusiveDevice; | 21 | use embedded_hal_async::spi::ExclusiveDevice; |
| 22 | use embedded_io::asynch::Write; | 22 | use embedded_io_async::Write; |
| 23 | use rand::RngCore; | 23 | use rand::RngCore; |
| 24 | use static_cell::make_static; | 24 | use static_cell::make_static; |
| 25 | use {defmt_rtt as _, panic_probe as _}; | 25 | use {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}; | |||
| 18 | use embassy_rp::spi::{Async, Config as SpiConfig, Spi}; | 18 | use embassy_rp::spi::{Async, Config as SpiConfig, Spi}; |
| 19 | use embassy_time::{Delay, Duration}; | 19 | use embassy_time::{Delay, Duration}; |
| 20 | use embedded_hal_async::spi::ExclusiveDevice; | 20 | use embedded_hal_async::spi::ExclusiveDevice; |
| 21 | use embedded_io::asynch::Write; | 21 | use embedded_io_async::Write; |
| 22 | use rand::RngCore; | 22 | use rand::RngCore; |
| 23 | use static_cell::make_static; | 23 | use static_cell::make_static; |
| 24 | use {defmt_rtt as _, panic_probe as _}; | 24 | use {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; | |||
| 23 | use embassy_usb::class::cdc_acm::{CdcAcmClass, Receiver, Sender, State}; | 23 | use embassy_usb::class::cdc_acm::{CdcAcmClass, Receiver, Sender, State}; |
| 24 | use embassy_usb::driver::EndpointError; | 24 | use embassy_usb::driver::EndpointError; |
| 25 | use embassy_usb::{Builder, Config}; | 25 | use embassy_usb::{Builder, Config}; |
| 26 | use embedded_io::asynch::{Read, Write}; | 26 | use embedded_io_async::{Read, Write}; |
| 27 | use {defmt_rtt as _, panic_probe as _}; | 27 | use {defmt_rtt as _, panic_probe as _}; |
| 28 | 28 | ||
| 29 | use crate::uart::PioUart; | 29 | use 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; | |||
| 14 | use embassy_rp::peripherals::UART0; | 14 | use embassy_rp::peripherals::UART0; |
| 15 | use embassy_rp::uart::{BufferedInterruptHandler, BufferedUart, BufferedUartRx, Config}; | 15 | use embassy_rp::uart::{BufferedInterruptHandler, BufferedUart, BufferedUartRx, Config}; |
| 16 | use embassy_time::{Duration, Timer}; | 16 | use embassy_time::{Duration, Timer}; |
| 17 | use embedded_io::asynch::{Read, Write}; | 17 | use embedded_io_async::{Read, Write}; |
| 18 | use static_cell::make_static; | 18 | use static_cell::make_static; |
| 19 | use {defmt_rtt as _, panic_probe as _}; | 19 | use {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}; | |||
| 16 | use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState}; | 16 | use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState}; |
| 17 | use embassy_usb::class::cdc_ncm::{CdcNcmClass, State}; | 17 | use embassy_usb::class::cdc_ncm::{CdcNcmClass, State}; |
| 18 | use embassy_usb::{Builder, Config, UsbDevice}; | 18 | use embassy_usb::{Builder, Config, UsbDevice}; |
| 19 | use embedded_io::asynch::Write; | 19 | use embedded_io_async::Write; |
| 20 | use static_cell::make_static; | 20 | use static_cell::make_static; |
| 21 | use {defmt_rtt as _, panic_probe as _}; | 21 | use {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}; | |||
| 19 | use embassy_rp::peripherals::{DMA_CH0, PIN_23, PIN_25, PIO0}; | 19 | use embassy_rp::peripherals::{DMA_CH0, PIN_23, PIN_25, PIO0}; |
| 20 | use embassy_rp::pio::{InterruptHandler, Pio}; | 20 | use embassy_rp::pio::{InterruptHandler, Pio}; |
| 21 | use embassy_time::Duration; | 21 | use embassy_time::Duration; |
| 22 | use embedded_io::asynch::Write; | 22 | use embedded_io_async::Write; |
| 23 | use static_cell::make_static; | 23 | use static_cell::make_static; |
| 24 | use {defmt_rtt as _, panic_probe as _}; | 24 | use {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}; | |||
| 19 | use embassy_rp::peripherals::{DMA_CH0, PIN_23, PIN_25, PIO0}; | 19 | use embassy_rp::peripherals::{DMA_CH0, PIN_23, PIN_25, PIO0}; |
| 20 | use embassy_rp::pio::{InterruptHandler, Pio}; | 20 | use embassy_rp::pio::{InterruptHandler, Pio}; |
| 21 | use embassy_time::Duration; | 21 | use embassy_time::Duration; |
| 22 | use embedded_io::asynch::Write; | 22 | use embedded_io_async::Write; |
| 23 | use static_cell::make_static; | 23 | use static_cell::make_static; |
| 24 | use {defmt_rtt as _, panic_probe as _}; | 24 | use {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" | |||
| 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["log"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["log"] } |
| 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-std", "executor-thread", "log", "nightly", "integrated-timers"] } | 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-std", "executor-thread", "log", "nightly", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["log", "std", "nightly"] } | 10 | embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["log", "std", "nightly"] } |
| 11 | embassy-net = { version = "0.1.0", path = "../../embassy-net", features=[ "std", "nightly", "log", "medium-ethernet", "tcp", "udp", "dns", "dhcpv4", "unstable-traits", "proto-ipv6"] } | 11 | embassy-net = { version = "0.1.0", path = "../../embassy-net", features=[ "std", "nightly", "log", "medium-ethernet", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6"] } |
| 12 | embassy-net-tuntap = { version = "0.1.0", path = "../../embassy-net-tuntap" } | 12 | embassy-net-tuntap = { version = "0.1.0", path = "../../embassy-net-tuntap" } |
| 13 | embedded-io = { version = "0.4.0", features = ["async", "std", "futures"] } | 13 | embedded-io-async = { version = "0.5.0" } |
| 14 | embedded-io-adapters = { version = "0.5.0", features = ["futures-03"] } | ||
| 14 | critical-section = { version = "1.1", features = ["std"] } | 15 | critical-section = { version = "1.1", features = ["std"] } |
| 15 | 16 | ||
| 16 | async-io = "1.6.0" | 17 | async-io = "1.6.0" |
diff --git a/examples/std/src/bin/net.rs b/examples/std/src/bin/net.rs index e0de14162..8d8345057 100644 --- a/examples/std/src/bin/net.rs +++ b/examples/std/src/bin/net.rs | |||
| @@ -8,7 +8,7 @@ use embassy_net::tcp::TcpSocket; | |||
| 8 | use embassy_net::{Config, Ipv4Address, Ipv4Cidr, Stack, StackResources}; | 8 | use embassy_net::{Config, Ipv4Address, Ipv4Cidr, Stack, StackResources}; |
| 9 | use embassy_net_tuntap::TunTapDevice; | 9 | use embassy_net_tuntap::TunTapDevice; |
| 10 | use embassy_time::Duration; | 10 | use embassy_time::Duration; |
| 11 | use embedded_io::asynch::Write; | 11 | use embedded_io_async::Write; |
| 12 | use heapless::Vec; | 12 | use heapless::Vec; |
| 13 | use log::*; | 13 | use log::*; |
| 14 | use rand_core::{OsRng, RngCore}; | 14 | use rand_core::{OsRng, RngCore}; |
diff --git a/examples/std/src/bin/serial.rs b/examples/std/src/bin/serial.rs index 85ee54f70..0b289c74d 100644 --- a/examples/std/src/bin/serial.rs +++ b/examples/std/src/bin/serial.rs | |||
| @@ -5,7 +5,7 @@ mod serial_port; | |||
| 5 | 5 | ||
| 6 | use async_io::Async; | 6 | use async_io::Async; |
| 7 | use embassy_executor::Executor; | 7 | use embassy_executor::Executor; |
| 8 | use embedded_io::asynch::Read; | 8 | use embedded_io_async::Read; |
| 9 | use log::*; | 9 | use log::*; |
| 10 | use nix::sys::termios; | 10 | use nix::sys::termios; |
| 11 | use static_cell::StaticCell; | 11 | use 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; | |||
| 9 | use embassy_net::{Config, Ipv4Address, Ipv4Cidr, Stack, StackResources}; | 9 | use embassy_net::{Config, Ipv4Address, Ipv4Cidr, Stack, StackResources}; |
| 10 | use embassy_net_tuntap::TunTapDevice; | 10 | use embassy_net_tuntap::TunTapDevice; |
| 11 | use embassy_time::{Duration, Timer}; | 11 | use embassy_time::{Duration, Timer}; |
| 12 | use embedded_io::asynch::Write as _; | 12 | use embedded_io_async::Write as _; |
| 13 | use heapless::Vec; | 13 | use heapless::Vec; |
| 14 | use log::*; | 14 | use log::*; |
| 15 | use rand_core::{OsRng, RngCore}; | 15 | use 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" | |||
| 19 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 19 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 20 | cortex-m-rt = "0.7.0" | 20 | cortex-m-rt = "0.7.0" |
| 21 | embedded-hal = "0.2.6" | 21 | embedded-hal = "0.2.6" |
| 22 | embedded-io = "0.4.0" | 22 | embedded-io = { version = "0.5.0" } |
| 23 | embedded-io-async = { version = "0.5.0" } | ||
| 23 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 24 | panic-probe = { version = "0.3", features = ["print-defmt"] } |
| 24 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | 25 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
| 25 | heapless = { version = "0.7.5", default-features = false } | 26 | heapless = { 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; | |||
| 13 | use embassy_stm32::time::mhz; | 13 | use embassy_stm32::time::mhz; |
| 14 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; | 14 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; |
| 15 | use embassy_time::{Duration, Timer}; | 15 | use embassy_time::{Duration, Timer}; |
| 16 | use embedded_io::asynch::Write; | 16 | use embedded_io_async::Write; |
| 17 | use static_cell::make_static; | 17 | use static_cell::make_static; |
| 18 | use {defmt_rtt as _, panic_probe as _}; | 18 | use {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::*; | |||
| 6 | use embassy_executor::Spawner; | 6 | use embassy_executor::Spawner; |
| 7 | use embassy_stm32::usart::{BufferedUart, Config}; | 7 | use embassy_stm32::usart::{BufferedUart, Config}; |
| 8 | use embassy_stm32::{bind_interrupts, peripherals, usart}; | 8 | use embassy_stm32::{bind_interrupts, peripherals, usart}; |
| 9 | use embedded_io::asynch::BufRead; | 9 | use embedded_io_async::BufRead; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 10 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 11 | ||
| 12 | bind_interrupts!(struct Irqs { | 12 | bind_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}; | |||
| 13 | use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState}; | 13 | use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState}; |
| 14 | use embassy_usb::class::cdc_ncm::{CdcNcmClass, State}; | 14 | use embassy_usb::class::cdc_ncm::{CdcNcmClass, State}; |
| 15 | use embassy_usb::{Builder, UsbDevice}; | 15 | use embassy_usb::{Builder, UsbDevice}; |
| 16 | use embedded_io::asynch::Write; | 16 | use embedded_io_async::Write; |
| 17 | use static_cell::make_static; | 17 | use static_cell::make_static; |
| 18 | use {defmt_rtt as _, panic_probe as _}; | 18 | use {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 | |||
| 11 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 11 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 12 | embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet"] } | 13 | embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet"] } |
| 14 | embedded-io = { version = "0.4.0", features = ["async"] } | 14 | embedded-io-async = { version = "0.5.0" } |
| 15 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | 15 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } |
| 16 | 16 | ||
| 17 | defmt = "0.3" | 17 | defmt = "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; | |||
| 13 | use embassy_stm32::time::mhz; | 13 | use embassy_stm32::time::mhz; |
| 14 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; | 14 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; |
| 15 | use embassy_time::{Duration, Timer}; | 15 | use embassy_time::{Duration, Timer}; |
| 16 | use embedded_io::asynch::Write; | 16 | use embedded_io_async::Write; |
| 17 | use rand_core::RngCore; | 17 | use rand_core::RngCore; |
| 18 | use static_cell::make_static; | 18 | use static_cell::make_static; |
| 19 | use {defmt_rtt as _, panic_probe as _}; | 19 | use {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 = [" | |||
| 10 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 11 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 12 | embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } |
| 13 | embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "unstable-traits", "proto-ipv6"] } | 13 | embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6"] } |
| 14 | embedded-io = { version = "0.4.0", features = ["async"] } | 14 | embedded-io-async = { version = "0.5.0" } |
| 15 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | 15 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } |
| 16 | 16 | ||
| 17 | defmt = "0.3" | 17 | defmt = "0.3" |
| @@ -22,7 +22,7 @@ cortex-m-rt = "0.7.0" | |||
| 22 | embedded-hal = "0.2.6" | 22 | embedded-hal = "0.2.6" |
| 23 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11" } | 23 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11" } |
| 24 | embedded-hal-async = { version = "=0.2.0-alpha.2" } | 24 | embedded-hal-async = { version = "=0.2.0-alpha.2" } |
| 25 | embedded-nal-async = "0.4.0" | 25 | embedded-nal-async = { version = "0.5.0" } |
| 26 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 26 | panic-probe = { version = "0.3", features = ["print-defmt"] } |
| 27 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | 27 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
| 28 | heapless = { version = "0.7.5", default-features = false } | 28 | heapless = { 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; | |||
| 14 | use embassy_stm32::time::Hertz; | 14 | use embassy_stm32::time::Hertz; |
| 15 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; | 15 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; |
| 16 | use embassy_time::{Duration, Timer}; | 16 | use embassy_time::{Duration, Timer}; |
| 17 | use embedded_io::asynch::Write; | 17 | use embedded_io_async::Write; |
| 18 | use rand_core::RngCore; | 18 | use rand_core::RngCore; |
| 19 | use static_cell::make_static; | 19 | use static_cell::make_static; |
| 20 | use {defmt_rtt as _, panic_probe as _}; | 20 | use {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 = [" | |||
| 10 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 11 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 12 | embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } |
| 13 | embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "unstable-traits", "proto-ipv6"] } | 13 | embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6"] } |
| 14 | embedded-io = { version = "0.4.0", features = ["async"] } | 14 | embedded-io-async = { version = "0.5.0" } |
| 15 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | 15 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } |
| 16 | 16 | ||
| 17 | defmt = "0.3" | 17 | defmt = "0.3" |
| @@ -22,7 +22,7 @@ cortex-m-rt = "0.7.0" | |||
| 22 | embedded-hal = "0.2.6" | 22 | embedded-hal = "0.2.6" |
| 23 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11" } | 23 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11" } |
| 24 | embedded-hal-async = { version = "=0.2.0-alpha.2" } | 24 | embedded-hal-async = { version = "=0.2.0-alpha.2" } |
| 25 | embedded-nal-async = "0.4.0" | 25 | embedded-nal-async = { version = "0.5.0" } |
| 26 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 26 | panic-probe = { version = "0.3", features = ["print-defmt"] } |
| 27 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | 27 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
| 28 | heapless = { version = "0.7.5", default-features = false } | 28 | heapless = { 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; | |||
| 13 | use embassy_stm32::time::mhz; | 13 | use embassy_stm32::time::mhz; |
| 14 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; | 14 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; |
| 15 | use embassy_time::{Duration, Timer}; | 15 | use embassy_time::{Duration, Timer}; |
| 16 | use embedded_io::asynch::Write; | 16 | use embedded_io_async::Write; |
| 17 | use rand_core::RngCore; | 17 | use rand_core::RngCore; |
| 18 | use static_cell::make_static; | 18 | use static_cell::make_static; |
| 19 | use {defmt_rtt as _, panic_probe as _}; | 19 | use {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; | |||
| 13 | use embassy_stm32::time::mhz; | 13 | use embassy_stm32::time::mhz; |
| 14 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; | 14 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; |
| 15 | use embassy_time::{Duration, Timer}; | 15 | use embassy_time::{Duration, Timer}; |
| 16 | use embedded_io::asynch::Write; | 16 | use embedded_io_async::Write; |
| 17 | use embedded_nal_async::{Ipv4Addr, SocketAddr, SocketAddrV4, TcpConnect}; | 17 | use embedded_nal_async::{Ipv4Addr, SocketAddr, SocketAddrV4, TcpConnect}; |
| 18 | use rand_core::RngCore; | 18 | use rand_core::RngCore; |
| 19 | use static_cell::make_static; | 19 | use 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] |
| 8 | default = ["nightly"] | 8 | default = ["nightly"] |
| 9 | nightly = ["embassy-stm32/nightly", "embassy-time/nightly", "embassy-time/unstable-traits", "embassy-executor/nightly", | 9 | nightly = ["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" | |||
| 24 | defmt-rtt = "0.4" | 24 | defmt-rtt = "0.4" |
| 25 | 25 | ||
| 26 | embedded-storage = "0.3.0" | 26 | embedded-storage = "0.3.0" |
| 27 | embedded-io = "0.4.0" | 27 | embedded-io = { version = "0.5.0" } |
| 28 | embedded-io-async = { version = "0.5.0", optional = true } | ||
| 28 | 29 | ||
| 29 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 30 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 30 | cortex-m-rt = "0.7.0" | 31 | cortex-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::*; | |||
| 6 | use embassy_executor::Spawner; | 6 | use embassy_executor::Spawner; |
| 7 | use embassy_stm32::usart::{BufferedUart, Config}; | 7 | use embassy_stm32::usart::{BufferedUart, Config}; |
| 8 | use embassy_stm32::{bind_interrupts, peripherals, usart}; | 8 | use embassy_stm32::{bind_interrupts, peripherals, usart}; |
| 9 | use embedded_io::asynch::{Read, Write}; | 9 | use embedded_io_async::{Read, Write}; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 10 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 11 | ||
| 12 | bind_interrupts!(struct Irqs { | 12 | bind_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" | |||
| 25 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | 25 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
| 26 | heapless = { version = "0.7.5", default-features = false } | 26 | heapless = { version = "0.7.5", default-features = false } |
| 27 | rand_core = { version = "0.6.3", default-features = false } | 27 | rand_core = { version = "0.6.3", default-features = false } |
| 28 | embedded-io = { version = "0.4.0", features = ["async"] } | 28 | embedded-io-async = { version = "0.5.0" } |
| 29 | static_cell = { version = "1.1", features = ["nightly"]} | 29 | static_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}; | |||
| 13 | use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState}; | 13 | use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState}; |
| 14 | use embassy_usb::class::cdc_ncm::{CdcNcmClass, State}; | 14 | use embassy_usb::class::cdc_ncm::{CdcNcmClass, State}; |
| 15 | use embassy_usb::{Builder, UsbDevice}; | 15 | use embassy_usb::{Builder, UsbDevice}; |
| 16 | use embedded_io::asynch::Write; | 16 | use embedded_io_async::Write; |
| 17 | use rand_core::RngCore; | 17 | use rand_core::RngCore; |
| 18 | use static_cell::make_static; | 18 | use static_cell::make_static; |
| 19 | use {defmt_rtt as _, panic_probe as _}; | 19 | use {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 | |||
| 12 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "nightly", "integrated-timers"] } | 12 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "nightly", "integrated-timers"] } |
| 13 | embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "nightly", "unstable-traits", "defmt-timestamp-uptime"] } | 13 | embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "nightly", "unstable-traits", "defmt-timestamp-uptime"] } |
| 14 | embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nightly", "unstable-traits", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac"] } | 14 | embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nightly", "unstable-traits", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac"] } |
| 15 | embedded-io = { version = "0.4.0", features = ["async"] } | 15 | embedded-io-async = { version = "0.5.0" } |
| 16 | embassy-net = { version = "0.1.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "nightly"] } | 16 | embassy-net = { version = "0.1.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "nightly"] } |
| 17 | embassy-net-esp-hosted = { version = "0.1.0", path = "../../embassy-net-esp-hosted", features = ["defmt"] } | 17 | embassy-net-esp-hosted = { version = "0.1.0", path = "../../embassy-net-esp-hosted", features = ["defmt"] } |
| 18 | embedded-hal-async = { version = "0.2.0-alpha.2" } | 18 | embedded-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" } | |||
| 26 | embedded-hal-async = { version = "=0.2.0-alpha.2" } | 26 | embedded-hal-async = { version = "=0.2.0-alpha.2" } |
| 27 | panic-probe = { version = "0.3.0", features = ["print-defmt"] } | 27 | panic-probe = { version = "0.3.0", features = ["print-defmt"] } |
| 28 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | 28 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
| 29 | embedded-io = { version = "0.4.0", features = ["async"] } | 29 | embedded-io-async = { version = "0.5.0" } |
| 30 | embedded-storage = { version = "0.3" } | 30 | embedded-storage = { version = "0.3" } |
| 31 | static_cell = { version = "1.1", features = ["nightly"]} | 31 | static_cell = { version = "1.1", features = ["nightly"]} |
| 32 | pio = "0.2" | 32 | pio = "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}; | |||
| 11 | use embassy_rp::peripherals::UART0; | 11 | use embassy_rp::peripherals::UART0; |
| 12 | use embassy_rp::uart::{BufferedInterruptHandler, BufferedUart, BufferedUartRx, Config, Error, Instance, Parity}; | 12 | use embassy_rp::uart::{BufferedInterruptHandler, BufferedUart, BufferedUartRx, Config, Error, Instance, Parity}; |
| 13 | use embassy_time::{Duration, Timer}; | 13 | use embassy_time::{Duration, Timer}; |
| 14 | use embedded_io::asynch::{Read, ReadExactError, Write}; | 14 | use embedded_io_async::{Read, ReadExactError, Write}; |
| 15 | use {defmt_rtt as _, panic_probe as _}; | 15 | use {defmt_rtt as _, panic_probe as _}; |
| 16 | 16 | ||
| 17 | bind_interrupts!(struct Irqs { | 17 | bind_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; | |||
| 9 | use embassy_rp::bind_interrupts; | 9 | use embassy_rp::bind_interrupts; |
| 10 | use embassy_rp::peripherals::UART0; | 10 | use embassy_rp::peripherals::UART0; |
| 11 | use embassy_rp::uart::{BufferedInterruptHandler, Config, Uart}; | 11 | use embassy_rp::uart::{BufferedInterruptHandler, Config, Uart}; |
| 12 | use embedded_io::asynch::{Read, Write}; | 12 | use embedded_io_async::{Read, Write}; |
| 13 | use {defmt_rtt as _, panic_probe as _}; | 13 | use {defmt_rtt as _, panic_probe as _}; |
| 14 | 14 | ||
| 15 | bind_interrupts!(struct Irqs { | 15 | bind_interrupts!(struct Irqs { |
