aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32h7/src/bin/eth.rs
diff options
context:
space:
mode:
authorAdam Greig <[email protected]>2023-10-15 00:57:25 +0100
committerAdam Greig <[email protected]>2023-10-15 01:30:12 +0100
commit0621e957a0ddc7010d46b3ea3ddc8b9852bc8333 (patch)
treef6caefe939109e55a73e9141c736d2f6c20f51e8 /examples/stm32h7/src/bin/eth.rs
parent7559f9e5834799b041d899767ef4305dcfdf0181 (diff)
time: Update examples, tests, and other code to use new Timer::after_x convenience methods
Diffstat (limited to 'examples/stm32h7/src/bin/eth.rs')
-rw-r--r--examples/stm32h7/src/bin/eth.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/stm32h7/src/bin/eth.rs b/examples/stm32h7/src/bin/eth.rs
index 6fbf43442..81d9c7347 100644
--- a/examples/stm32h7/src/bin/eth.rs
+++ b/examples/stm32h7/src/bin/eth.rs
@@ -11,7 +11,7 @@ use embassy_stm32::eth::{Ethernet, PacketQueue};
11use embassy_stm32::peripherals::ETH; 11use embassy_stm32::peripherals::ETH;
12use embassy_stm32::rng::Rng; 12use embassy_stm32::rng::Rng;
13use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; 13use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config};
14use embassy_time::{Duration, Timer}; 14use embassy_time::Timer;
15use embedded_io_async::Write; 15use embedded_io_async::Write;
16use rand_core::RngCore; 16use rand_core::RngCore;
17use static_cell::make_static; 17use static_cell::make_static;
@@ -118,7 +118,7 @@ async fn main(spawner: Spawner) -> ! {
118 let r = socket.connect(remote_endpoint).await; 118 let r = socket.connect(remote_endpoint).await;
119 if let Err(e) = r { 119 if let Err(e) = r {
120 info!("connect error: {:?}", e); 120 info!("connect error: {:?}", e);
121 Timer::after(Duration::from_secs(1)).await; 121 Timer::after_secs(1).await;
122 continue; 122 continue;
123 } 123 }
124 info!("connected!"); 124 info!("connected!");
@@ -128,7 +128,7 @@ async fn main(spawner: Spawner) -> ! {
128 info!("write error: {:?}", e); 128 info!("write error: {:?}", e);
129 break; 129 break;
130 } 130 }
131 Timer::after(Duration::from_secs(1)).await; 131 Timer::after_secs(1).await;
132 } 132 }
133 } 133 }
134} 134}