diff options
| author | Dario Nieuwenhuis <[email protected]> | 2022-02-12 01:04:01 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2022-02-12 01:07:02 +0100 |
| commit | 6de02bb23e270141885e24719dc8fbca0bb97feb (patch) | |
| tree | 01d6d2d13c3df50fff429ec06190ef27ac412e3f /examples/nrf/src/bin/pwm_sequence_ppi.rs | |
| parent | 5ae4e20f8654bdc129d152b5364b6864457c2e02 (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.rs | 6 |
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; | |||
| 8 | use core::future::pending; | 8 | use core::future::pending; |
| 9 | use defmt::*; | 9 | use defmt::*; |
| 10 | use embassy::executor::Spawner; | 10 | use embassy::executor::Spawner; |
| 11 | use embassy_nrf::gpio::{Input, NoPin, Pull}; | 11 | use embassy_nrf::gpio::{Input, Pull}; |
| 12 | use embassy_nrf::gpiote::{InputChannel, InputChannelPolarity}; | 12 | use embassy_nrf::gpiote::{InputChannel, InputChannelPolarity}; |
| 13 | use embassy_nrf::ppi::Ppi; | 13 | use embassy_nrf::ppi::Ppi; |
| 14 | use embassy_nrf::pwm::{ | 14 | use 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 |
