aboutsummaryrefslogtreecommitdiff
path: root/examples/nrf52840/src/bin/pwm_sequence.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/nrf52840/src/bin/pwm_sequence.rs
parent7559f9e5834799b041d899767ef4305dcfdf0181 (diff)
time: Update examples, tests, and other code to use new Timer::after_x convenience methods
Diffstat (limited to 'examples/nrf52840/src/bin/pwm_sequence.rs')
-rw-r--r--examples/nrf52840/src/bin/pwm_sequence.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/nrf52840/src/bin/pwm_sequence.rs b/examples/nrf52840/src/bin/pwm_sequence.rs
index b9aca9aaa..f282cf910 100644
--- a/examples/nrf52840/src/bin/pwm_sequence.rs
+++ b/examples/nrf52840/src/bin/pwm_sequence.rs
@@ -5,7 +5,7 @@
5use defmt::*; 5use defmt::*;
6use embassy_executor::Spawner; 6use embassy_executor::Spawner;
7use embassy_nrf::pwm::{Config, Prescaler, SequenceConfig, SequencePwm, SingleSequenceMode, SingleSequencer}; 7use embassy_nrf::pwm::{Config, Prescaler, SequenceConfig, SequencePwm, SingleSequenceMode, SingleSequencer};
8use embassy_time::{Duration, Timer}; 8use embassy_time::Timer;
9use {defmt_rtt as _, panic_probe as _}; 9use {defmt_rtt as _, panic_probe as _};
10 10
11#[embassy_executor::main] 11#[embassy_executor::main]
@@ -31,6 +31,6 @@ async fn main(_spawner: Spawner) {
31 // we can abort a sequence if we need to before its complete with pwm.stop() 31 // we can abort a sequence if we need to before its complete with pwm.stop()
32 // or stop is also implicitly called when the pwm peripheral is dropped 32 // or stop is also implicitly called when the pwm peripheral is dropped
33 // when it goes out of scope 33 // when it goes out of scope
34 Timer::after(Duration::from_millis(20000)).await; 34 Timer::after_millis(20000).await;
35 info!("pwm stopped early!"); 35 info!("pwm stopped early!");
36} 36}