diff options
| author | nerwalt <[email protected]> | 2024-07-15 10:12:22 -0600 |
|---|---|---|
| committer | nerwalt <[email protected]> | 2024-07-15 10:12:22 -0600 |
| commit | a978234cc57b9721f5a3cbc6419782c57bde23c7 (patch) | |
| tree | 8a331a6614226cd7f95e976ed2e1c265dfe3b8cd | |
| parent | 042d234f1149f5b9d17fea601c74043b1800760c (diff) | |
Connecting GPIOTE interrupts
| -rw-r--r-- | embassy-nrf/src/gpiote.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/embassy-nrf/src/gpiote.rs b/embassy-nrf/src/gpiote.rs index 948eea5de..8d15e04d0 100644 --- a/embassy-nrf/src/gpiote.rs +++ b/embassy-nrf/src/gpiote.rs | |||
| @@ -96,14 +96,14 @@ pub(crate) fn init(irq_prio: crate::interrupt::Priority) { | |||
| 96 | g.intenset.write(|w| w.port().set()); | 96 | g.intenset.write(|w| w.port().set()); |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | #[cfg(any(feature = "nrf5340-app-s", feature = "nrf9160-s"))] | 99 | #[cfg(any(feature = "nrf5340-app-s", feature = "nrf9160-s", feature = "nrf9120-s"))] |
| 100 | #[cfg(feature = "rt")] | 100 | #[cfg(feature = "rt")] |
| 101 | #[interrupt] | 101 | #[interrupt] |
| 102 | fn GPIOTE0() { | 102 | fn GPIOTE0() { |
| 103 | unsafe { handle_gpiote_interrupt() }; | 103 | unsafe { handle_gpiote_interrupt() }; |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | #[cfg(any(feature = "nrf5340-app-ns", feature = "nrf9160-ns"))] | 106 | #[cfg(any(feature = "nrf5340-app-ns", feature = "nrf9160-ns", feature = "nrf9120-ns"))] |
| 107 | #[cfg(feature = "rt")] | 107 | #[cfg(feature = "rt")] |
| 108 | #[interrupt] | 108 | #[interrupt] |
| 109 | fn GPIOTE1() { | 109 | fn GPIOTE1() { |
| @@ -117,7 +117,6 @@ fn GPIOTE() { | |||
| 117 | unsafe { handle_gpiote_interrupt() }; | 117 | unsafe { handle_gpiote_interrupt() }; |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | #[cfg(not(any(feature = "_nrf9120")))] | ||
| 121 | unsafe fn handle_gpiote_interrupt() { | 120 | unsafe fn handle_gpiote_interrupt() { |
| 122 | let g = regs(); | 121 | let g = regs(); |
| 123 | 122 | ||
| @@ -167,10 +166,11 @@ unsafe fn handle_gpiote_interrupt() { | |||
| 167 | } | 166 | } |
| 168 | } | 167 | } |
| 169 | 168 | ||
| 170 | #[cfg(not(any(feature = "_nrf51", feature = "_nrf9120")))] | 169 | |
| 170 | #[cfg(not(feature = "_nrf51"))] | ||
| 171 | struct BitIter(u32); | 171 | struct BitIter(u32); |
| 172 | 172 | ||
| 173 | #[cfg(not(any(feature = "_nrf51", feature = "_nrf9120")))] | 173 | #[cfg(not(feature = "_nrf51"))] |
| 174 | impl Iterator for BitIter { | 174 | impl Iterator for BitIter { |
| 175 | type Item = u32; | 175 | type Item = u32; |
| 176 | 176 | ||
