diff options
| author | Dario Nieuwenhuis <[email protected]> | 2024-05-21 23:41:45 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2024-05-21 23:41:45 +0200 |
| commit | e55f31bdc6882b6a6ac78a59aabf42ff9433f48d (patch) | |
| tree | b67f5a9225cc7da984f97d12054fcde799d84286 /examples/rp/src/bin/interrupt.rs | |
| parent | 24032d0853adc799588dbc84315b3e72ec5bf7b2 (diff) | |
rp/pwm: rename channel->slice in args, misc fix.
Diffstat (limited to 'examples/rp/src/bin/interrupt.rs')
| -rw-r--r-- | examples/rp/src/bin/interrupt.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/rp/src/bin/interrupt.rs b/examples/rp/src/bin/interrupt.rs index d334d35d7..5b9d7027e 100644 --- a/examples/rp/src/bin/interrupt.rs +++ b/examples/rp/src/bin/interrupt.rs | |||
| @@ -15,7 +15,6 @@ use embassy_executor::Spawner; | |||
| 15 | use embassy_rp::adc::{self, Adc, Blocking}; | 15 | use embassy_rp::adc::{self, Adc, Blocking}; |
| 16 | use embassy_rp::gpio::Pull; | 16 | use embassy_rp::gpio::Pull; |
| 17 | use embassy_rp::interrupt; | 17 | use embassy_rp::interrupt; |
| 18 | use embassy_rp::peripherals::PWM_SLICE4; | ||
| 19 | use embassy_rp::pwm::{Config, Pwm}; | 18 | use embassy_rp::pwm::{Config, Pwm}; |
| 20 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | 19 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; |
| 21 | use embassy_sync::blocking_mutex::Mutex; | 20 | use embassy_sync::blocking_mutex::Mutex; |
| @@ -26,7 +25,7 @@ use static_cell::StaticCell; | |||
| 26 | use {defmt_rtt as _, panic_probe as _}; | 25 | use {defmt_rtt as _, panic_probe as _}; |
| 27 | 26 | ||
| 28 | static COUNTER: AtomicU32 = AtomicU32::new(0); | 27 | static COUNTER: AtomicU32 = AtomicU32::new(0); |
| 29 | static PWM: Mutex<CriticalSectionRawMutex, RefCell<Option<Pwm<PWM_SLICE4>>>> = Mutex::new(RefCell::new(None)); | 28 | static PWM: Mutex<CriticalSectionRawMutex, RefCell<Option<Pwm>>> = Mutex::new(RefCell::new(None)); |
| 30 | static ADC: Mutex<CriticalSectionRawMutex, RefCell<Option<(Adc<Blocking>, adc::Channel)>>> = | 29 | static ADC: Mutex<CriticalSectionRawMutex, RefCell<Option<(Adc<Blocking>, adc::Channel)>>> = |
| 31 | Mutex::new(RefCell::new(None)); | 30 | Mutex::new(RefCell::new(None)); |
| 32 | static ADC_VALUES: Channel<CriticalSectionRawMutex, u16, 2048> = Channel::new(); | 31 | static ADC_VALUES: Channel<CriticalSectionRawMutex, u16, 2048> = Channel::new(); |
