diff options
| author | Dario Nieuwenhuis <[email protected]> | 2021-03-26 23:20:53 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2021-03-29 00:58:58 +0200 |
| commit | 0e8bb5dc0b59a490f679f82c3efc6c2994c2d1d9 (patch) | |
| tree | d003a7448947ab7424d1bb7760b39566eef74b59 /embassy-nrf/src | |
| parent | eedb51bbb63677f53cfdfb4d0e342981a4866df7 (diff) | |
util: Do not unregister waker on wake in AtomicWaker.
Diffstat (limited to 'embassy-nrf/src')
| -rw-r--r-- | embassy-nrf/src/gpiote.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/embassy-nrf/src/gpiote.rs b/embassy-nrf/src/gpiote.rs index 9a7642c51..920d69236 100644 --- a/embassy-nrf/src/gpiote.rs +++ b/embassy-nrf/src/gpiote.rs | |||
| @@ -9,7 +9,7 @@ use core::ptr; | |||
| 9 | use core::task::{Context, Poll}; | 9 | use core::task::{Context, Poll}; |
| 10 | use embassy::interrupt::InterruptExt; | 10 | use embassy::interrupt::InterruptExt; |
| 11 | use embassy::traits::gpio::{WaitForHigh, WaitForLow}; | 11 | use embassy::traits::gpio::{WaitForHigh, WaitForLow}; |
| 12 | use embassy::util::{AtomicWakerRegistration, PeripheralBorrow, Signal}; | 12 | use embassy::util::{AtomicWaker, PeripheralBorrow, Signal}; |
| 13 | use embedded_hal::digital::v2::{InputPin, OutputPin, StatefulOutputPin}; | 13 | use embedded_hal::digital::v2::{InputPin, OutputPin, StatefulOutputPin}; |
| 14 | 14 | ||
| 15 | use crate::gpio::sealed::Pin as _; | 15 | use crate::gpio::sealed::Pin as _; |
| @@ -68,9 +68,9 @@ impl ChannelID for ChAny { | |||
| 68 | } | 68 | } |
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | const NEW_AWR: AtomicWakerRegistration = AtomicWakerRegistration::new(); | 71 | const NEW_AWR: AtomicWaker = AtomicWaker::new(); |
| 72 | static CHANNEL_WAKERS: [AtomicWakerRegistration; CHANNEL_COUNT] = [NEW_AWR; CHANNEL_COUNT]; | 72 | static CHANNEL_WAKERS: [AtomicWaker; CHANNEL_COUNT] = [NEW_AWR; CHANNEL_COUNT]; |
| 73 | static PORT_WAKERS: [AtomicWakerRegistration; PIN_COUNT] = [NEW_AWR; PIN_COUNT]; | 73 | static PORT_WAKERS: [AtomicWaker; PIN_COUNT] = [NEW_AWR; PIN_COUNT]; |
| 74 | 74 | ||
| 75 | pub enum InputChannelPolarity { | 75 | pub enum InputChannelPolarity { |
| 76 | None, | 76 | None, |
