aboutsummaryrefslogtreecommitdiff
path: root/examples/nrf/src/bin/pwm_sequence_ppi.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2022-02-12 01:04:01 +0100
committerDario Nieuwenhuis <[email protected]>2022-02-12 01:07:02 +0100
commit6de02bb23e270141885e24719dc8fbca0bb97feb (patch)
tree01d6d2d13c3df50fff429ec06190ef27ac412e3f /examples/nrf/src/bin/pwm_sequence_ppi.rs
parent5ae4e20f8654bdc129d152b5364b6864457c2e02 (diff)
nrf: remove OptionalPin
Diffstat (limited to 'examples/nrf/src/bin/pwm_sequence_ppi.rs')
-rw-r--r--examples/nrf/src/bin/pwm_sequence_ppi.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/nrf/src/bin/pwm_sequence_ppi.rs b/examples/nrf/src/bin/pwm_sequence_ppi.rs
index c25c5e10d..66717c592 100644
--- a/examples/nrf/src/bin/pwm_sequence_ppi.rs
+++ b/examples/nrf/src/bin/pwm_sequence_ppi.rs
@@ -8,7 +8,7 @@ mod example_common;
8use core::future::pending; 8use core::future::pending;
9use defmt::*; 9use defmt::*;
10use embassy::executor::Spawner; 10use embassy::executor::Spawner;
11use embassy_nrf::gpio::{Input, NoPin, Pull}; 11use embassy_nrf::gpio::{Input, Pull};
12use embassy_nrf::gpiote::{InputChannel, InputChannelPolarity}; 12use embassy_nrf::gpiote::{InputChannel, InputChannelPolarity};
13use embassy_nrf::ppi::Ppi; 13use embassy_nrf::ppi::Ppi;
14use embassy_nrf::pwm::{ 14use embassy_nrf::pwm::{
@@ -29,9 +29,7 @@ async fn main(_spawner: Spawner, p: Peripherals) {
29 let mut seq_config = SequenceConfig::default(); 29 let mut seq_config = SequenceConfig::default();
30 seq_config.refresh = 30; 30 seq_config.refresh = 30;
31 31
32 let mut pwm = unwrap!(SequencePwm::new( 32 let mut pwm = unwrap!(SequencePwm::new_1ch(p.PWM0, p.P0_13, config));
33 p.PWM0, p.P0_13, NoPin, NoPin, NoPin, config,
34 ));
35 33
36 // pwm.stop() deconfigures pins, and then the task_start_seq0 task cant work 34 // pwm.stop() deconfigures pins, and then the task_start_seq0 task cant work
37 // so its going to have to start running in order load the configuration 35 // so its going to have to start running in order load the configuration