diff options
| -rw-r--r-- | embassy-net/src/lib.rs | 12 | ||||
| -rw-r--r-- | examples/nrf52840/src/bin/usb_ethernet.rs | 2 | ||||
| -rw-r--r-- | examples/rp/src/bin/ethernet_w5500_multisocket.rs | 2 | ||||
| -rw-r--r-- | examples/rp/src/bin/ethernet_w5500_tcp_client.rs | 2 | ||||
| -rw-r--r-- | examples/rp/src/bin/ethernet_w5500_tcp_server.rs | 2 | ||||
| -rw-r--r-- | examples/rp/src/bin/ethernet_w5500_udp.rs | 2 | ||||
| -rw-r--r-- | examples/rp/src/bin/usb_ethernet.rs | 2 | ||||
| -rw-r--r-- | examples/rp/src/bin/wifi_ap_tcp_server.rs | 2 | ||||
| -rw-r--r-- | examples/rp/src/bin/wifi_tcp_server.rs | 2 | ||||
| -rw-r--r-- | examples/std/src/bin/net.rs | 2 | ||||
| -rw-r--r-- | examples/std/src/bin/net_dns.rs | 2 | ||||
| -rw-r--r-- | examples/std/src/bin/net_udp.rs | 2 | ||||
| -rw-r--r-- | examples/std/src/bin/tcp_accept.rs | 2 | ||||
| -rw-r--r-- | examples/stm32f4/src/bin/usb_ethernet.rs | 2 | ||||
| -rw-r--r-- | examples/stm32f7/src/bin/eth.rs | 2 | ||||
| -rw-r--r-- | examples/stm32h5/src/bin/eth.rs | 2 | ||||
| -rw-r--r-- | examples/stm32h7/src/bin/eth.rs | 2 | ||||
| -rw-r--r-- | examples/stm32h7/src/bin/eth_client.rs | 2 | ||||
| -rw-r--r-- | examples/stm32l5/src/bin/usb_ethernet.rs | 2 |
19 files changed, 24 insertions, 24 deletions
diff --git a/embassy-net/src/lib.rs b/embassy-net/src/lib.rs index bccbad521..ddb325c6c 100644 --- a/embassy-net/src/lib.rs +++ b/embassy-net/src/lib.rs | |||
| @@ -68,7 +68,7 @@ impl<const SOCK: usize> StackResources<SOCK> { | |||
| 68 | 68 | ||
| 69 | /// Static IP address configuration. | 69 | /// Static IP address configuration. |
| 70 | #[derive(Debug, Clone, PartialEq, Eq)] | 70 | #[derive(Debug, Clone, PartialEq, Eq)] |
| 71 | pub struct StaticConfig { | 71 | pub struct StaticConfigV4 { |
| 72 | /// IP address and subnet mask. | 72 | /// IP address and subnet mask. |
| 73 | pub address: Ipv4Cidr, | 73 | pub address: Ipv4Cidr, |
| 74 | /// Default gateway. | 74 | /// Default gateway. |
| @@ -114,7 +114,7 @@ impl Default for DhcpConfig { | |||
| 114 | /// Network stack configuration. | 114 | /// Network stack configuration. |
| 115 | pub enum Config { | 115 | pub enum Config { |
| 116 | /// Use a static IP address configuration. | 116 | /// Use a static IP address configuration. |
| 117 | Static(StaticConfig), | 117 | Static(StaticConfigV4), |
| 118 | /// Use DHCP to obtain an IP address configuration. | 118 | /// Use DHCP to obtain an IP address configuration. |
| 119 | #[cfg(feature = "dhcpv4")] | 119 | #[cfg(feature = "dhcpv4")] |
| 120 | Dhcp(DhcpConfig), | 120 | Dhcp(DhcpConfig), |
| @@ -131,7 +131,7 @@ pub struct Stack<D: Driver> { | |||
| 131 | struct Inner<D: Driver> { | 131 | struct Inner<D: Driver> { |
| 132 | device: D, | 132 | device: D, |
| 133 | link_up: bool, | 133 | link_up: bool, |
| 134 | config: Option<StaticConfig>, | 134 | config: Option<StaticConfigV4>, |
| 135 | #[cfg(feature = "dhcpv4")] | 135 | #[cfg(feature = "dhcpv4")] |
| 136 | dhcp_socket: Option<SocketHandle>, | 136 | dhcp_socket: Option<SocketHandle>, |
| 137 | #[cfg(feature = "dns")] | 137 | #[cfg(feature = "dns")] |
| @@ -243,7 +243,7 @@ impl<D: Driver + 'static> Stack<D> { | |||
| 243 | } | 243 | } |
| 244 | 244 | ||
| 245 | /// Get the current IP configuration. | 245 | /// Get the current IP configuration. |
| 246 | pub fn config(&self) -> Option<StaticConfig> { | 246 | pub fn config(&self) -> Option<StaticConfigV4> { |
| 247 | self.with(|_s, i| i.config.clone()) | 247 | self.with(|_s, i| i.config.clone()) |
| 248 | } | 248 | } |
| 249 | 249 | ||
| @@ -374,7 +374,7 @@ impl SocketStack { | |||
| 374 | } | 374 | } |
| 375 | 375 | ||
| 376 | impl<D: Driver + 'static> Inner<D> { | 376 | impl<D: Driver + 'static> Inner<D> { |
| 377 | fn apply_config(&mut self, s: &mut SocketStack, config: StaticConfig) { | 377 | fn apply_config(&mut self, s: &mut SocketStack, config: StaticConfigV4) { |
| 378 | #[cfg(feature = "medium-ethernet")] | 378 | #[cfg(feature = "medium-ethernet")] |
| 379 | let medium = self.device.capabilities().medium; | 379 | let medium = self.device.capabilities().medium; |
| 380 | 380 | ||
| @@ -470,7 +470,7 @@ impl<D: Driver + 'static> Inner<D> { | |||
| 470 | None => {} | 470 | None => {} |
| 471 | Some(dhcpv4::Event::Deconfigured) => self.unapply_config(s), | 471 | Some(dhcpv4::Event::Deconfigured) => self.unapply_config(s), |
| 472 | Some(dhcpv4::Event::Configured(config)) => { | 472 | Some(dhcpv4::Event::Configured(config)) => { |
| 473 | let config = StaticConfig { | 473 | let config = StaticConfigV4 { |
| 474 | address: config.address, | 474 | address: config.address, |
| 475 | gateway: config.router, | 475 | gateway: config.router, |
| 476 | dns_servers: config.dns_servers, | 476 | dns_servers: config.dns_servers, |
diff --git a/examples/nrf52840/src/bin/usb_ethernet.rs b/examples/nrf52840/src/bin/usb_ethernet.rs index 1065f5b5d..b4316f5a4 100644 --- a/examples/nrf52840/src/bin/usb_ethernet.rs +++ b/examples/nrf52840/src/bin/usb_ethernet.rs | |||
| @@ -98,7 +98,7 @@ async fn main(spawner: Spawner) { | |||
| 98 | unwrap!(spawner.spawn(usb_ncm_task(runner))); | 98 | unwrap!(spawner.spawn(usb_ncm_task(runner))); |
| 99 | 99 | ||
| 100 | let config = embassy_net::Config::Dhcp(Default::default()); | 100 | let config = embassy_net::Config::Dhcp(Default::default()); |
| 101 | //let config = embassy_net::Config::Static(embassy_net::StaticConfig { | 101 | //let config = embassy_net::Config::StaticV4(embassy_net::StaticConfigV4 { |
| 102 | // address: Ipv4Cidr::new(Ipv4Address::new(10, 42, 0, 61), 24), | 102 | // address: Ipv4Cidr::new(Ipv4Address::new(10, 42, 0, 61), 24), |
| 103 | // dns_servers: Vec::new(), | 103 | // dns_servers: Vec::new(), |
| 104 | // gateway: Some(Ipv4Address::new(10, 42, 0, 1)), | 104 | // gateway: Some(Ipv4Address::new(10, 42, 0, 1)), |
diff --git a/examples/rp/src/bin/ethernet_w5500_multisocket.rs b/examples/rp/src/bin/ethernet_w5500_multisocket.rs index 63e142e7d..7e9e20b28 100644 --- a/examples/rp/src/bin/ethernet_w5500_multisocket.rs +++ b/examples/rp/src/bin/ethernet_w5500_multisocket.rs | |||
| @@ -120,7 +120,7 @@ async fn listen_task(stack: &'static Stack<Device<'static>>, id: u8, port: u16) | |||
| 120 | } | 120 | } |
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | async fn wait_for_config(stack: &'static Stack<Device<'static>>) -> embassy_net::StaticConfig { | 123 | async fn wait_for_config(stack: &'static Stack<Device<'static>>) -> embassy_net::StaticConfigV4 { |
| 124 | loop { | 124 | loop { |
| 125 | if let Some(config) = stack.config() { | 125 | if let Some(config) = stack.config() { |
| 126 | return config.clone(); | 126 | return config.clone(); |
diff --git a/examples/rp/src/bin/ethernet_w5500_tcp_client.rs b/examples/rp/src/bin/ethernet_w5500_tcp_client.rs index a532de00d..c0275be1b 100644 --- a/examples/rp/src/bin/ethernet_w5500_tcp_client.rs +++ b/examples/rp/src/bin/ethernet_w5500_tcp_client.rs | |||
| @@ -108,7 +108,7 @@ async fn main(spawner: Spawner) { | |||
| 108 | } | 108 | } |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | async fn wait_for_config(stack: &'static Stack<Device<'static>>) -> embassy_net::StaticConfig { | 111 | async fn wait_for_config(stack: &'static Stack<Device<'static>>) -> embassy_net::StaticConfigV4 { |
| 112 | loop { | 112 | loop { |
| 113 | if let Some(config) = stack.config() { | 113 | if let Some(config) = stack.config() { |
| 114 | return config.clone(); | 114 | return config.clone(); |
diff --git a/examples/rp/src/bin/ethernet_w5500_tcp_server.rs b/examples/rp/src/bin/ethernet_w5500_tcp_server.rs index 599f6b1e9..da73e41ff 100644 --- a/examples/rp/src/bin/ethernet_w5500_tcp_server.rs +++ b/examples/rp/src/bin/ethernet_w5500_tcp_server.rs | |||
| @@ -116,7 +116,7 @@ async fn main(spawner: Spawner) { | |||
| 116 | } | 116 | } |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | async fn wait_for_config(stack: &'static Stack<Device<'static>>) -> embassy_net::StaticConfig { | 119 | async fn wait_for_config(stack: &'static Stack<Device<'static>>) -> embassy_net::StaticConfigV4 { |
| 120 | loop { | 120 | loop { |
| 121 | if let Some(config) = stack.config() { | 121 | if let Some(config) = stack.config() { |
| 122 | return config.clone(); | 122 | return config.clone(); |
diff --git a/examples/rp/src/bin/ethernet_w5500_udp.rs b/examples/rp/src/bin/ethernet_w5500_udp.rs index ac5a65bb6..4c861cbd2 100644 --- a/examples/rp/src/bin/ethernet_w5500_udp.rs +++ b/examples/rp/src/bin/ethernet_w5500_udp.rs | |||
| @@ -95,7 +95,7 @@ async fn main(spawner: Spawner) { | |||
| 95 | } | 95 | } |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | async fn wait_for_config(stack: &'static Stack<Device<'static>>) -> embassy_net::StaticConfig { | 98 | async fn wait_for_config(stack: &'static Stack<Device<'static>>) -> embassy_net::StaticConfigV4 { |
| 99 | loop { | 99 | loop { |
| 100 | if let Some(config) = stack.config() { | 100 | if let Some(config) = stack.config() { |
| 101 | return config.clone(); | 101 | return config.clone(); |
diff --git a/examples/rp/src/bin/usb_ethernet.rs b/examples/rp/src/bin/usb_ethernet.rs index 16fbf5e91..d33d9c72e 100644 --- a/examples/rp/src/bin/usb_ethernet.rs +++ b/examples/rp/src/bin/usb_ethernet.rs | |||
| @@ -87,7 +87,7 @@ async fn main(spawner: Spawner) { | |||
| 87 | unwrap!(spawner.spawn(usb_ncm_task(runner))); | 87 | unwrap!(spawner.spawn(usb_ncm_task(runner))); |
| 88 | 88 | ||
| 89 | let config = embassy_net::Config::Dhcp(Default::default()); | 89 | let config = embassy_net::Config::Dhcp(Default::default()); |
| 90 | //let config = embassy_net::Config::Static(embassy_net::StaticConfig { | 90 | //let config = embassy_net::Config::StaticV4(embassy_net::StaticConfigV4 { |
| 91 | // address: Ipv4Cidr::new(Ipv4Address::new(10, 42, 0, 61), 24), | 91 | // address: Ipv4Cidr::new(Ipv4Address::new(10, 42, 0, 61), 24), |
| 92 | // dns_servers: Vec::new(), | 92 | // dns_servers: Vec::new(), |
| 93 | // gateway: Some(Ipv4Address::new(10, 42, 0, 1)), | 93 | // gateway: Some(Ipv4Address::new(10, 42, 0, 1)), |
diff --git a/examples/rp/src/bin/wifi_ap_tcp_server.rs b/examples/rp/src/bin/wifi_ap_tcp_server.rs index b27d3c9f8..970cf4b32 100644 --- a/examples/rp/src/bin/wifi_ap_tcp_server.rs +++ b/examples/rp/src/bin/wifi_ap_tcp_server.rs | |||
| @@ -62,7 +62,7 @@ async fn main(spawner: Spawner) { | |||
| 62 | .await; | 62 | .await; |
| 63 | 63 | ||
| 64 | // Use a link-local address for communication without DHCP server | 64 | // Use a link-local address for communication without DHCP server |
| 65 | let config = Config::Static(embassy_net::StaticConfig { | 65 | let config = Config::StaticV4(embassy_net::StaticConfigV4 { |
| 66 | address: embassy_net::Ipv4Cidr::new(embassy_net::Ipv4Address::new(169, 254, 1, 1), 16), | 66 | address: embassy_net::Ipv4Cidr::new(embassy_net::Ipv4Address::new(169, 254, 1, 1), 16), |
| 67 | dns_servers: heapless::Vec::new(), | 67 | dns_servers: heapless::Vec::new(), |
| 68 | gateway: None, | 68 | gateway: None, |
diff --git a/examples/rp/src/bin/wifi_tcp_server.rs b/examples/rp/src/bin/wifi_tcp_server.rs index 1a00bca96..9f95f8b03 100644 --- a/examples/rp/src/bin/wifi_tcp_server.rs +++ b/examples/rp/src/bin/wifi_tcp_server.rs | |||
| @@ -62,7 +62,7 @@ async fn main(spawner: Spawner) { | |||
| 62 | .await; | 62 | .await; |
| 63 | 63 | ||
| 64 | let config = Config::Dhcp(Default::default()); | 64 | let config = Config::Dhcp(Default::default()); |
| 65 | //let config = embassy_net::Config::Static(embassy_net::Config { | 65 | //let config = embassy_net::Config::StaticV4(embassy_net::Config { |
| 66 | // address: Ipv4Cidr::new(Ipv4Address::new(192, 168, 69, 2), 24), | 66 | // address: Ipv4Cidr::new(Ipv4Address::new(192, 168, 69, 2), 24), |
| 67 | // dns_servers: Vec::new(), | 67 | // dns_servers: Vec::new(), |
| 68 | // gateway: Some(Ipv4Address::new(192, 168, 69, 1)), | 68 | // gateway: Some(Ipv4Address::new(192, 168, 69, 1)), |
diff --git a/examples/std/src/bin/net.rs b/examples/std/src/bin/net.rs index b42bfc13b..14cf3f25b 100644 --- a/examples/std/src/bin/net.rs +++ b/examples/std/src/bin/net.rs | |||
| @@ -42,7 +42,7 @@ async fn main_task(spawner: Spawner) { | |||
| 42 | 42 | ||
| 43 | // Choose between dhcp or static ip | 43 | // Choose between dhcp or static ip |
| 44 | let config = if opts.static_ip { | 44 | let config = if opts.static_ip { |
| 45 | Config::Static(embassy_net::StaticConfig { | 45 | Config::StaticV4(embassy_net::StaticConfigV4 { |
| 46 | address: Ipv4Cidr::new(Ipv4Address::new(192, 168, 69, 2), 24), | 46 | address: Ipv4Cidr::new(Ipv4Address::new(192, 168, 69, 2), 24), |
| 47 | dns_servers: Vec::new(), | 47 | dns_servers: Vec::new(), |
| 48 | gateway: Some(Ipv4Address::new(192, 168, 69, 1)), | 48 | gateway: Some(Ipv4Address::new(192, 168, 69, 1)), |
diff --git a/examples/std/src/bin/net_dns.rs b/examples/std/src/bin/net_dns.rs index 932ac5831..0a479a744 100644 --- a/examples/std/src/bin/net_dns.rs +++ b/examples/std/src/bin/net_dns.rs | |||
| @@ -40,7 +40,7 @@ async fn main_task(spawner: Spawner) { | |||
| 40 | 40 | ||
| 41 | // Choose between dhcp or static ip | 41 | // Choose between dhcp or static ip |
| 42 | let config = if opts.static_ip { | 42 | let config = if opts.static_ip { |
| 43 | Config::Static(embassy_net::StaticConfig { | 43 | Config::StaticV4(embassy_net::StaticConfigV4 { |
| 44 | address: Ipv4Cidr::new(Ipv4Address::new(192, 168, 69, 1), 24), | 44 | address: Ipv4Cidr::new(Ipv4Address::new(192, 168, 69, 1), 24), |
| 45 | dns_servers: Vec::from_slice(&[Ipv4Address::new(8, 8, 4, 4).into(), Ipv4Address::new(8, 8, 8, 8).into()]) | 45 | dns_servers: Vec::from_slice(&[Ipv4Address::new(8, 8, 4, 4).into(), Ipv4Address::new(8, 8, 8, 8).into()]) |
| 46 | .unwrap(), | 46 | .unwrap(), |
diff --git a/examples/std/src/bin/net_udp.rs b/examples/std/src/bin/net_udp.rs index d89ec7643..0ede5d998 100644 --- a/examples/std/src/bin/net_udp.rs +++ b/examples/std/src/bin/net_udp.rs | |||
| @@ -38,7 +38,7 @@ async fn main_task(spawner: Spawner) { | |||
| 38 | 38 | ||
| 39 | // Choose between dhcp or static ip | 39 | // Choose between dhcp or static ip |
| 40 | let config = if opts.static_ip { | 40 | let config = if opts.static_ip { |
| 41 | Config::Static(embassy_net::StaticConfig { | 41 | Config::StaticV4(embassy_net::StaticConfigV4 { |
| 42 | address: Ipv4Cidr::new(Ipv4Address::new(192, 168, 69, 2), 24), | 42 | address: Ipv4Cidr::new(Ipv4Address::new(192, 168, 69, 2), 24), |
| 43 | dns_servers: Vec::new(), | 43 | dns_servers: Vec::new(), |
| 44 | gateway: Some(Ipv4Address::new(192, 168, 69, 1)), | 44 | gateway: Some(Ipv4Address::new(192, 168, 69, 1)), |
diff --git a/examples/std/src/bin/tcp_accept.rs b/examples/std/src/bin/tcp_accept.rs index 01695baea..4379d0439 100644 --- a/examples/std/src/bin/tcp_accept.rs +++ b/examples/std/src/bin/tcp_accept.rs | |||
| @@ -53,7 +53,7 @@ async fn main_task(spawner: Spawner) { | |||
| 53 | 53 | ||
| 54 | // Choose between dhcp or static ip | 54 | // Choose between dhcp or static ip |
| 55 | let config = if opts.static_ip { | 55 | let config = if opts.static_ip { |
| 56 | Config::Static(embassy_net::StaticConfig { | 56 | Config::StaticV4(embassy_net::StaticConfigV4 { |
| 57 | address: Ipv4Cidr::new(Ipv4Address::new(192, 168, 69, 2), 24), | 57 | address: Ipv4Cidr::new(Ipv4Address::new(192, 168, 69, 2), 24), |
| 58 | dns_servers: Vec::new(), | 58 | dns_servers: Vec::new(), |
| 59 | gateway: Some(Ipv4Address::new(192, 168, 69, 1)), | 59 | gateway: Some(Ipv4Address::new(192, 168, 69, 1)), |
diff --git a/examples/stm32f4/src/bin/usb_ethernet.rs b/examples/stm32f4/src/bin/usb_ethernet.rs index d229cc3ef..0856b4842 100644 --- a/examples/stm32f4/src/bin/usb_ethernet.rs +++ b/examples/stm32f4/src/bin/usb_ethernet.rs | |||
| @@ -95,7 +95,7 @@ async fn main(spawner: Spawner) { | |||
| 95 | unwrap!(spawner.spawn(usb_ncm_task(runner))); | 95 | unwrap!(spawner.spawn(usb_ncm_task(runner))); |
| 96 | 96 | ||
| 97 | let config = embassy_net::Config::Dhcp(Default::default()); | 97 | let config = embassy_net::Config::Dhcp(Default::default()); |
| 98 | //let config = embassy_net::Config::Static(embassy_net::StaticConfig { | 98 | //let config = embassy_net::Config::StaticV4(embassy_net::StaticConfigV4 { |
| 99 | // address: Ipv4Cidr::new(Ipv4Address::new(10, 42, 0, 61), 24), | 99 | // address: Ipv4Cidr::new(Ipv4Address::new(10, 42, 0, 61), 24), |
| 100 | // dns_servers: Vec::new(), | 100 | // dns_servers: Vec::new(), |
| 101 | // gateway: Some(Ipv4Address::new(10, 42, 0, 1)), | 101 | // gateway: Some(Ipv4Address::new(10, 42, 0, 1)), |
diff --git a/examples/stm32f7/src/bin/eth.rs b/examples/stm32f7/src/bin/eth.rs index d8438241c..ebdf0d8a0 100644 --- a/examples/stm32f7/src/bin/eth.rs +++ b/examples/stm32f7/src/bin/eth.rs | |||
| @@ -63,7 +63,7 @@ async fn main(spawner: Spawner) -> ! { | |||
| 63 | ); | 63 | ); |
| 64 | 64 | ||
| 65 | let config = embassy_net::Config::Dhcp(Default::default()); | 65 | let config = embassy_net::Config::Dhcp(Default::default()); |
| 66 | //let config = embassy_net::Config::Static(embassy_net::StaticConfig { | 66 | //let config = embassy_net::Config::StaticV4(embassy_net::StaticConfigV4 { |
| 67 | // address: Ipv4Cidr::new(Ipv4Address::new(10, 42, 0, 61), 24), | 67 | // address: Ipv4Cidr::new(Ipv4Address::new(10, 42, 0, 61), 24), |
| 68 | // dns_servers: Vec::new(), | 68 | // dns_servers: Vec::new(), |
| 69 | // gateway: Some(Ipv4Address::new(10, 42, 0, 1)), | 69 | // gateway: Some(Ipv4Address::new(10, 42, 0, 1)), |
diff --git a/examples/stm32h5/src/bin/eth.rs b/examples/stm32h5/src/bin/eth.rs index 5d1eadf4b..811f74c88 100644 --- a/examples/stm32h5/src/bin/eth.rs +++ b/examples/stm32h5/src/bin/eth.rs | |||
| @@ -82,7 +82,7 @@ async fn main(spawner: Spawner) -> ! { | |||
| 82 | ); | 82 | ); |
| 83 | 83 | ||
| 84 | let config = embassy_net::Config::Dhcp(Default::default()); | 84 | let config = embassy_net::Config::Dhcp(Default::default()); |
| 85 | //let config = embassy_net::Config::Static(embassy_net::StaticConfig { | 85 | //let config = embassy_net::Config::StaticV4(embassy_net::StaticConfigV4 { |
| 86 | // address: Ipv4Cidr::new(Ipv4Address::new(10, 42, 0, 61), 24), | 86 | // address: Ipv4Cidr::new(Ipv4Address::new(10, 42, 0, 61), 24), |
| 87 | // dns_servers: Vec::new(), | 87 | // dns_servers: Vec::new(), |
| 88 | // gateway: Some(Ipv4Address::new(10, 42, 0, 1)), | 88 | // gateway: Some(Ipv4Address::new(10, 42, 0, 1)), |
diff --git a/examples/stm32h7/src/bin/eth.rs b/examples/stm32h7/src/bin/eth.rs index 3aa7b2271..5360a213a 100644 --- a/examples/stm32h7/src/bin/eth.rs +++ b/examples/stm32h7/src/bin/eth.rs | |||
| @@ -64,7 +64,7 @@ async fn main(spawner: Spawner) -> ! { | |||
| 64 | ); | 64 | ); |
| 65 | 65 | ||
| 66 | let config = embassy_net::Config::Dhcp(Default::default()); | 66 | let config = embassy_net::Config::Dhcp(Default::default()); |
| 67 | //let config = embassy_net::Config::Static(embassy_net::StaticConfig { | 67 | //let config = embassy_net::Config::StaticV4(embassy_net::StaticConfigV4 { |
| 68 | // address: Ipv4Cidr::new(Ipv4Address::new(10, 42, 0, 61), 24), | 68 | // address: Ipv4Cidr::new(Ipv4Address::new(10, 42, 0, 61), 24), |
| 69 | // dns_servers: Vec::new(), | 69 | // dns_servers: Vec::new(), |
| 70 | // gateway: Some(Ipv4Address::new(10, 42, 0, 1)), | 70 | // gateway: Some(Ipv4Address::new(10, 42, 0, 1)), |
diff --git a/examples/stm32h7/src/bin/eth_client.rs b/examples/stm32h7/src/bin/eth_client.rs index 575c716b6..42781cfdc 100644 --- a/examples/stm32h7/src/bin/eth_client.rs +++ b/examples/stm32h7/src/bin/eth_client.rs | |||
| @@ -65,7 +65,7 @@ async fn main(spawner: Spawner) -> ! { | |||
| 65 | ); | 65 | ); |
| 66 | 66 | ||
| 67 | let config = embassy_net::Config::Dhcp(Default::default()); | 67 | let config = embassy_net::Config::Dhcp(Default::default()); |
| 68 | //let config = embassy_net::Config::StaticConfig(embassy_net::Config { | 68 | //let config = embassy_net::Config::StaticV4(embassy_net::StaticConfigV4 { |
| 69 | // address: Ipv4Cidr::new(Ipv4Address::new(10, 42, 0, 61), 24), | 69 | // address: Ipv4Cidr::new(Ipv4Address::new(10, 42, 0, 61), 24), |
| 70 | // dns_servers: Vec::new(), | 70 | // dns_servers: Vec::new(), |
| 71 | // gateway: Some(Ipv4Address::new(10, 42, 0, 1)), | 71 | // gateway: Some(Ipv4Address::new(10, 42, 0, 1)), |
diff --git a/examples/stm32l5/src/bin/usb_ethernet.rs b/examples/stm32l5/src/bin/usb_ethernet.rs index 6163e0709..d96d2f350 100644 --- a/examples/stm32l5/src/bin/usb_ethernet.rs +++ b/examples/stm32l5/src/bin/usb_ethernet.rs | |||
| @@ -92,7 +92,7 @@ async fn main(spawner: Spawner) { | |||
| 92 | unwrap!(spawner.spawn(usb_ncm_task(runner))); | 92 | unwrap!(spawner.spawn(usb_ncm_task(runner))); |
| 93 | 93 | ||
| 94 | let config = embassy_net::Config::Dhcp(Default::default()); | 94 | let config = embassy_net::Config::Dhcp(Default::default()); |
| 95 | //let config = embassy_net::Config::Static(embassy_net::StaticConfig { | 95 | //let config = embassy_net::Config::StaticV4(embassy_net::StaticConfigV4 { |
| 96 | // address: Ipv4Cidr::new(Ipv4Address::new(10, 42, 0, 61), 24), | 96 | // address: Ipv4Cidr::new(Ipv4Address::new(10, 42, 0, 61), 24), |
| 97 | // dns_servers: Vec::new(), | 97 | // dns_servers: Vec::new(), |
| 98 | // gateway: Some(Ipv4Address::new(10, 42, 0, 1)), | 98 | // gateway: Some(Ipv4Address::new(10, 42, 0, 1)), |
