diff options
| author | Ulf Lilleengen <[email protected]> | 2025-11-14 09:12:02 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-11-14 09:12:02 +0000 |
| commit | 0698b95715c8ef6ea0f442919247fafa348112a5 (patch) | |
| tree | 1accc53283c8881629f3edda0a0affa24492cd1c /examples/nrf52840 | |
| parent | 578679771eafe93ccc0e8de8fc3f97a5b991b02c (diff) | |
| parent | 3949a8601f293856df326ccc21252cb5f1518c5c (diff) | |
Merge pull request #4810 from de-vri-es/nrf-gpiote-enable-interrupts-before-being-polled
embassy-nrf: add `gpiote::InputChannel::wait_for_high/low()`
Diffstat (limited to 'examples/nrf52840')
| -rw-r--r-- | examples/nrf52840/src/bin/gpiote_channel.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/nrf52840/src/bin/gpiote_channel.rs b/examples/nrf52840/src/bin/gpiote_channel.rs index c7ddc1d8d..e358779b2 100644 --- a/examples/nrf52840/src/bin/gpiote_channel.rs +++ b/examples/nrf52840/src/bin/gpiote_channel.rs | |||
| @@ -12,10 +12,10 @@ async fn main(_spawner: Spawner) { | |||
| 12 | let p = embassy_nrf::init(Default::default()); | 12 | let p = embassy_nrf::init(Default::default()); |
| 13 | info!("Starting!"); | 13 | info!("Starting!"); |
| 14 | 14 | ||
| 15 | let ch1 = InputChannel::new(p.GPIOTE_CH0, p.P0_11, Pull::Up, InputChannelPolarity::HiToLo); | 15 | let mut ch1 = InputChannel::new(p.GPIOTE_CH0, p.P0_11, Pull::Up, InputChannelPolarity::HiToLo); |
| 16 | let ch2 = InputChannel::new(p.GPIOTE_CH1, p.P0_12, Pull::Up, InputChannelPolarity::LoToHi); | 16 | let mut ch2 = InputChannel::new(p.GPIOTE_CH1, p.P0_12, Pull::Up, InputChannelPolarity::LoToHi); |
| 17 | let ch3 = InputChannel::new(p.GPIOTE_CH2, p.P0_24, Pull::Up, InputChannelPolarity::Toggle); | 17 | let mut ch3 = InputChannel::new(p.GPIOTE_CH2, p.P0_24, Pull::Up, InputChannelPolarity::Toggle); |
| 18 | let ch4 = InputChannel::new(p.GPIOTE_CH3, p.P0_25, Pull::Up, InputChannelPolarity::Toggle); | 18 | let mut ch4 = InputChannel::new(p.GPIOTE_CH3, p.P0_25, Pull::Up, InputChannelPolarity::Toggle); |
| 19 | 19 | ||
| 20 | let button1 = async { | 20 | let button1 = async { |
| 21 | loop { | 21 | loop { |
