diff options
| author | goueslati <[email protected]> | 2023-06-12 14:27:53 +0100 |
|---|---|---|
| committer | goueslati <[email protected]> | 2023-06-12 14:27:53 +0100 |
| commit | 2d89cfb18f00aefbfa108728dfea3398e80ea3e4 (patch) | |
| tree | 6485dacac7e61c4378ac522e709edb0a86bd7523 /embassy-nrf/src/gpiote.rs | |
| parent | 2dd5ce83ec0421564e85b667f5dabd592f313e5c (diff) | |
| parent | ab86b060500ceda1c80e39f35af69cb08a7b63a2 (diff) | |
fix merge conflict
Diffstat (limited to 'embassy-nrf/src/gpiote.rs')
| -rw-r--r-- | embassy-nrf/src/gpiote.rs | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/embassy-nrf/src/gpiote.rs b/embassy-nrf/src/gpiote.rs index 2ec5220a7..21d0d9564 100644 --- a/embassy-nrf/src/gpiote.rs +++ b/embassy-nrf/src/gpiote.rs | |||
| @@ -9,7 +9,7 @@ use embassy_sync::waitqueue::AtomicWaker; | |||
| 9 | 9 | ||
| 10 | use crate::gpio::sealed::Pin as _; | 10 | use crate::gpio::sealed::Pin as _; |
| 11 | use crate::gpio::{AnyPin, Flex, Input, Output, Pin as GpioPin}; | 11 | use crate::gpio::{AnyPin, Flex, Input, Output, Pin as GpioPin}; |
| 12 | use crate::interrupt::Interrupt; | 12 | use crate::interrupt::InterruptExt; |
| 13 | use crate::ppi::{Event, Task}; | 13 | use crate::ppi::{Event, Task}; |
| 14 | use crate::{interrupt, pac, peripherals}; | 14 | use crate::{interrupt, pac, peripherals}; |
| 15 | 15 | ||
| @@ -75,15 +75,15 @@ pub(crate) fn init(irq_prio: crate::interrupt::Priority) { | |||
| 75 | 75 | ||
| 76 | // Enable interrupts | 76 | // Enable interrupts |
| 77 | #[cfg(any(feature = "nrf5340-app-s", feature = "nrf9160-s"))] | 77 | #[cfg(any(feature = "nrf5340-app-s", feature = "nrf9160-s"))] |
| 78 | type Irq = interrupt::GPIOTE0; | 78 | let irq = interrupt::GPIOTE0; |
| 79 | #[cfg(any(feature = "nrf5340-app-ns", feature = "nrf9160-ns"))] | 79 | #[cfg(any(feature = "nrf5340-app-ns", feature = "nrf9160-ns"))] |
| 80 | type Irq = interrupt::GPIOTE1; | 80 | let irq = interrupt::GPIOTE1; |
| 81 | #[cfg(any(feature = "_nrf52", feature = "nrf5340-net"))] | 81 | #[cfg(any(feature = "_nrf52", feature = "nrf5340-net"))] |
| 82 | type Irq = interrupt::GPIOTE; | 82 | let irq = interrupt::GPIOTE; |
| 83 | 83 | ||
| 84 | Irq::unpend(); | 84 | irq.unpend(); |
| 85 | Irq::set_priority(irq_prio); | 85 | irq.set_priority(irq_prio); |
| 86 | unsafe { Irq::enable() }; | 86 | unsafe { irq.enable() }; |
| 87 | 87 | ||
| 88 | let g = regs(); | 88 | let g = regs(); |
| 89 | g.events_port.write(|w| w); | 89 | g.events_port.write(|w| w); |
| @@ -91,18 +91,21 @@ pub(crate) fn init(irq_prio: crate::interrupt::Priority) { | |||
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | #[cfg(any(feature = "nrf5340-app-s", feature = "nrf9160-s"))] | 93 | #[cfg(any(feature = "nrf5340-app-s", feature = "nrf9160-s"))] |
| 94 | #[cfg(feature = "rt")] | ||
| 94 | #[interrupt] | 95 | #[interrupt] |
| 95 | fn GPIOTE0() { | 96 | fn GPIOTE0() { |
| 96 | unsafe { handle_gpiote_interrupt() }; | 97 | unsafe { handle_gpiote_interrupt() }; |
| 97 | } | 98 | } |
| 98 | 99 | ||
| 99 | #[cfg(any(feature = "nrf5340-app-ns", feature = "nrf9160-ns"))] | 100 | #[cfg(any(feature = "nrf5340-app-ns", feature = "nrf9160-ns"))] |
| 101 | #[cfg(feature = "rt")] | ||
| 100 | #[interrupt] | 102 | #[interrupt] |
| 101 | fn GPIOTE1() { | 103 | fn GPIOTE1() { |
| 102 | unsafe { handle_gpiote_interrupt() }; | 104 | unsafe { handle_gpiote_interrupt() }; |
| 103 | } | 105 | } |
| 104 | 106 | ||
| 105 | #[cfg(any(feature = "_nrf52", feature = "nrf5340-net"))] | 107 | #[cfg(any(feature = "_nrf52", feature = "nrf5340-net"))] |
| 108 | #[cfg(feature = "rt")] | ||
| 106 | #[interrupt] | 109 | #[interrupt] |
| 107 | fn GPIOTE() { | 110 | fn GPIOTE() { |
| 108 | unsafe { handle_gpiote_interrupt() }; | 111 | unsafe { handle_gpiote_interrupt() }; |
