aboutsummaryrefslogtreecommitdiff
path: root/tests/rp/src/bin/gpio_async.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 /tests/rp/src/bin/gpio_async.rs
parent7559f9e5834799b041d899767ef4305dcfdf0181 (diff)
time: Update examples, tests, and other code to use new Timer::after_x convenience methods
Diffstat (limited to 'tests/rp/src/bin/gpio_async.rs')
-rw-r--r--tests/rp/src/bin/gpio_async.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/rp/src/bin/gpio_async.rs b/tests/rp/src/bin/gpio_async.rs
index 60c65b7a0..26582f74b 100644
--- a/tests/rp/src/bin/gpio_async.rs
+++ b/tests/rp/src/bin/gpio_async.rs
@@ -27,7 +27,7 @@ async fn main(_spawner: Spawner) {
27 27
28 let set_high_future = async { 28 let set_high_future = async {
29 // Allow time for wait_for_high_future to await wait_for_high(). 29 // Allow time for wait_for_high_future to await wait_for_high().
30 Timer::after(Duration::from_millis(10)).await; 30 Timer::after_millis(10).await;
31 output.set_high(); 31 output.set_high();
32 }; 32 };
33 let wait_for_high_future = async { 33 let wait_for_high_future = async {
@@ -47,7 +47,7 @@ async fn main(_spawner: Spawner) {
47 assert!(input.is_high(), "input was expected to be high"); 47 assert!(input.is_high(), "input was expected to be high");
48 48
49 let set_low_future = async { 49 let set_low_future = async {
50 Timer::after(Duration::from_millis(10)).await; 50 Timer::after_millis(10).await;
51 output.set_low(); 51 output.set_low();
52 }; 52 };
53 let wait_for_low_future = async { 53 let wait_for_low_future = async {
@@ -67,7 +67,7 @@ async fn main(_spawner: Spawner) {
67 assert!(input.is_low(), "input was expected to be low"); 67 assert!(input.is_low(), "input was expected to be low");
68 68
69 let set_high_future = async { 69 let set_high_future = async {
70 Timer::after(Duration::from_millis(10)).await; 70 Timer::after_millis(10).await;
71 output.set_high(); 71 output.set_high();
72 }; 72 };
73 let wait_for_rising_edge_future = async { 73 let wait_for_rising_edge_future = async {
@@ -87,7 +87,7 @@ async fn main(_spawner: Spawner) {
87 assert!(input.is_high(), "input was expected to be high"); 87 assert!(input.is_high(), "input was expected to be high");
88 88
89 let set_low_future = async { 89 let set_low_future = async {
90 Timer::after(Duration::from_millis(10)).await; 90 Timer::after_millis(10).await;
91 output.set_low(); 91 output.set_low();
92 }; 92 };
93 let wait_for_falling_edge_future = async { 93 let wait_for_falling_edge_future = async {
@@ -107,7 +107,7 @@ async fn main(_spawner: Spawner) {
107 assert!(input.is_high(), "input was expected to be high"); 107 assert!(input.is_high(), "input was expected to be high");
108 108
109 let set_low_future = async { 109 let set_low_future = async {
110 Timer::after(Duration::from_millis(10)).await; 110 Timer::after_millis(10).await;
111 output.set_low(); 111 output.set_low();
112 }; 112 };
113 let wait_for_any_edge_future = async { 113 let wait_for_any_edge_future = async {
@@ -127,7 +127,7 @@ async fn main(_spawner: Spawner) {
127 assert!(input.is_low(), "input was expected to be low"); 127 assert!(input.is_low(), "input was expected to be low");
128 128
129 let set_high_future = async { 129 let set_high_future = async {
130 Timer::after(Duration::from_millis(10)).await; 130 Timer::after_millis(10).await;
131 output.set_high(); 131 output.set_high();
132 }; 132 };
133 let wait_for_any_edge_future = async { 133 let wait_for_any_edge_future = async {