diff options
| -rw-r--r-- | embassy-net-ppp/Cargo.toml | 2 | ||||
| -rw-r--r-- | embassy-net/Cargo.toml | 4 | ||||
| -rw-r--r-- | embassy-net/src/dns.rs | 17 | ||||
| -rw-r--r-- | embassy-net/src/tcp.rs | 12 | ||||
| -rw-r--r-- | examples/nrf9160/src/bin/modem_tcp_client.rs | 12 | ||||
| -rw-r--r-- | examples/rp/Cargo.toml | 4 | ||||
| -rw-r--r-- | examples/rp23/Cargo.toml | 2 | ||||
| -rw-r--r-- | examples/std/src/bin/net_ppp.rs | 6 | ||||
| -rw-r--r-- | examples/stm32h5/Cargo.toml | 2 | ||||
| -rw-r--r-- | examples/stm32h7/Cargo.toml | 2 | ||||
| -rw-r--r-- | examples/stm32h7/src/bin/eth_client.rs | 4 | ||||
| -rw-r--r-- | examples/stm32h7/src/bin/eth_client_mii.rs | 4 | ||||
| -rw-r--r-- | examples/stm32h755cm4/Cargo.toml | 2 | ||||
| -rw-r--r-- | examples/stm32h755cm7/Cargo.toml | 2 | ||||
| -rw-r--r-- | examples/stm32h7rs/Cargo.toml | 2 | ||||
| -rw-r--r-- | examples/stm32l4/src/bin/spe_adin1110_http_server.rs | 2 |
16 files changed, 37 insertions, 42 deletions
diff --git a/embassy-net-ppp/Cargo.toml b/embassy-net-ppp/Cargo.toml index f6371f955..d2f43ef45 100644 --- a/embassy-net-ppp/Cargo.toml +++ b/embassy-net-ppp/Cargo.toml | |||
| @@ -20,7 +20,7 @@ log = { version = "0.4.14", optional = true } | |||
| 20 | embedded-io-async = { version = "0.6.1" } | 20 | embedded-io-async = { version = "0.6.1" } |
| 21 | embassy-net-driver-channel = { version = "0.3.0", path = "../embassy-net-driver-channel" } | 21 | embassy-net-driver-channel = { version = "0.3.0", path = "../embassy-net-driver-channel" } |
| 22 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } | 22 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } |
| 23 | ppproto = { version = "0.1.2"} | 23 | ppproto = { version = "0.2.0"} |
| 24 | embassy-sync = { version = "0.6.0", path = "../embassy-sync" } | 24 | embassy-sync = { version = "0.6.0", path = "../embassy-sync" } |
| 25 | 25 | ||
| 26 | [package.metadata.embassy_docs] | 26 | [package.metadata.embassy_docs] |
diff --git a/embassy-net/Cargo.toml b/embassy-net/Cargo.toml index 2e21b4231..a33c693fc 100644 --- a/embassy-net/Cargo.toml +++ b/embassy-net/Cargo.toml | |||
| @@ -68,7 +68,7 @@ multicast = ["smoltcp/multicast"] | |||
| 68 | defmt = { version = "0.3", optional = true } | 68 | defmt = { version = "0.3", optional = true } |
| 69 | log = { version = "0.4.14", optional = true } | 69 | log = { version = "0.4.14", optional = true } |
| 70 | 70 | ||
| 71 | smoltcp = { git="https://github.com/smoltcp-rs/smoltcp", rev="dd43c8f189178b0ab3bda798ed8578b5b0a6f094", default-features = false, features = [ | 71 | smoltcp = { git="https://github.com/smoltcp-rs/smoltcp", rev="b65e1b64dc9b66fa984a2ad34e90685cb0b606de", default-features = false, features = [ |
| 72 | "socket", | 72 | "socket", |
| 73 | "async", | 73 | "async", |
| 74 | ] } | 74 | ] } |
| @@ -80,5 +80,5 @@ embedded-io-async = { version = "0.6.1" } | |||
| 80 | 80 | ||
| 81 | managed = { version = "0.8.0", default-features = false, features = [ "map" ] } | 81 | managed = { version = "0.8.0", default-features = false, features = [ "map" ] } |
| 82 | heapless = { version = "0.8", default-features = false } | 82 | heapless = { version = "0.8", default-features = false } |
| 83 | embedded-nal-async = { version = "0.7.1" } | 83 | embedded-nal-async = "0.8.0" |
| 84 | document-features = "0.2.7" | 84 | document-features = "0.2.7" |
diff --git a/embassy-net/src/dns.rs b/embassy-net/src/dns.rs index 1fbaea4f0..dbe73776c 100644 --- a/embassy-net/src/dns.rs +++ b/embassy-net/src/dns.rs | |||
| @@ -73,8 +73,11 @@ impl<'a> embedded_nal_async::Dns for DnsSocket<'a> { | |||
| 73 | &self, | 73 | &self, |
| 74 | host: &str, | 74 | host: &str, |
| 75 | addr_type: embedded_nal_async::AddrType, | 75 | addr_type: embedded_nal_async::AddrType, |
| 76 | ) -> Result<embedded_nal_async::IpAddr, Self::Error> { | 76 | ) -> Result<core::net::IpAddr, Self::Error> { |
| 77 | use embedded_nal_async::{AddrType, IpAddr}; | 77 | use core::net::IpAddr; |
| 78 | |||
| 79 | use embedded_nal_async::AddrType; | ||
| 80 | |||
| 78 | let (qtype, secondary_qtype) = match addr_type { | 81 | let (qtype, secondary_qtype) = match addr_type { |
| 79 | AddrType::IPv4 => (DnsQueryType::A, None), | 82 | AddrType::IPv4 => (DnsQueryType::A, None), |
| 80 | AddrType::IPv6 => (DnsQueryType::Aaaa, None), | 83 | AddrType::IPv6 => (DnsQueryType::Aaaa, None), |
| @@ -98,20 +101,16 @@ impl<'a> embedded_nal_async::Dns for DnsSocket<'a> { | |||
| 98 | if let Some(first) = addrs.get(0) { | 101 | if let Some(first) = addrs.get(0) { |
| 99 | Ok(match first { | 102 | Ok(match first { |
| 100 | #[cfg(feature = "proto-ipv4")] | 103 | #[cfg(feature = "proto-ipv4")] |
| 101 | IpAddress::Ipv4(addr) => IpAddr::V4(addr.0.into()), | 104 | IpAddress::Ipv4(addr) => IpAddr::V4(*addr), |
| 102 | #[cfg(feature = "proto-ipv6")] | 105 | #[cfg(feature = "proto-ipv6")] |
| 103 | IpAddress::Ipv6(addr) => IpAddr::V6(addr.0.into()), | 106 | IpAddress::Ipv6(addr) => IpAddr::V6(*addr), |
| 104 | }) | 107 | }) |
| 105 | } else { | 108 | } else { |
| 106 | Err(Error::Failed) | 109 | Err(Error::Failed) |
| 107 | } | 110 | } |
| 108 | } | 111 | } |
| 109 | 112 | ||
| 110 | async fn get_host_by_address( | 113 | async fn get_host_by_address(&self, _addr: core::net::IpAddr, _result: &mut [u8]) -> Result<usize, Self::Error> { |
| 111 | &self, | ||
| 112 | _addr: embedded_nal_async::IpAddr, | ||
| 113 | _result: &mut [u8], | ||
| 114 | ) -> Result<usize, Self::Error> { | ||
| 115 | todo!() | 114 | todo!() |
| 116 | } | 115 | } |
| 117 | } | 116 | } |
diff --git a/embassy-net/src/tcp.rs b/embassy-net/src/tcp.rs index bcddbc95b..1bd582b65 100644 --- a/embassy-net/src/tcp.rs +++ b/embassy-net/src/tcp.rs | |||
| @@ -675,10 +675,9 @@ mod embedded_io_impls { | |||
| 675 | pub mod client { | 675 | pub mod client { |
| 676 | use core::cell::{Cell, UnsafeCell}; | 676 | use core::cell::{Cell, UnsafeCell}; |
| 677 | use core::mem::MaybeUninit; | 677 | use core::mem::MaybeUninit; |
| 678 | use core::net::IpAddr; | ||
| 678 | use core::ptr::NonNull; | 679 | use core::ptr::NonNull; |
| 679 | 680 | ||
| 680 | use embedded_nal_async::IpAddr; | ||
| 681 | |||
| 682 | use super::*; | 681 | use super::*; |
| 683 | 682 | ||
| 684 | /// TCP client connection pool compatible with `embedded-nal-async` traits. | 683 | /// TCP client connection pool compatible with `embedded-nal-async` traits. |
| @@ -715,17 +714,14 @@ pub mod client { | |||
| 715 | type Error = Error; | 714 | type Error = Error; |
| 716 | type Connection<'m> = TcpConnection<'m, N, TX_SZ, RX_SZ> where Self: 'm; | 715 | type Connection<'m> = TcpConnection<'m, N, TX_SZ, RX_SZ> where Self: 'm; |
| 717 | 716 | ||
| 718 | async fn connect<'a>( | 717 | async fn connect<'a>(&'a self, remote: core::net::SocketAddr) -> Result<Self::Connection<'a>, Self::Error> { |
| 719 | &'a self, | ||
| 720 | remote: embedded_nal_async::SocketAddr, | ||
| 721 | ) -> Result<Self::Connection<'a>, Self::Error> { | ||
| 722 | let addr: crate::IpAddress = match remote.ip() { | 718 | let addr: crate::IpAddress = match remote.ip() { |
| 723 | #[cfg(feature = "proto-ipv4")] | 719 | #[cfg(feature = "proto-ipv4")] |
| 724 | IpAddr::V4(addr) => crate::IpAddress::Ipv4(crate::Ipv4Address::from_bytes(&addr.octets())), | 720 | IpAddr::V4(addr) => crate::IpAddress::Ipv4(addr), |
| 725 | #[cfg(not(feature = "proto-ipv4"))] | 721 | #[cfg(not(feature = "proto-ipv4"))] |
| 726 | IpAddr::V4(_) => panic!("ipv4 support not enabled"), | 722 | IpAddr::V4(_) => panic!("ipv4 support not enabled"), |
| 727 | #[cfg(feature = "proto-ipv6")] | 723 | #[cfg(feature = "proto-ipv6")] |
| 728 | IpAddr::V6(addr) => crate::IpAddress::Ipv6(crate::Ipv6Address::from_bytes(&addr.octets())), | 724 | IpAddr::V6(addr) => crate::IpAddress::Ipv6(addr), |
| 729 | #[cfg(not(feature = "proto-ipv6"))] | 725 | #[cfg(not(feature = "proto-ipv6"))] |
| 730 | IpAddr::V6(_) => panic!("ipv6 support not enabled"), | 726 | IpAddr::V6(_) => panic!("ipv6 support not enabled"), |
| 731 | }; | 727 | }; |
diff --git a/examples/nrf9160/src/bin/modem_tcp_client.rs b/examples/nrf9160/src/bin/modem_tcp_client.rs index 495ee26dd..067ec4276 100644 --- a/examples/nrf9160/src/bin/modem_tcp_client.rs +++ b/examples/nrf9160/src/bin/modem_tcp_client.rs | |||
| @@ -9,7 +9,7 @@ use core::str::FromStr; | |||
| 9 | 9 | ||
| 10 | use defmt::{info, unwrap, warn}; | 10 | use defmt::{info, unwrap, warn}; |
| 11 | use embassy_executor::Spawner; | 11 | use embassy_executor::Spawner; |
| 12 | use embassy_net::{Ipv4Address, Ipv4Cidr, Stack, StackResources}; | 12 | use embassy_net::{Ipv4Cidr, Stack, StackResources}; |
| 13 | use embassy_net_nrf91::context::Status; | 13 | use embassy_net_nrf91::context::Status; |
| 14 | use embassy_net_nrf91::{context, Runner, State, TraceBuffer, TraceReader}; | 14 | use embassy_net_nrf91::{context, Runner, State, TraceBuffer, TraceReader}; |
| 15 | use embassy_nrf::buffered_uarte::{self, BufferedUarteTx}; | 15 | use embassy_nrf::buffered_uarte::{self, BufferedUarteTx}; |
| @@ -70,18 +70,16 @@ fn status_to_config(status: &Status) -> embassy_net::ConfigV4 { | |||
| 70 | let Some(IpAddr::V4(addr)) = status.ip else { | 70 | let Some(IpAddr::V4(addr)) = status.ip else { |
| 71 | panic!("Unexpected IP address"); | 71 | panic!("Unexpected IP address"); |
| 72 | }; | 72 | }; |
| 73 | let addr = Ipv4Address(addr.octets()); | ||
| 74 | 73 | ||
| 75 | let gateway = if let Some(IpAddr::V4(addr)) = status.gateway { | 74 | let gateway = match status.gateway { |
| 76 | Some(Ipv4Address(addr.octets())) | 75 | Some(IpAddr::V4(addr)) => Some(addr), |
| 77 | } else { | 76 | _ => None, |
| 78 | None | ||
| 79 | }; | 77 | }; |
| 80 | 78 | ||
| 81 | let mut dns_servers = Vec::new(); | 79 | let mut dns_servers = Vec::new(); |
| 82 | for dns in status.dns.iter() { | 80 | for dns in status.dns.iter() { |
| 83 | if let IpAddr::V4(ip) = dns { | 81 | if let IpAddr::V4(ip) = dns { |
| 84 | unwrap!(dns_servers.push(Ipv4Address(ip.octets()))); | 82 | unwrap!(dns_servers.push(*ip)); |
| 85 | } | 83 | } |
| 86 | } | 84 | } |
| 87 | 85 | ||
diff --git a/examples/rp/Cargo.toml b/examples/rp/Cargo.toml index 04b4c6317..674d331ab 100644 --- a/examples/rp/Cargo.toml +++ b/examples/rp/Cargo.toml | |||
| @@ -12,7 +12,7 @@ embassy-executor = { version = "0.6.0", path = "../../embassy-executor", feature | |||
| 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 13 | embassy-rp = { version = "0.2.0", path = "../../embassy-rp", features = ["defmt", "unstable-pac", "time-driver", "critical-section-impl", "rp2040"] } | 13 | embassy-rp = { version = "0.2.0", path = "../../embassy-rp", features = ["defmt", "unstable-pac", "time-driver", "critical-section-impl", "rp2040"] } |
| 14 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } | 14 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } |
| 15 | embassy-net = { version = "0.4.0", path = "../../embassy-net", features = ["defmt", "tcp", "udp", "raw", "dhcpv4", "medium-ethernet", "dns"] } | 15 | embassy-net = { version = "0.4.0", path = "../../embassy-net", features = ["defmt", "tcp", "udp", "raw", "dhcpv4", "medium-ethernet", "dns", "proto-ipv4", "proto-ipv6", "multicast"] } |
| 16 | embassy-net-wiznet = { version = "0.1.0", path = "../../embassy-net-wiznet", features = ["defmt"] } | 16 | embassy-net-wiznet = { version = "0.1.0", path = "../../embassy-net-wiznet", features = ["defmt"] } |
| 17 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 17 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 18 | embassy-usb-logger = { version = "0.2.0", path = "../../embassy-usb-logger" } | 18 | embassy-usb-logger = { version = "0.2.0", path = "../../embassy-usb-logger" } |
| @@ -25,7 +25,7 @@ fixed = "1.23.1" | |||
| 25 | fixed-macro = "1.2" | 25 | fixed-macro = "1.2" |
| 26 | 26 | ||
| 27 | # for web request example | 27 | # for web request example |
| 28 | reqwless = { version = "0.12.0", features = ["defmt",]} | 28 | reqwless = { git="https://github.com/drogue-iot/reqwless", rev="673e8d2cfbaad79254ec51fa50cc8b697531fbff", features = ["defmt",]} |
| 29 | serde = { version = "1.0.203", default-features = false, features = ["derive"] } | 29 | serde = { version = "1.0.203", default-features = false, features = ["derive"] } |
| 30 | serde-json-core = "0.5.1" | 30 | serde-json-core = "0.5.1" |
| 31 | 31 | ||
diff --git a/examples/rp23/Cargo.toml b/examples/rp23/Cargo.toml index 087f6fd69..08646463c 100644 --- a/examples/rp23/Cargo.toml +++ b/examples/rp23/Cargo.toml | |||
| @@ -24,8 +24,6 @@ defmt-rtt = "0.4" | |||
| 24 | fixed = "1.23.1" | 24 | fixed = "1.23.1" |
| 25 | fixed-macro = "1.2" | 25 | fixed-macro = "1.2" |
| 26 | 26 | ||
| 27 | # for web request example | ||
| 28 | reqwless = { version = "0.12.0", features = ["defmt",]} | ||
| 29 | serde = { version = "1.0.203", default-features = false, features = ["derive"] } | 27 | serde = { version = "1.0.203", default-features = false, features = ["derive"] } |
| 30 | serde-json-core = "0.5.1" | 28 | serde-json-core = "0.5.1" |
| 31 | 29 | ||
diff --git a/examples/std/src/bin/net_ppp.rs b/examples/std/src/bin/net_ppp.rs index 7d0f1327f..ea3fbebef 100644 --- a/examples/std/src/bin/net_ppp.rs +++ b/examples/std/src/bin/net_ppp.rs | |||
| @@ -16,7 +16,7 @@ use async_io::Async; | |||
| 16 | use clap::Parser; | 16 | use clap::Parser; |
| 17 | use embassy_executor::{Executor, Spawner}; | 17 | use embassy_executor::{Executor, Spawner}; |
| 18 | use embassy_net::tcp::TcpSocket; | 18 | use embassy_net::tcp::TcpSocket; |
| 19 | use embassy_net::{Config, ConfigV4, Ipv4Address, Ipv4Cidr, Stack, StackResources}; | 19 | use embassy_net::{Config, ConfigV4, Ipv4Cidr, Stack, StackResources}; |
| 20 | use embassy_net_ppp::Runner; | 20 | use embassy_net_ppp::Runner; |
| 21 | use embedded_io_async::Write; | 21 | use embedded_io_async::Write; |
| 22 | use futures::io::BufReader; | 22 | use futures::io::BufReader; |
| @@ -60,10 +60,10 @@ async fn ppp_task(stack: Stack<'static>, mut runner: Runner<'static>, port: Seri | |||
| 60 | }; | 60 | }; |
| 61 | let mut dns_servers = Vec::new(); | 61 | let mut dns_servers = Vec::new(); |
| 62 | for s in ipv4.dns_servers.iter().flatten() { | 62 | for s in ipv4.dns_servers.iter().flatten() { |
| 63 | let _ = dns_servers.push(Ipv4Address::from_bytes(&s.0)); | 63 | let _ = dns_servers.push(*s); |
| 64 | } | 64 | } |
| 65 | let config = ConfigV4::Static(embassy_net::StaticConfigV4 { | 65 | let config = ConfigV4::Static(embassy_net::StaticConfigV4 { |
| 66 | address: Ipv4Cidr::new(Ipv4Address::from_bytes(&addr.0), 0), | 66 | address: Ipv4Cidr::new(addr, 0), |
| 67 | gateway: None, | 67 | gateway: None, |
| 68 | dns_servers, | 68 | dns_servers, |
| 69 | }); | 69 | }); |
diff --git a/examples/stm32h5/Cargo.toml b/examples/stm32h5/Cargo.toml index 30b1d2be9..1aa264ab2 100644 --- a/examples/stm32h5/Cargo.toml +++ b/examples/stm32h5/Cargo.toml | |||
| @@ -23,7 +23,7 @@ embedded-hal = "0.2.6" | |||
| 23 | embedded-hal-1 = { package = "embedded-hal", version = "1.0" } | 23 | embedded-hal-1 = { package = "embedded-hal", version = "1.0" } |
| 24 | embedded-hal-async = { version = "1.0" } | 24 | embedded-hal-async = { version = "1.0" } |
| 25 | embedded-io-async = { version = "0.6.1" } | 25 | embedded-io-async = { version = "0.6.1" } |
| 26 | embedded-nal-async = { version = "0.7.1" } | 26 | embedded-nal-async = "0.8.0" |
| 27 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 27 | panic-probe = { version = "0.3", features = ["print-defmt"] } |
| 28 | heapless = { version = "0.8", default-features = false } | 28 | heapless = { version = "0.8", default-features = false } |
| 29 | rand_core = "0.6.3" | 29 | rand_core = "0.6.3" |
diff --git a/examples/stm32h7/Cargo.toml b/examples/stm32h7/Cargo.toml index 13fce7dc7..d0f22cf82 100644 --- a/examples/stm32h7/Cargo.toml +++ b/examples/stm32h7/Cargo.toml | |||
| @@ -23,7 +23,7 @@ cortex-m-rt = "0.7.0" | |||
| 23 | embedded-hal = "0.2.6" | 23 | embedded-hal = "0.2.6" |
| 24 | embedded-hal-1 = { package = "embedded-hal", version = "1.0" } | 24 | embedded-hal-1 = { package = "embedded-hal", version = "1.0" } |
| 25 | embedded-hal-async = { version = "1.0" } | 25 | embedded-hal-async = { version = "1.0" } |
| 26 | embedded-nal-async = { version = "0.7.1" } | 26 | embedded-nal-async = "0.8.0" |
| 27 | embedded-io-async = { version = "0.6.1" } | 27 | embedded-io-async = { version = "0.6.1" } |
| 28 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 28 | panic-probe = { version = "0.3", features = ["print-defmt"] } |
| 29 | heapless = { version = "0.8", default-features = false } | 29 | heapless = { version = "0.8", default-features = false } |
diff --git a/examples/stm32h7/src/bin/eth_client.rs b/examples/stm32h7/src/bin/eth_client.rs index 24983ca85..a1558b079 100644 --- a/examples/stm32h7/src/bin/eth_client.rs +++ b/examples/stm32h7/src/bin/eth_client.rs | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | 3 | ||
| 4 | use core::net::{Ipv4Addr, SocketAddr, SocketAddrV4}; | ||
| 5 | |||
| 4 | use defmt::*; | 6 | use defmt::*; |
| 5 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
| 6 | use embassy_net::tcp::client::{TcpClient, TcpClientState}; | 8 | use embassy_net::tcp::client::{TcpClient, TcpClientState}; |
| @@ -12,7 +14,7 @@ use embassy_stm32::rng::Rng; | |||
| 12 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; | 14 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; |
| 13 | use embassy_time::Timer; | 15 | use embassy_time::Timer; |
| 14 | use embedded_io_async::Write; | 16 | use embedded_io_async::Write; |
| 15 | use embedded_nal_async::{Ipv4Addr, SocketAddr, SocketAddrV4, TcpConnect}; | 17 | use embedded_nal_async::TcpConnect; |
| 16 | use rand_core::RngCore; | 18 | use rand_core::RngCore; |
| 17 | use static_cell::StaticCell; | 19 | use static_cell::StaticCell; |
| 18 | use {defmt_rtt as _, panic_probe as _}; | 20 | use {defmt_rtt as _, panic_probe as _}; |
diff --git a/examples/stm32h7/src/bin/eth_client_mii.rs b/examples/stm32h7/src/bin/eth_client_mii.rs index 768d85993..a352ef444 100644 --- a/examples/stm32h7/src/bin/eth_client_mii.rs +++ b/examples/stm32h7/src/bin/eth_client_mii.rs | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | 3 | ||
| 4 | use core::net::{Ipv4Addr, SocketAddr, SocketAddrV4}; | ||
| 5 | |||
| 4 | use defmt::*; | 6 | use defmt::*; |
| 5 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
| 6 | use embassy_net::tcp::client::{TcpClient, TcpClientState}; | 8 | use embassy_net::tcp::client::{TcpClient, TcpClientState}; |
| @@ -12,7 +14,7 @@ use embassy_stm32::rng::Rng; | |||
| 12 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; | 14 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; |
| 13 | use embassy_time::Timer; | 15 | use embassy_time::Timer; |
| 14 | use embedded_io_async::Write; | 16 | use embedded_io_async::Write; |
| 15 | use embedded_nal_async::{Ipv4Addr, SocketAddr, SocketAddrV4, TcpConnect}; | 17 | use embedded_nal_async::TcpConnect; |
| 16 | use rand_core::RngCore; | 18 | use rand_core::RngCore; |
| 17 | use static_cell::StaticCell; | 19 | use static_cell::StaticCell; |
| 18 | use {defmt_rtt as _, panic_probe as _}; | 20 | use {defmt_rtt as _, panic_probe as _}; |
diff --git a/examples/stm32h755cm4/Cargo.toml b/examples/stm32h755cm4/Cargo.toml index 7a42fbdaa..75de40b9a 100644 --- a/examples/stm32h755cm4/Cargo.toml +++ b/examples/stm32h755cm4/Cargo.toml | |||
| @@ -23,7 +23,7 @@ cortex-m-rt = "0.7.0" | |||
| 23 | embedded-hal = "0.2.6" | 23 | embedded-hal = "0.2.6" |
| 24 | embedded-hal-1 = { package = "embedded-hal", version = "1.0" } | 24 | embedded-hal-1 = { package = "embedded-hal", version = "1.0" } |
| 25 | embedded-hal-async = { version = "1.0" } | 25 | embedded-hal-async = { version = "1.0" } |
| 26 | embedded-nal-async = { version = "0.7.1" } | 26 | embedded-nal-async = "0.8.0" |
| 27 | embedded-io-async = { version = "0.6.1" } | 27 | embedded-io-async = { version = "0.6.1" } |
| 28 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 28 | panic-probe = { version = "0.3", features = ["print-defmt"] } |
| 29 | heapless = { version = "0.8", default-features = false } | 29 | heapless = { version = "0.8", default-features = false } |
diff --git a/examples/stm32h755cm7/Cargo.toml b/examples/stm32h755cm7/Cargo.toml index 4f0f69c3f..911a4e79b 100644 --- a/examples/stm32h755cm7/Cargo.toml +++ b/examples/stm32h755cm7/Cargo.toml | |||
| @@ -23,7 +23,7 @@ cortex-m-rt = "0.7.0" | |||
| 23 | embedded-hal = "0.2.6" | 23 | embedded-hal = "0.2.6" |
| 24 | embedded-hal-1 = { package = "embedded-hal", version = "1.0" } | 24 | embedded-hal-1 = { package = "embedded-hal", version = "1.0" } |
| 25 | embedded-hal-async = { version = "1.0" } | 25 | embedded-hal-async = { version = "1.0" } |
| 26 | embedded-nal-async = { version = "0.7.1" } | 26 | embedded-nal-async = "0.8.0" |
| 27 | embedded-io-async = { version = "0.6.1" } | 27 | embedded-io-async = { version = "0.6.1" } |
| 28 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 28 | panic-probe = { version = "0.3", features = ["print-defmt"] } |
| 29 | heapless = { version = "0.8", default-features = false } | 29 | heapless = { version = "0.8", default-features = false } |
diff --git a/examples/stm32h7rs/Cargo.toml b/examples/stm32h7rs/Cargo.toml index f97dfd722..05f638408 100644 --- a/examples/stm32h7rs/Cargo.toml +++ b/examples/stm32h7rs/Cargo.toml | |||
| @@ -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" } | 23 | embedded-hal-1 = { package = "embedded-hal", version = "1.0" } |
| 24 | embedded-hal-async = { version = "1.0" } | 24 | embedded-hal-async = { version = "1.0" } |
| 25 | embedded-nal-async = { version = "0.7.1" } | 25 | embedded-nal-async = "0.8.0" |
| 26 | embedded-io-async = { version = "0.6.1" } | 26 | embedded-io-async = { version = "0.6.1" } |
| 27 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 27 | panic-probe = { version = "0.3", features = ["print-defmt"] } |
| 28 | heapless = { version = "0.8", default-features = false } | 28 | heapless = { version = "0.8", default-features = false } |
diff --git a/examples/stm32l4/src/bin/spe_adin1110_http_server.rs b/examples/stm32l4/src/bin/spe_adin1110_http_server.rs index be4270ada..4a7c01f9f 100644 --- a/examples/stm32l4/src/bin/spe_adin1110_http_server.rs +++ b/examples/stm32l4/src/bin/spe_adin1110_http_server.rs | |||
| @@ -51,7 +51,7 @@ bind_interrupts!(struct Irqs { | |||
| 51 | // MAC-address used by the adin1110 | 51 | // MAC-address used by the adin1110 |
| 52 | const MAC: [u8; 6] = [0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff]; | 52 | const MAC: [u8; 6] = [0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff]; |
| 53 | // Static IP settings | 53 | // Static IP settings |
| 54 | const IP_ADDRESS: Ipv4Cidr = Ipv4Cidr::new(Ipv4Address([192, 168, 1, 5]), 24); | 54 | const IP_ADDRESS: Ipv4Cidr = Ipv4Cidr::new(Ipv4Address::new(192, 168, 1, 5), 24); |
| 55 | // Listen port for the webserver | 55 | // Listen port for the webserver |
| 56 | const HTTP_LISTEN_PORT: u16 = 80; | 56 | const HTTP_LISTEN_PORT: u16 = 80; |
| 57 | 57 | ||
