diff options
| -rw-r--r-- | embassy-nrf/src/chips/nrf52805.rs | 23 | ||||
| -rw-r--r-- | embassy-nrf/src/chips/nrf52810.rs | 33 | ||||
| -rw-r--r-- | embassy-nrf/src/chips/nrf52811.rs | 33 | ||||
| -rw-r--r-- | embassy-nrf/src/chips/nrf52820.rs | 33 | ||||
| -rw-r--r-- | embassy-nrf/src/chips/nrf52832.rs | 33 | ||||
| -rw-r--r-- | embassy-nrf/src/chips/nrf52833.rs | 33 | ||||
| -rw-r--r-- | embassy-nrf/src/chips/nrf52840.rs | 33 | ||||
| -rw-r--r-- | embassy-nrf/src/ppi.rs | 53 |
8 files changed, 230 insertions, 44 deletions
diff --git a/embassy-nrf/src/chips/nrf52805.rs b/embassy-nrf/src/chips/nrf52805.rs index f214d927b..3bf87e3d9 100644 --- a/embassy-nrf/src/chips/nrf52805.rs +++ b/embassy-nrf/src/chips/nrf52805.rs | |||
| @@ -159,6 +159,29 @@ impl_pin!(P0_29, 0, 29); | |||
| 159 | impl_pin!(P0_30, 0, 30); | 159 | impl_pin!(P0_30, 0, 30); |
| 160 | impl_pin!(P0_31, 0, 31); | 160 | impl_pin!(P0_31, 0, 31); |
| 161 | 161 | ||
| 162 | impl_ppi_channel!(PPI_CH0, 0, configurable); | ||
| 163 | impl_ppi_channel!(PPI_CH1, 1, configurable); | ||
| 164 | impl_ppi_channel!(PPI_CH2, 2, configurable); | ||
| 165 | impl_ppi_channel!(PPI_CH3, 3, configurable); | ||
| 166 | impl_ppi_channel!(PPI_CH4, 4, configurable); | ||
| 167 | impl_ppi_channel!(PPI_CH5, 5, configurable); | ||
| 168 | impl_ppi_channel!(PPI_CH6, 6, configurable); | ||
| 169 | impl_ppi_channel!(PPI_CH7, 7, configurable); | ||
| 170 | impl_ppi_channel!(PPI_CH8, 8, configurable); | ||
| 171 | impl_ppi_channel!(PPI_CH9, 9, configurable); | ||
| 172 | impl_ppi_channel!(PPI_CH20, 20); | ||
| 173 | impl_ppi_channel!(PPI_CH21, 21); | ||
| 174 | impl_ppi_channel!(PPI_CH22, 22); | ||
| 175 | impl_ppi_channel!(PPI_CH23, 23); | ||
| 176 | impl_ppi_channel!(PPI_CH24, 24); | ||
| 177 | impl_ppi_channel!(PPI_CH25, 25); | ||
| 178 | impl_ppi_channel!(PPI_CH26, 26); | ||
| 179 | impl_ppi_channel!(PPI_CH27, 27); | ||
| 180 | impl_ppi_channel!(PPI_CH28, 28); | ||
| 181 | impl_ppi_channel!(PPI_CH29, 29); | ||
| 182 | impl_ppi_channel!(PPI_CH30, 30); | ||
| 183 | impl_ppi_channel!(PPI_CH31, 31); | ||
| 184 | |||
| 162 | pub mod irqs { | 185 | pub mod irqs { |
| 163 | use crate::pac::Interrupt as InterruptEnum; | 186 | use crate::pac::Interrupt as InterruptEnum; |
| 164 | use embassy_macros::interrupt_declare as declare; | 187 | use embassy_macros::interrupt_declare as declare; |
diff --git a/embassy-nrf/src/chips/nrf52810.rs b/embassy-nrf/src/chips/nrf52810.rs index caef3e7e7..d3241364b 100644 --- a/embassy-nrf/src/chips/nrf52810.rs +++ b/embassy-nrf/src/chips/nrf52810.rs | |||
| @@ -164,6 +164,39 @@ impl_pin!(P0_29, 0, 29); | |||
| 164 | impl_pin!(P0_30, 0, 30); | 164 | impl_pin!(P0_30, 0, 30); |
| 165 | impl_pin!(P0_31, 0, 31); | 165 | impl_pin!(P0_31, 0, 31); |
| 166 | 166 | ||
| 167 | impl_ppi_channel!(PPI_CH0, 0, configurable); | ||
| 168 | impl_ppi_channel!(PPI_CH1, 1, configurable); | ||
| 169 | impl_ppi_channel!(PPI_CH2, 2, configurable); | ||
| 170 | impl_ppi_channel!(PPI_CH3, 3, configurable); | ||
| 171 | impl_ppi_channel!(PPI_CH4, 4, configurable); | ||
| 172 | impl_ppi_channel!(PPI_CH5, 5, configurable); | ||
| 173 | impl_ppi_channel!(PPI_CH6, 6, configurable); | ||
| 174 | impl_ppi_channel!(PPI_CH7, 7, configurable); | ||
| 175 | impl_ppi_channel!(PPI_CH8, 8, configurable); | ||
| 176 | impl_ppi_channel!(PPI_CH9, 9, configurable); | ||
| 177 | impl_ppi_channel!(PPI_CH10, 10, configurable); | ||
| 178 | impl_ppi_channel!(PPI_CH11, 11, configurable); | ||
| 179 | impl_ppi_channel!(PPI_CH12, 12, configurable); | ||
| 180 | impl_ppi_channel!(PPI_CH13, 13, configurable); | ||
| 181 | impl_ppi_channel!(PPI_CH14, 14, configurable); | ||
| 182 | impl_ppi_channel!(PPI_CH15, 15, configurable); | ||
| 183 | impl_ppi_channel!(PPI_CH16, 16, configurable); | ||
| 184 | impl_ppi_channel!(PPI_CH17, 17, configurable); | ||
| 185 | impl_ppi_channel!(PPI_CH18, 18, configurable); | ||
| 186 | impl_ppi_channel!(PPI_CH19, 19, configurable); | ||
| 187 | impl_ppi_channel!(PPI_CH20, 20); | ||
| 188 | impl_ppi_channel!(PPI_CH21, 21); | ||
| 189 | impl_ppi_channel!(PPI_CH22, 22); | ||
| 190 | impl_ppi_channel!(PPI_CH23, 23); | ||
| 191 | impl_ppi_channel!(PPI_CH24, 24); | ||
| 192 | impl_ppi_channel!(PPI_CH25, 25); | ||
| 193 | impl_ppi_channel!(PPI_CH26, 26); | ||
| 194 | impl_ppi_channel!(PPI_CH27, 27); | ||
| 195 | impl_ppi_channel!(PPI_CH28, 28); | ||
| 196 | impl_ppi_channel!(PPI_CH29, 29); | ||
| 197 | impl_ppi_channel!(PPI_CH30, 30); | ||
| 198 | impl_ppi_channel!(PPI_CH31, 31); | ||
| 199 | |||
| 167 | pub mod irqs { | 200 | pub mod irqs { |
| 168 | use crate::pac::Interrupt as InterruptEnum; | 201 | use crate::pac::Interrupt as InterruptEnum; |
| 169 | use embassy_macros::interrupt_declare as declare; | 202 | use embassy_macros::interrupt_declare as declare; |
diff --git a/embassy-nrf/src/chips/nrf52811.rs b/embassy-nrf/src/chips/nrf52811.rs index cbf14df2a..1231ae62b 100644 --- a/embassy-nrf/src/chips/nrf52811.rs +++ b/embassy-nrf/src/chips/nrf52811.rs | |||
| @@ -165,6 +165,39 @@ impl_pin!(P0_29, 0, 29); | |||
| 165 | impl_pin!(P0_30, 0, 30); | 165 | impl_pin!(P0_30, 0, 30); |
| 166 | impl_pin!(P0_31, 0, 31); | 166 | impl_pin!(P0_31, 0, 31); |
| 167 | 167 | ||
| 168 | impl_ppi_channel!(PPI_CH0, 0, configurable); | ||
| 169 | impl_ppi_channel!(PPI_CH1, 1, configurable); | ||
| 170 | impl_ppi_channel!(PPI_CH2, 2, configurable); | ||
| 171 | impl_ppi_channel!(PPI_CH3, 3, configurable); | ||
| 172 | impl_ppi_channel!(PPI_CH4, 4, configurable); | ||
| 173 | impl_ppi_channel!(PPI_CH5, 5, configurable); | ||
| 174 | impl_ppi_channel!(PPI_CH6, 6, configurable); | ||
| 175 | impl_ppi_channel!(PPI_CH7, 7, configurable); | ||
| 176 | impl_ppi_channel!(PPI_CH8, 8, configurable); | ||
| 177 | impl_ppi_channel!(PPI_CH9, 9, configurable); | ||
| 178 | impl_ppi_channel!(PPI_CH10, 10, configurable); | ||
| 179 | impl_ppi_channel!(PPI_CH11, 11, configurable); | ||
| 180 | impl_ppi_channel!(PPI_CH12, 12, configurable); | ||
| 181 | impl_ppi_channel!(PPI_CH13, 13, configurable); | ||
| 182 | impl_ppi_channel!(PPI_CH14, 14, configurable); | ||
| 183 | impl_ppi_channel!(PPI_CH15, 15, configurable); | ||
| 184 | impl_ppi_channel!(PPI_CH16, 16, configurable); | ||
| 185 | impl_ppi_channel!(PPI_CH17, 17, configurable); | ||
| 186 | impl_ppi_channel!(PPI_CH18, 18, configurable); | ||
| 187 | impl_ppi_channel!(PPI_CH19, 19, configurable); | ||
| 188 | impl_ppi_channel!(PPI_CH20, 20); | ||
| 189 | impl_ppi_channel!(PPI_CH21, 21); | ||
| 190 | impl_ppi_channel!(PPI_CH22, 22); | ||
| 191 | impl_ppi_channel!(PPI_CH23, 23); | ||
| 192 | impl_ppi_channel!(PPI_CH24, 24); | ||
| 193 | impl_ppi_channel!(PPI_CH25, 25); | ||
| 194 | impl_ppi_channel!(PPI_CH26, 26); | ||
| 195 | impl_ppi_channel!(PPI_CH27, 27); | ||
| 196 | impl_ppi_channel!(PPI_CH28, 28); | ||
| 197 | impl_ppi_channel!(PPI_CH29, 29); | ||
| 198 | impl_ppi_channel!(PPI_CH30, 30); | ||
| 199 | impl_ppi_channel!(PPI_CH31, 31); | ||
| 200 | |||
| 168 | pub mod irqs { | 201 | pub mod irqs { |
| 169 | use crate::pac::Interrupt as InterruptEnum; | 202 | use crate::pac::Interrupt as InterruptEnum; |
| 170 | use embassy_macros::interrupt_declare as declare; | 203 | use embassy_macros::interrupt_declare as declare; |
diff --git a/embassy-nrf/src/chips/nrf52820.rs b/embassy-nrf/src/chips/nrf52820.rs index e434c0096..fc7a367ef 100644 --- a/embassy-nrf/src/chips/nrf52820.rs +++ b/embassy-nrf/src/chips/nrf52820.rs | |||
| @@ -160,6 +160,39 @@ impl_pin!(P0_29, 0, 29); | |||
| 160 | impl_pin!(P0_30, 0, 30); | 160 | impl_pin!(P0_30, 0, 30); |
| 161 | impl_pin!(P0_31, 0, 31); | 161 | impl_pin!(P0_31, 0, 31); |
| 162 | 162 | ||
| 163 | impl_ppi_channel!(PPI_CH0, 0, configurable); | ||
| 164 | impl_ppi_channel!(PPI_CH1, 1, configurable); | ||
| 165 | impl_ppi_channel!(PPI_CH2, 2, configurable); | ||
| 166 | impl_ppi_channel!(PPI_CH3, 3, configurable); | ||
| 167 | impl_ppi_channel!(PPI_CH4, 4, configurable); | ||
| 168 | impl_ppi_channel!(PPI_CH5, 5, configurable); | ||
| 169 | impl_ppi_channel!(PPI_CH6, 6, configurable); | ||
| 170 | impl_ppi_channel!(PPI_CH7, 7, configurable); | ||
| 171 | impl_ppi_channel!(PPI_CH8, 8, configurable); | ||
| 172 | impl_ppi_channel!(PPI_CH9, 9, configurable); | ||
| 173 | impl_ppi_channel!(PPI_CH10, 10, configurable); | ||
| 174 | impl_ppi_channel!(PPI_CH11, 11, configurable); | ||
| 175 | impl_ppi_channel!(PPI_CH12, 12, configurable); | ||
| 176 | impl_ppi_channel!(PPI_CH13, 13, configurable); | ||
| 177 | impl_ppi_channel!(PPI_CH14, 14, configurable); | ||
| 178 | impl_ppi_channel!(PPI_CH15, 15, configurable); | ||
| 179 | impl_ppi_channel!(PPI_CH16, 16, configurable); | ||
| 180 | impl_ppi_channel!(PPI_CH17, 17, configurable); | ||
| 181 | impl_ppi_channel!(PPI_CH18, 18, configurable); | ||
| 182 | impl_ppi_channel!(PPI_CH19, 19, configurable); | ||
| 183 | impl_ppi_channel!(PPI_CH20, 20); | ||
| 184 | impl_ppi_channel!(PPI_CH21, 21); | ||
| 185 | impl_ppi_channel!(PPI_CH22, 22); | ||
| 186 | impl_ppi_channel!(PPI_CH23, 23); | ||
| 187 | impl_ppi_channel!(PPI_CH24, 24); | ||
| 188 | impl_ppi_channel!(PPI_CH25, 25); | ||
| 189 | impl_ppi_channel!(PPI_CH26, 26); | ||
| 190 | impl_ppi_channel!(PPI_CH27, 27); | ||
| 191 | impl_ppi_channel!(PPI_CH28, 28); | ||
| 192 | impl_ppi_channel!(PPI_CH29, 29); | ||
| 193 | impl_ppi_channel!(PPI_CH30, 30); | ||
| 194 | impl_ppi_channel!(PPI_CH31, 31); | ||
| 195 | |||
| 163 | pub mod irqs { | 196 | pub mod irqs { |
| 164 | use crate::pac::Interrupt as InterruptEnum; | 197 | use crate::pac::Interrupt as InterruptEnum; |
| 165 | use embassy_macros::interrupt_declare as declare; | 198 | use embassy_macros::interrupt_declare as declare; |
diff --git a/embassy-nrf/src/chips/nrf52832.rs b/embassy-nrf/src/chips/nrf52832.rs index b95aa604b..9bbef5438 100644 --- a/embassy-nrf/src/chips/nrf52832.rs +++ b/embassy-nrf/src/chips/nrf52832.rs | |||
| @@ -178,6 +178,39 @@ impl_pin!(P0_29, 0, 29); | |||
| 178 | impl_pin!(P0_30, 0, 30); | 178 | impl_pin!(P0_30, 0, 30); |
| 179 | impl_pin!(P0_31, 0, 31); | 179 | impl_pin!(P0_31, 0, 31); |
| 180 | 180 | ||
| 181 | impl_ppi_channel!(PPI_CH0, 0, configurable); | ||
| 182 | impl_ppi_channel!(PPI_CH1, 1, configurable); | ||
| 183 | impl_ppi_channel!(PPI_CH2, 2, configurable); | ||
| 184 | impl_ppi_channel!(PPI_CH3, 3, configurable); | ||
| 185 | impl_ppi_channel!(PPI_CH4, 4, configurable); | ||
| 186 | impl_ppi_channel!(PPI_CH5, 5, configurable); | ||
| 187 | impl_ppi_channel!(PPI_CH6, 6, configurable); | ||
| 188 | impl_ppi_channel!(PPI_CH7, 7, configurable); | ||
| 189 | impl_ppi_channel!(PPI_CH8, 8, configurable); | ||
| 190 | impl_ppi_channel!(PPI_CH9, 9, configurable); | ||
| 191 | impl_ppi_channel!(PPI_CH10, 10, configurable); | ||
| 192 | impl_ppi_channel!(PPI_CH11, 11, configurable); | ||
| 193 | impl_ppi_channel!(PPI_CH12, 12, configurable); | ||
| 194 | impl_ppi_channel!(PPI_CH13, 13, configurable); | ||
| 195 | impl_ppi_channel!(PPI_CH14, 14, configurable); | ||
| 196 | impl_ppi_channel!(PPI_CH15, 15, configurable); | ||
| 197 | impl_ppi_channel!(PPI_CH16, 16, configurable); | ||
| 198 | impl_ppi_channel!(PPI_CH17, 17, configurable); | ||
| 199 | impl_ppi_channel!(PPI_CH18, 18, configurable); | ||
| 200 | impl_ppi_channel!(PPI_CH19, 19, configurable); | ||
| 201 | impl_ppi_channel!(PPI_CH20, 20); | ||
| 202 | impl_ppi_channel!(PPI_CH21, 21); | ||
| 203 | impl_ppi_channel!(PPI_CH22, 22); | ||
| 204 | impl_ppi_channel!(PPI_CH23, 23); | ||
| 205 | impl_ppi_channel!(PPI_CH24, 24); | ||
| 206 | impl_ppi_channel!(PPI_CH25, 25); | ||
| 207 | impl_ppi_channel!(PPI_CH26, 26); | ||
| 208 | impl_ppi_channel!(PPI_CH27, 27); | ||
| 209 | impl_ppi_channel!(PPI_CH28, 28); | ||
| 210 | impl_ppi_channel!(PPI_CH29, 29); | ||
| 211 | impl_ppi_channel!(PPI_CH30, 30); | ||
| 212 | impl_ppi_channel!(PPI_CH31, 31); | ||
| 213 | |||
| 181 | pub mod irqs { | 214 | pub mod irqs { |
| 182 | use crate::pac::Interrupt as InterruptEnum; | 215 | use crate::pac::Interrupt as InterruptEnum; |
| 183 | use embassy_macros::interrupt_declare as declare; | 216 | use embassy_macros::interrupt_declare as declare; |
diff --git a/embassy-nrf/src/chips/nrf52833.rs b/embassy-nrf/src/chips/nrf52833.rs index 570e4b103..d9495dd94 100644 --- a/embassy-nrf/src/chips/nrf52833.rs +++ b/embassy-nrf/src/chips/nrf52833.rs | |||
| @@ -218,6 +218,39 @@ impl_pin!(P1_13, 1, 13); | |||
| 218 | impl_pin!(P1_14, 1, 14); | 218 | impl_pin!(P1_14, 1, 14); |
| 219 | impl_pin!(P1_15, 1, 15); | 219 | impl_pin!(P1_15, 1, 15); |
| 220 | 220 | ||
| 221 | impl_ppi_channel!(PPI_CH0, 0, configurable); | ||
| 222 | impl_ppi_channel!(PPI_CH1, 1, configurable); | ||
| 223 | impl_ppi_channel!(PPI_CH2, 2, configurable); | ||
| 224 | impl_ppi_channel!(PPI_CH3, 3, configurable); | ||
| 225 | impl_ppi_channel!(PPI_CH4, 4, configurable); | ||
| 226 | impl_ppi_channel!(PPI_CH5, 5, configurable); | ||
| 227 | impl_ppi_channel!(PPI_CH6, 6, configurable); | ||
| 228 | impl_ppi_channel!(PPI_CH7, 7, configurable); | ||
| 229 | impl_ppi_channel!(PPI_CH8, 8, configurable); | ||
| 230 | impl_ppi_channel!(PPI_CH9, 9, configurable); | ||
| 231 | impl_ppi_channel!(PPI_CH10, 10, configurable); | ||
| 232 | impl_ppi_channel!(PPI_CH11, 11, configurable); | ||
| 233 | impl_ppi_channel!(PPI_CH12, 12, configurable); | ||
| 234 | impl_ppi_channel!(PPI_CH13, 13, configurable); | ||
| 235 | impl_ppi_channel!(PPI_CH14, 14, configurable); | ||
| 236 | impl_ppi_channel!(PPI_CH15, 15, configurable); | ||
| 237 | impl_ppi_channel!(PPI_CH16, 16, configurable); | ||
| 238 | impl_ppi_channel!(PPI_CH17, 17, configurable); | ||
| 239 | impl_ppi_channel!(PPI_CH18, 18, configurable); | ||
| 240 | impl_ppi_channel!(PPI_CH19, 19, configurable); | ||
| 241 | impl_ppi_channel!(PPI_CH20, 20); | ||
| 242 | impl_ppi_channel!(PPI_CH21, 21); | ||
| 243 | impl_ppi_channel!(PPI_CH22, 22); | ||
| 244 | impl_ppi_channel!(PPI_CH23, 23); | ||
| 245 | impl_ppi_channel!(PPI_CH24, 24); | ||
| 246 | impl_ppi_channel!(PPI_CH25, 25); | ||
| 247 | impl_ppi_channel!(PPI_CH26, 26); | ||
| 248 | impl_ppi_channel!(PPI_CH27, 27); | ||
| 249 | impl_ppi_channel!(PPI_CH28, 28); | ||
| 250 | impl_ppi_channel!(PPI_CH29, 29); | ||
| 251 | impl_ppi_channel!(PPI_CH30, 30); | ||
| 252 | impl_ppi_channel!(PPI_CH31, 31); | ||
| 253 | |||
| 221 | pub mod irqs { | 254 | pub mod irqs { |
| 222 | use crate::pac::Interrupt as InterruptEnum; | 255 | use crate::pac::Interrupt as InterruptEnum; |
| 223 | use embassy_macros::interrupt_declare as declare; | 256 | use embassy_macros::interrupt_declare as declare; |
diff --git a/embassy-nrf/src/chips/nrf52840.rs b/embassy-nrf/src/chips/nrf52840.rs index 1221f23b3..ad89afbca 100644 --- a/embassy-nrf/src/chips/nrf52840.rs +++ b/embassy-nrf/src/chips/nrf52840.rs | |||
| @@ -223,6 +223,39 @@ impl_pin!(P1_13, 1, 13); | |||
| 223 | impl_pin!(P1_14, 1, 14); | 223 | impl_pin!(P1_14, 1, 14); |
| 224 | impl_pin!(P1_15, 1, 15); | 224 | impl_pin!(P1_15, 1, 15); |
| 225 | 225 | ||
| 226 | impl_ppi_channel!(PPI_CH0, 0, configurable); | ||
| 227 | impl_ppi_channel!(PPI_CH1, 1, configurable); | ||
| 228 | impl_ppi_channel!(PPI_CH2, 2, configurable); | ||
| 229 | impl_ppi_channel!(PPI_CH3, 3, configurable); | ||
| 230 | impl_ppi_channel!(PPI_CH4, 4, configurable); | ||
| 231 | impl_ppi_channel!(PPI_CH5, 5, configurable); | ||
| 232 | impl_ppi_channel!(PPI_CH6, 6, configurable); | ||
| 233 | impl_ppi_channel!(PPI_CH7, 7, configurable); | ||
| 234 | impl_ppi_channel!(PPI_CH8, 8, configurable); | ||
| 235 | impl_ppi_channel!(PPI_CH9, 9, configurable); | ||
| 236 | impl_ppi_channel!(PPI_CH10, 10, configurable); | ||
| 237 | impl_ppi_channel!(PPI_CH11, 11, configurable); | ||
| 238 | impl_ppi_channel!(PPI_CH12, 12, configurable); | ||
| 239 | impl_ppi_channel!(PPI_CH13, 13, configurable); | ||
| 240 | impl_ppi_channel!(PPI_CH14, 14, configurable); | ||
| 241 | impl_ppi_channel!(PPI_CH15, 15, configurable); | ||
| 242 | impl_ppi_channel!(PPI_CH16, 16, configurable); | ||
| 243 | impl_ppi_channel!(PPI_CH17, 17, configurable); | ||
| 244 | impl_ppi_channel!(PPI_CH18, 18, configurable); | ||
| 245 | impl_ppi_channel!(PPI_CH19, 19, configurable); | ||
| 246 | impl_ppi_channel!(PPI_CH20, 20); | ||
| 247 | impl_ppi_channel!(PPI_CH21, 21); | ||
| 248 | impl_ppi_channel!(PPI_CH22, 22); | ||
| 249 | impl_ppi_channel!(PPI_CH23, 23); | ||
| 250 | impl_ppi_channel!(PPI_CH24, 24); | ||
| 251 | impl_ppi_channel!(PPI_CH25, 25); | ||
| 252 | impl_ppi_channel!(PPI_CH26, 26); | ||
| 253 | impl_ppi_channel!(PPI_CH27, 27); | ||
| 254 | impl_ppi_channel!(PPI_CH28, 28); | ||
| 255 | impl_ppi_channel!(PPI_CH29, 29); | ||
| 256 | impl_ppi_channel!(PPI_CH30, 30); | ||
| 257 | impl_ppi_channel!(PPI_CH31, 31); | ||
| 258 | |||
| 226 | pub mod irqs { | 259 | pub mod irqs { |
| 227 | use crate::pac::Interrupt as InterruptEnum; | 260 | use crate::pac::Interrupt as InterruptEnum; |
| 228 | use embassy_macros::interrupt_declare as declare; | 261 | use embassy_macros::interrupt_declare as declare; |
diff --git a/embassy-nrf/src/ppi.rs b/embassy-nrf/src/ppi.rs index a18dec12c..1b12b1e95 100644 --- a/embassy-nrf/src/ppi.rs +++ b/embassy-nrf/src/ppi.rs | |||
| @@ -1,3 +1,5 @@ | |||
| 1 | #![macro_use] | ||
| 2 | |||
| 1 | //! HAL interface for the PPI peripheral. | 3 | //! HAL interface for the PPI peripheral. |
| 2 | //! | 4 | //! |
| 3 | //! The Programmable Peripheral Interconnect interface allows for an autonomous interoperability | 5 | //! The Programmable Peripheral Interconnect interface allows for an autonomous interoperability |
| @@ -109,7 +111,7 @@ impl Event { | |||
| 109 | } | 111 | } |
| 110 | } | 112 | } |
| 111 | 113 | ||
| 112 | mod sealed { | 114 | pub(crate) mod sealed { |
| 113 | pub trait ConfigurableChannel {} | 115 | pub trait ConfigurableChannel {} |
| 114 | pub trait Channel {} | 116 | pub trait Channel {} |
| 115 | pub trait Group {} | 117 | pub trait Group {} |
| @@ -167,15 +169,15 @@ impl Channel for AnyConfigurableChannel { | |||
| 167 | } | 169 | } |
| 168 | } | 170 | } |
| 169 | 171 | ||
| 170 | macro_rules! impl_channel { | 172 | macro_rules! impl_ppi_channel { |
| 171 | ($type:ident, $number:expr, configurable) => { | 173 | ($type:ident, $number:expr, configurable) => { |
| 172 | impl_channel!($type, $number); | 174 | impl_ppi_channel!($type, $number); |
| 173 | impl sealed::ConfigurableChannel for peripherals::$type {} | 175 | impl crate::ppi::sealed::ConfigurableChannel for peripherals::$type {} |
| 174 | impl ConfigurableChannel for peripherals::$type {} | 176 | impl crate::ppi::ConfigurableChannel for peripherals::$type {} |
| 175 | }; | 177 | }; |
| 176 | ($type:ident, $number:expr) => { | 178 | ($type:ident, $number:expr) => { |
| 177 | impl sealed::Channel for peripherals::$type {} | 179 | impl crate::ppi::sealed::Channel for peripherals::$type {} |
| 178 | impl Channel for peripherals::$type { | 180 | impl crate::ppi::Channel for peripherals::$type { |
| 179 | fn number(&self) -> usize { | 181 | fn number(&self) -> usize { |
| 180 | $number | 182 | $number |
| 181 | } | 183 | } |
| @@ -183,43 +185,6 @@ macro_rules! impl_channel { | |||
| 183 | }; | 185 | }; |
| 184 | } | 186 | } |
| 185 | 187 | ||
| 186 | impl_channel!(PPI_CH0, 0, configurable); | ||
| 187 | impl_channel!(PPI_CH1, 1, configurable); | ||
| 188 | impl_channel!(PPI_CH2, 2, configurable); | ||
| 189 | impl_channel!(PPI_CH3, 3, configurable); | ||
| 190 | impl_channel!(PPI_CH4, 4, configurable); | ||
| 191 | impl_channel!(PPI_CH5, 5, configurable); | ||
| 192 | impl_channel!(PPI_CH6, 6, configurable); | ||
| 193 | impl_channel!(PPI_CH7, 7, configurable); | ||
| 194 | impl_channel!(PPI_CH8, 8, configurable); | ||
| 195 | impl_channel!(PPI_CH9, 9, configurable); | ||
| 196 | impl_channel!(PPI_CH10, 10, configurable); | ||
| 197 | impl_channel!(PPI_CH11, 11, configurable); | ||
| 198 | impl_channel!(PPI_CH12, 12, configurable); | ||
| 199 | impl_channel!(PPI_CH13, 13, configurable); | ||
| 200 | impl_channel!(PPI_CH14, 14, configurable); | ||
| 201 | impl_channel!(PPI_CH15, 15, configurable); | ||
| 202 | #[cfg(not(feature = "nrf51"))] | ||
| 203 | impl_channel!(PPI_CH16, 16, configurable); | ||
| 204 | #[cfg(not(feature = "nrf51"))] | ||
| 205 | impl_channel!(PPI_CH17, 17, configurable); | ||
| 206 | #[cfg(not(feature = "nrf51"))] | ||
| 207 | impl_channel!(PPI_CH18, 18, configurable); | ||
| 208 | #[cfg(not(feature = "nrf51"))] | ||
| 209 | impl_channel!(PPI_CH19, 19, configurable); | ||
| 210 | impl_channel!(PPI_CH20, 20); | ||
| 211 | impl_channel!(PPI_CH21, 21); | ||
| 212 | impl_channel!(PPI_CH22, 22); | ||
| 213 | impl_channel!(PPI_CH23, 23); | ||
| 214 | impl_channel!(PPI_CH24, 24); | ||
| 215 | impl_channel!(PPI_CH25, 25); | ||
| 216 | impl_channel!(PPI_CH26, 26); | ||
| 217 | impl_channel!(PPI_CH27, 27); | ||
| 218 | impl_channel!(PPI_CH28, 28); | ||
| 219 | impl_channel!(PPI_CH29, 29); | ||
| 220 | impl_channel!(PPI_CH30, 30); | ||
| 221 | impl_channel!(PPI_CH31, 31); | ||
| 222 | |||
| 223 | // ====================== | 188 | // ====================== |
| 224 | // groups | 189 | // groups |
| 225 | 190 | ||
