diff options
Diffstat (limited to 'embassy-rp/src/gpio.rs')
| -rw-r--r-- | embassy-rp/src/gpio.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/embassy-rp/src/gpio.rs b/embassy-rp/src/gpio.rs index 91cef8609..66faa2489 100644 --- a/embassy-rp/src/gpio.rs +++ b/embassy-rp/src/gpio.rs | |||
| @@ -3,10 +3,10 @@ use core::future::Future; | |||
| 3 | use core::pin::Pin as FuturePin; | 3 | use core::pin::Pin as FuturePin; |
| 4 | use core::task::{Context, Poll}; | 4 | use core::task::{Context, Poll}; |
| 5 | 5 | ||
| 6 | use embassy_cortex_m::interrupt::Interrupt; | ||
| 7 | use embassy_hal_common::{impl_peripheral, into_ref, PeripheralRef}; | 6 | use embassy_hal_common::{impl_peripheral, into_ref, PeripheralRef}; |
| 8 | use embassy_sync::waitqueue::AtomicWaker; | 7 | use embassy_sync::waitqueue::AtomicWaker; |
| 9 | 8 | ||
| 9 | use crate::interrupt::InterruptExt; | ||
| 10 | use crate::pac::common::{Reg, RW}; | 10 | use crate::pac::common::{Reg, RW}; |
| 11 | use crate::pac::SIO; | 11 | use crate::pac::SIO; |
| 12 | use crate::{interrupt, pac, peripherals, Peripheral, RegExt}; | 12 | use crate::{interrupt, pac, peripherals, Peripheral, RegExt}; |
| @@ -137,11 +137,12 @@ pub enum InterruptTrigger { | |||
| 137 | } | 137 | } |
| 138 | 138 | ||
| 139 | pub(crate) unsafe fn init() { | 139 | pub(crate) unsafe fn init() { |
| 140 | interrupt::IO_IRQ_BANK0::disable(); | 140 | interrupt::IO_IRQ_BANK0.disable(); |
| 141 | interrupt::IO_IRQ_BANK0::set_priority(interrupt::Priority::P3); | 141 | interrupt::IO_IRQ_BANK0.set_priority(interrupt::Priority::P3); |
| 142 | interrupt::IO_IRQ_BANK0::enable(); | 142 | interrupt::IO_IRQ_BANK0.enable(); |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | #[cfg(feature = "rt")] | ||
| 145 | #[interrupt] | 146 | #[interrupt] |
| 146 | unsafe fn IO_IRQ_BANK0() { | 147 | unsafe fn IO_IRQ_BANK0() { |
| 147 | let cpu = SIO.cpuid().read() as usize; | 148 | let cpu = SIO.cpuid().read() as usize; |
