aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32h7/src/bin/eth_client.rs
diff options
context:
space:
mode:
authorJuliDi <[email protected]>2023-09-08 17:40:20 +0200
committerJuliDi <[email protected]>2023-09-08 17:40:20 +0200
commitcf2d4eca7c3a3f53aa57a7d9a53de490962019cf (patch)
tree9a3ef5efef0fd0a5719f229a45bf7f8cfdb0bbb4 /examples/stm32h7/src/bin/eth_client.rs
parent3e0b752befd492229bfb4c6f9fd3213cfd69a0fc (diff)
add wait_config_up to examples
Diffstat (limited to 'examples/stm32h7/src/bin/eth_client.rs')
-rw-r--r--examples/stm32h7/src/bin/eth_client.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/stm32h7/src/bin/eth_client.rs b/examples/stm32h7/src/bin/eth_client.rs
index 6664410c8..ebef54c3c 100644
--- a/examples/stm32h7/src/bin/eth_client.rs
+++ b/examples/stm32h7/src/bin/eth_client.rs
@@ -82,12 +82,12 @@ async fn main(spawner: Spawner) -> ! {
82 )); 82 ));
83 83
84 // Launch network task 84 // Launch network task
85 unwrap!(spawner.spawn(net_task(&stack))); 85 unwrap!(spawner.spawn(net_task(stack)));
86 86
87 info!("Network task initialized"); 87 // Ensure DHCP configuration is up before trying connect
88 stack.wait_config_up().await;
88 89
89 // To ensure DHCP configuration before trying connect 90 info!("Network task initialized");
90 Timer::after(Duration::from_secs(20)).await;
91 91
92 static STATE: TcpClientState<1, 1024, 1024> = TcpClientState::new(); 92 static STATE: TcpClientState<1, 1024, 1024> = TcpClientState::new();
93 let client = TcpClient::new(&stack, &STATE); 93 let client = TcpClient::new(&stack, &STATE);