aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32f7/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/stm32f7/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/stm32f7/src/bin/eth.rs')
-rw-r--r--examples/stm32f7/src/bin/eth.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/stm32f7/src/bin/eth.rs b/examples/stm32f7/src/bin/eth.rs
index 7c9ee1590..d50473b9d 100644
--- a/examples/stm32f7/src/bin/eth.rs
+++ b/examples/stm32f7/src/bin/eth.rs
@@ -12,7 +12,7 @@ use embassy_stm32::peripherals::ETH;
12use embassy_stm32::rng::Rng; 12use embassy_stm32::rng::Rng;
13use embassy_stm32::time::mhz; 13use embassy_stm32::time::mhz;
14use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; 14use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config};
15use embassy_time::{Duration, Timer}; 15use embassy_time::Timer;
16use embedded_io_async::Write; 16use embedded_io_async::Write;
17use rand_core::RngCore; 17use rand_core::RngCore;
18use static_cell::make_static; 18use static_cell::make_static;
@@ -100,7 +100,7 @@ async fn main(spawner: Spawner) -> ! {
100 let r = socket.connect(remote_endpoint).await; 100 let r = socket.connect(remote_endpoint).await;
101 if let Err(e) = r { 101 if let Err(e) = r {
102 info!("connect error: {:?}", e); 102 info!("connect error: {:?}", e);
103 Timer::after(Duration::from_secs(1)).await; 103 Timer::after_secs(1).await;
104 continue; 104 continue;
105 } 105 }
106 info!("connected!"); 106 info!("connected!");
@@ -111,7 +111,7 @@ async fn main(spawner: Spawner) -> ! {
111 info!("write error: {:?}", e); 111 info!("write error: {:?}", e);
112 break; 112 break;
113 } 113 }
114 Timer::after(Duration::from_secs(1)).await; 114 Timer::after_secs(1).await;
115 } 115 }
116 } 116 }
117} 117}