diff options
| -rw-r--r-- | embassy-nrf/Cargo.toml | 20 | ||||
| -rw-r--r-- | embassy-nrf/src/chips/nrf52805.rs | 4 | ||||
| -rw-r--r-- | embassy-nrf/src/chips/nrf52810.rs | 16 | ||||
| -rw-r--r-- | embassy-nrf/src/chips/nrf52811.rs | 16 | ||||
| -rw-r--r-- | embassy-nrf/src/chips/nrf52832.rs | 16 | ||||
| -rw-r--r-- | embassy-nrf/src/chips/nrf52833.rs | 16 | ||||
| -rw-r--r-- | embassy-nrf/src/chips/nrf52840.rs | 16 | ||||
| -rw-r--r-- | embassy-nrf/src/chips/nrf5340_app.rs | 16 | ||||
| -rw-r--r-- | embassy-nrf/src/chips/nrf9160.rs | 16 | ||||
| -rw-r--r-- | embassy-nrf/src/usb.rs | 14 |
10 files changed, 75 insertions, 75 deletions
diff --git a/embassy-nrf/Cargo.toml b/embassy-nrf/Cargo.toml index 5459bc90c..dca5fd1bc 100644 --- a/embassy-nrf/Cargo.toml +++ b/embassy-nrf/Cargo.toml | |||
| @@ -90,13 +90,13 @@ embedded-storage = "0.3.0" | |||
| 90 | embedded-storage-async = { version = "0.3.0", optional = true } | 90 | embedded-storage-async = { version = "0.3.0", optional = true } |
| 91 | cfg-if = "1.0.0" | 91 | cfg-if = "1.0.0" |
| 92 | 92 | ||
| 93 | nrf52805-pac = { version = "0.11.0", optional = true, features = [ "rt" ] } | 93 | nrf52805-pac = { version = "0.12.0", optional = true, features = [ "rt" ] } |
| 94 | nrf52810-pac = { version = "0.11.0", optional = true, features = [ "rt" ] } | 94 | nrf52810-pac = { version = "0.12.0", optional = true, features = [ "rt" ] } |
| 95 | nrf52811-pac = { version = "0.11.0", optional = true, features = [ "rt" ] } | 95 | nrf52811-pac = { version = "0.12.0", optional = true, features = [ "rt" ] } |
| 96 | nrf52820-pac = { version = "0.11.0", optional = true, features = [ "rt" ] } | 96 | nrf52820-pac = { version = "0.12.0", optional = true, features = [ "rt" ] } |
| 97 | nrf52832-pac = { version = "0.11.0", optional = true, features = [ "rt" ] } | 97 | nrf52832-pac = { version = "0.12.0", optional = true, features = [ "rt" ] } |
| 98 | nrf52833-pac = { version = "0.11.0", optional = true, features = [ "rt" ] } | 98 | nrf52833-pac = { version = "0.12.0", optional = true, features = [ "rt" ] } |
| 99 | nrf52840-pac = { version = "0.11.0", optional = true, features = [ "rt" ] } | 99 | nrf52840-pac = { version = "0.12.0", optional = true, features = [ "rt" ] } |
| 100 | nrf5340-app-pac = { version = "0.11.0", optional = true, features = [ "rt" ] } | 100 | nrf5340-app-pac = { version = "0.12.0", optional = true, features = [ "rt" ] } |
| 101 | nrf5340-net-pac = { version = "0.11.0", optional = true, features = [ "rt" ] } | 101 | nrf5340-net-pac = { version = "0.12.0", optional = true, features = [ "rt" ] } |
| 102 | nrf9160-pac = { version = "0.11.0", optional = true, features = [ "rt" ] } | 102 | nrf9160-pac = { version = "0.12.0", optional = true, features = [ "rt" ] } |
diff --git a/embassy-nrf/src/chips/nrf52805.rs b/embassy-nrf/src/chips/nrf52805.rs index d078fa0ad..dec31a84c 100644 --- a/embassy-nrf/src/chips/nrf52805.rs +++ b/embassy-nrf/src/chips/nrf52805.rs | |||
| @@ -193,8 +193,8 @@ impl_ppi_channel!(PPI_CH29, 29 => static); | |||
| 193 | impl_ppi_channel!(PPI_CH30, 30 => static); | 193 | impl_ppi_channel!(PPI_CH30, 30 => static); |
| 194 | impl_ppi_channel!(PPI_CH31, 31 => static); | 194 | impl_ppi_channel!(PPI_CH31, 31 => static); |
| 195 | 195 | ||
| 196 | impl_saadc_input!(P0_04, ANALOGINPUT2); | 196 | impl_saadc_input!(P0_04, ANALOG_INPUT2); |
| 197 | impl_saadc_input!(P0_05, ANALOGINPUT3); | 197 | impl_saadc_input!(P0_05, ANALOG_INPUT3); |
| 198 | 198 | ||
| 199 | pub mod irqs { | 199 | pub mod irqs { |
| 200 | use embassy_cortex_m::interrupt::_export::declare; | 200 | use embassy_cortex_m::interrupt::_export::declare; |
diff --git a/embassy-nrf/src/chips/nrf52810.rs b/embassy-nrf/src/chips/nrf52810.rs index 3e500098c..e57a4a383 100644 --- a/embassy-nrf/src/chips/nrf52810.rs +++ b/embassy-nrf/src/chips/nrf52810.rs | |||
| @@ -211,14 +211,14 @@ impl_ppi_channel!(PPI_CH29, 29 => static); | |||
| 211 | impl_ppi_channel!(PPI_CH30, 30 => static); | 211 | impl_ppi_channel!(PPI_CH30, 30 => static); |
| 212 | impl_ppi_channel!(PPI_CH31, 31 => static); | 212 | impl_ppi_channel!(PPI_CH31, 31 => static); |
| 213 | 213 | ||
| 214 | impl_saadc_input!(P0_02, ANALOGINPUT0); | 214 | impl_saadc_input!(P0_02, ANALOG_INPUT0); |
| 215 | impl_saadc_input!(P0_03, ANALOGINPUT1); | 215 | impl_saadc_input!(P0_03, ANALOG_INPUT1); |
| 216 | impl_saadc_input!(P0_04, ANALOGINPUT2); | 216 | impl_saadc_input!(P0_04, ANALOG_INPUT2); |
| 217 | impl_saadc_input!(P0_05, ANALOGINPUT3); | 217 | impl_saadc_input!(P0_05, ANALOG_INPUT3); |
| 218 | impl_saadc_input!(P0_28, ANALOGINPUT4); | 218 | impl_saadc_input!(P0_28, ANALOG_INPUT4); |
| 219 | impl_saadc_input!(P0_29, ANALOGINPUT5); | 219 | impl_saadc_input!(P0_29, ANALOG_INPUT5); |
| 220 | impl_saadc_input!(P0_30, ANALOGINPUT6); | 220 | impl_saadc_input!(P0_30, ANALOG_INPUT6); |
| 221 | impl_saadc_input!(P0_31, ANALOGINPUT7); | 221 | impl_saadc_input!(P0_31, ANALOG_INPUT7); |
| 222 | 222 | ||
| 223 | pub mod irqs { | 223 | pub mod irqs { |
| 224 | use embassy_cortex_m::interrupt::_export::declare; | 224 | use embassy_cortex_m::interrupt::_export::declare; |
diff --git a/embassy-nrf/src/chips/nrf52811.rs b/embassy-nrf/src/chips/nrf52811.rs index 25c7c0d91..918404cf1 100644 --- a/embassy-nrf/src/chips/nrf52811.rs +++ b/embassy-nrf/src/chips/nrf52811.rs | |||
| @@ -212,14 +212,14 @@ impl_ppi_channel!(PPI_CH29, 29 => static); | |||
| 212 | impl_ppi_channel!(PPI_CH30, 30 => static); | 212 | impl_ppi_channel!(PPI_CH30, 30 => static); |
| 213 | impl_ppi_channel!(PPI_CH31, 31 => static); | 213 | impl_ppi_channel!(PPI_CH31, 31 => static); |
| 214 | 214 | ||
| 215 | impl_saadc_input!(P0_02, ANALOGINPUT0); | 215 | impl_saadc_input!(P0_02, ANALOG_INPUT0); |
| 216 | impl_saadc_input!(P0_03, ANALOGINPUT1); | 216 | impl_saadc_input!(P0_03, ANALOG_INPUT1); |
| 217 | impl_saadc_input!(P0_04, ANALOGINPUT2); | 217 | impl_saadc_input!(P0_04, ANALOG_INPUT2); |
| 218 | impl_saadc_input!(P0_05, ANALOGINPUT3); | 218 | impl_saadc_input!(P0_05, ANALOG_INPUT3); |
| 219 | impl_saadc_input!(P0_28, ANALOGINPUT4); | 219 | impl_saadc_input!(P0_28, ANALOG_INPUT4); |
| 220 | impl_saadc_input!(P0_29, ANALOGINPUT5); | 220 | impl_saadc_input!(P0_29, ANALOG_INPUT5); |
| 221 | impl_saadc_input!(P0_30, ANALOGINPUT6); | 221 | impl_saadc_input!(P0_30, ANALOG_INPUT6); |
| 222 | impl_saadc_input!(P0_31, ANALOGINPUT7); | 222 | impl_saadc_input!(P0_31, ANALOG_INPUT7); |
| 223 | 223 | ||
| 224 | pub mod irqs { | 224 | pub mod irqs { |
| 225 | use embassy_cortex_m::interrupt::_export::declare; | 225 | use embassy_cortex_m::interrupt::_export::declare; |
diff --git a/embassy-nrf/src/chips/nrf52832.rs b/embassy-nrf/src/chips/nrf52832.rs index 18b8eda67..81e66c193 100644 --- a/embassy-nrf/src/chips/nrf52832.rs +++ b/embassy-nrf/src/chips/nrf52832.rs | |||
| @@ -225,14 +225,14 @@ impl_ppi_channel!(PPI_CH29, 29 => static); | |||
| 225 | impl_ppi_channel!(PPI_CH30, 30 => static); | 225 | impl_ppi_channel!(PPI_CH30, 30 => static); |
| 226 | impl_ppi_channel!(PPI_CH31, 31 => static); | 226 | impl_ppi_channel!(PPI_CH31, 31 => static); |
| 227 | 227 | ||
| 228 | impl_saadc_input!(P0_02, ANALOGINPUT0); | 228 | impl_saadc_input!(P0_02, ANALOG_INPUT0); |
| 229 | impl_saadc_input!(P0_03, ANALOGINPUT1); | 229 | impl_saadc_input!(P0_03, ANALOG_INPUT1); |
| 230 | impl_saadc_input!(P0_04, ANALOGINPUT2); | 230 | impl_saadc_input!(P0_04, ANALOG_INPUT2); |
| 231 | impl_saadc_input!(P0_05, ANALOGINPUT3); | 231 | impl_saadc_input!(P0_05, ANALOG_INPUT3); |
| 232 | impl_saadc_input!(P0_28, ANALOGINPUT4); | 232 | impl_saadc_input!(P0_28, ANALOG_INPUT4); |
| 233 | impl_saadc_input!(P0_29, ANALOGINPUT5); | 233 | impl_saadc_input!(P0_29, ANALOG_INPUT5); |
| 234 | impl_saadc_input!(P0_30, ANALOGINPUT6); | 234 | impl_saadc_input!(P0_30, ANALOG_INPUT6); |
| 235 | impl_saadc_input!(P0_31, ANALOGINPUT7); | 235 | impl_saadc_input!(P0_31, ANALOG_INPUT7); |
| 236 | 236 | ||
| 237 | pub mod irqs { | 237 | pub mod irqs { |
| 238 | use embassy_cortex_m::interrupt::_export::declare; | 238 | use embassy_cortex_m::interrupt::_export::declare; |
diff --git a/embassy-nrf/src/chips/nrf52833.rs b/embassy-nrf/src/chips/nrf52833.rs index 3b33907d2..92499e3c9 100644 --- a/embassy-nrf/src/chips/nrf52833.rs +++ b/embassy-nrf/src/chips/nrf52833.rs | |||
| @@ -271,14 +271,14 @@ impl_ppi_channel!(PPI_CH29, 29 => static); | |||
| 271 | impl_ppi_channel!(PPI_CH30, 30 => static); | 271 | impl_ppi_channel!(PPI_CH30, 30 => static); |
| 272 | impl_ppi_channel!(PPI_CH31, 31 => static); | 272 | impl_ppi_channel!(PPI_CH31, 31 => static); |
| 273 | 273 | ||
| 274 | impl_saadc_input!(P0_02, ANALOGINPUT0); | 274 | impl_saadc_input!(P0_02, ANALOG_INPUT0); |
| 275 | impl_saadc_input!(P0_03, ANALOGINPUT1); | 275 | impl_saadc_input!(P0_03, ANALOG_INPUT1); |
| 276 | impl_saadc_input!(P0_04, ANALOGINPUT2); | 276 | impl_saadc_input!(P0_04, ANALOG_INPUT2); |
| 277 | impl_saadc_input!(P0_05, ANALOGINPUT3); | 277 | impl_saadc_input!(P0_05, ANALOG_INPUT3); |
| 278 | impl_saadc_input!(P0_28, ANALOGINPUT4); | 278 | impl_saadc_input!(P0_28, ANALOG_INPUT4); |
| 279 | impl_saadc_input!(P0_29, ANALOGINPUT5); | 279 | impl_saadc_input!(P0_29, ANALOG_INPUT5); |
| 280 | impl_saadc_input!(P0_30, ANALOGINPUT6); | 280 | impl_saadc_input!(P0_30, ANALOG_INPUT6); |
| 281 | impl_saadc_input!(P0_31, ANALOGINPUT7); | 281 | impl_saadc_input!(P0_31, ANALOG_INPUT7); |
| 282 | 282 | ||
| 283 | pub mod irqs { | 283 | pub mod irqs { |
| 284 | use embassy_cortex_m::interrupt::_export::declare; | 284 | use embassy_cortex_m::interrupt::_export::declare; |
diff --git a/embassy-nrf/src/chips/nrf52840.rs b/embassy-nrf/src/chips/nrf52840.rs index ae59f8b25..4beadfba8 100644 --- a/embassy-nrf/src/chips/nrf52840.rs +++ b/embassy-nrf/src/chips/nrf52840.rs | |||
| @@ -276,14 +276,14 @@ impl_ppi_channel!(PPI_CH29, 29 => static); | |||
| 276 | impl_ppi_channel!(PPI_CH30, 30 => static); | 276 | impl_ppi_channel!(PPI_CH30, 30 => static); |
| 277 | impl_ppi_channel!(PPI_CH31, 31 => static); | 277 | impl_ppi_channel!(PPI_CH31, 31 => static); |
| 278 | 278 | ||
| 279 | impl_saadc_input!(P0_02, ANALOGINPUT0); | 279 | impl_saadc_input!(P0_02, ANALOG_INPUT0); |
| 280 | impl_saadc_input!(P0_03, ANALOGINPUT1); | 280 | impl_saadc_input!(P0_03, ANALOG_INPUT1); |
| 281 | impl_saadc_input!(P0_04, ANALOGINPUT2); | 281 | impl_saadc_input!(P0_04, ANALOG_INPUT2); |
| 282 | impl_saadc_input!(P0_05, ANALOGINPUT3); | 282 | impl_saadc_input!(P0_05, ANALOG_INPUT3); |
| 283 | impl_saadc_input!(P0_28, ANALOGINPUT4); | 283 | impl_saadc_input!(P0_28, ANALOG_INPUT4); |
| 284 | impl_saadc_input!(P0_29, ANALOGINPUT5); | 284 | impl_saadc_input!(P0_29, ANALOG_INPUT5); |
| 285 | impl_saadc_input!(P0_30, ANALOGINPUT6); | 285 | impl_saadc_input!(P0_30, ANALOG_INPUT6); |
| 286 | impl_saadc_input!(P0_31, ANALOGINPUT7); | 286 | impl_saadc_input!(P0_31, ANALOG_INPUT7); |
| 287 | 287 | ||
| 288 | pub mod irqs { | 288 | pub mod irqs { |
| 289 | use embassy_cortex_m::interrupt::_export::declare; | 289 | use embassy_cortex_m::interrupt::_export::declare; |
diff --git a/embassy-nrf/src/chips/nrf5340_app.rs b/embassy-nrf/src/chips/nrf5340_app.rs index edf800ef3..7845d4a8e 100644 --- a/embassy-nrf/src/chips/nrf5340_app.rs +++ b/embassy-nrf/src/chips/nrf5340_app.rs | |||
| @@ -458,14 +458,14 @@ impl_ppi_channel!(PPI_CH29, 29 => configurable); | |||
| 458 | impl_ppi_channel!(PPI_CH30, 30 => configurable); | 458 | impl_ppi_channel!(PPI_CH30, 30 => configurable); |
| 459 | impl_ppi_channel!(PPI_CH31, 31 => configurable); | 459 | impl_ppi_channel!(PPI_CH31, 31 => configurable); |
| 460 | 460 | ||
| 461 | impl_saadc_input!(P0_13, ANALOGINPUT0); | 461 | impl_saadc_input!(P0_13, ANALOG_INPUT0); |
| 462 | impl_saadc_input!(P0_14, ANALOGINPUT1); | 462 | impl_saadc_input!(P0_14, ANALOG_INPUT1); |
| 463 | impl_saadc_input!(P0_15, ANALOGINPUT2); | 463 | impl_saadc_input!(P0_15, ANALOG_INPUT2); |
| 464 | impl_saadc_input!(P0_16, ANALOGINPUT3); | 464 | impl_saadc_input!(P0_16, ANALOG_INPUT3); |
| 465 | impl_saadc_input!(P0_17, ANALOGINPUT4); | 465 | impl_saadc_input!(P0_17, ANALOG_INPUT4); |
| 466 | impl_saadc_input!(P0_18, ANALOGINPUT5); | 466 | impl_saadc_input!(P0_18, ANALOG_INPUT5); |
| 467 | impl_saadc_input!(P0_19, ANALOGINPUT6); | 467 | impl_saadc_input!(P0_19, ANALOG_INPUT6); |
| 468 | impl_saadc_input!(P0_20, ANALOGINPUT7); | 468 | impl_saadc_input!(P0_20, ANALOG_INPUT7); |
| 469 | 469 | ||
| 470 | pub mod irqs { | 470 | pub mod irqs { |
| 471 | use embassy_cortex_m::interrupt::_export::declare; | 471 | use embassy_cortex_m::interrupt::_export::declare; |
diff --git a/embassy-nrf/src/chips/nrf9160.rs b/embassy-nrf/src/chips/nrf9160.rs index f8ed11e03..b5a53ed80 100644 --- a/embassy-nrf/src/chips/nrf9160.rs +++ b/embassy-nrf/src/chips/nrf9160.rs | |||
| @@ -339,14 +339,14 @@ impl_ppi_channel!(PPI_CH13, 13 => configurable); | |||
| 339 | impl_ppi_channel!(PPI_CH14, 14 => configurable); | 339 | impl_ppi_channel!(PPI_CH14, 14 => configurable); |
| 340 | impl_ppi_channel!(PPI_CH15, 15 => configurable); | 340 | impl_ppi_channel!(PPI_CH15, 15 => configurable); |
| 341 | 341 | ||
| 342 | impl_saadc_input!(P0_13, ANALOGINPUT0); | 342 | impl_saadc_input!(P0_13, ANALOG_INPUT0); |
| 343 | impl_saadc_input!(P0_14, ANALOGINPUT1); | 343 | impl_saadc_input!(P0_14, ANALOG_INPUT1); |
| 344 | impl_saadc_input!(P0_15, ANALOGINPUT2); | 344 | impl_saadc_input!(P0_15, ANALOG_INPUT2); |
| 345 | impl_saadc_input!(P0_16, ANALOGINPUT3); | 345 | impl_saadc_input!(P0_16, ANALOG_INPUT3); |
| 346 | impl_saadc_input!(P0_17, ANALOGINPUT4); | 346 | impl_saadc_input!(P0_17, ANALOG_INPUT4); |
| 347 | impl_saadc_input!(P0_18, ANALOGINPUT5); | 347 | impl_saadc_input!(P0_18, ANALOG_INPUT5); |
| 348 | impl_saadc_input!(P0_19, ANALOGINPUT6); | 348 | impl_saadc_input!(P0_19, ANALOG_INPUT6); |
| 349 | impl_saadc_input!(P0_20, ANALOGINPUT7); | 349 | impl_saadc_input!(P0_20, ANALOG_INPUT7); |
| 350 | 350 | ||
| 351 | pub mod irqs { | 351 | pub mod irqs { |
| 352 | use embassy_cortex_m::interrupt::_export::declare; | 352 | use embassy_cortex_m::interrupt::_export::declare; |
diff --git a/embassy-nrf/src/usb.rs b/embassy-nrf/src/usb.rs index 00da5c9dd..eb1472fa5 100644 --- a/embassy-nrf/src/usb.rs +++ b/embassy-nrf/src/usb.rs | |||
| @@ -313,7 +313,7 @@ impl<'d, T: Instance, P: UsbSupply> driver::Bus for Bus<'d, T, P> { | |||
| 313 | } | 313 | } |
| 314 | }) | 314 | }) |
| 315 | .await; | 315 | .await; |
| 316 | regs.eventcause.write(|w| w.ready().set_bit()); // Write 1 to clear. | 316 | regs.eventcause.write(|w| w.ready().clear_bit_by_one()); |
| 317 | 317 | ||
| 318 | errata::post_enable(); | 318 | errata::post_enable(); |
| 319 | 319 | ||
| @@ -367,24 +367,24 @@ impl<'d, T: Instance, P: UsbSupply> driver::Bus for Bus<'d, T, P> { | |||
| 367 | let r = regs.eventcause.read(); | 367 | let r = regs.eventcause.read(); |
| 368 | 368 | ||
| 369 | if r.isooutcrc().bit() { | 369 | if r.isooutcrc().bit() { |
| 370 | regs.eventcause.write(|w| w.isooutcrc().set_bit()); | 370 | regs.eventcause.write(|w| w.isooutcrc().detected()); |
| 371 | trace!("USB event: isooutcrc"); | 371 | trace!("USB event: isooutcrc"); |
| 372 | } | 372 | } |
| 373 | if r.usbwuallowed().bit() { | 373 | if r.usbwuallowed().bit() { |
| 374 | regs.eventcause.write(|w| w.usbwuallowed().set_bit()); | 374 | regs.eventcause.write(|w| w.usbwuallowed().allowed()); |
| 375 | trace!("USB event: usbwuallowed"); | 375 | trace!("USB event: usbwuallowed"); |
| 376 | } | 376 | } |
| 377 | if r.suspend().bit() { | 377 | if r.suspend().bit() { |
| 378 | regs.eventcause.write(|w| w.suspend().set_bit()); | 378 | regs.eventcause.write(|w| w.suspend().detected()); |
| 379 | regs.lowpower.write(|w| w.lowpower().low_power()); | 379 | regs.lowpower.write(|w| w.lowpower().low_power()); |
| 380 | return Poll::Ready(Event::Suspend); | 380 | return Poll::Ready(Event::Suspend); |
| 381 | } | 381 | } |
| 382 | if r.resume().bit() { | 382 | if r.resume().bit() { |
| 383 | regs.eventcause.write(|w| w.resume().set_bit()); | 383 | regs.eventcause.write(|w| w.resume().detected()); |
| 384 | return Poll::Ready(Event::Resume); | 384 | return Poll::Ready(Event::Resume); |
| 385 | } | 385 | } |
| 386 | if r.ready().bit() { | 386 | if r.ready().bit() { |
| 387 | regs.eventcause.write(|w| w.ready().set_bit()); | 387 | regs.eventcause.write(|w| w.ready().ready()); |
| 388 | trace!("USB event: ready"); | 388 | trace!("USB event: ready"); |
| 389 | } | 389 | } |
| 390 | 390 | ||
| @@ -512,7 +512,7 @@ impl<'d, T: Instance, P: UsbSupply> driver::Bus for Bus<'d, T, P> { | |||
| 512 | } else if r.resume().bit() { | 512 | } else if r.resume().bit() { |
| 513 | Poll::Ready(()) | 513 | Poll::Ready(()) |
| 514 | } else if r.usbwuallowed().bit() { | 514 | } else if r.usbwuallowed().bit() { |
| 515 | regs.eventcause.write(|w| w.usbwuallowed().set_bit()); | 515 | regs.eventcause.write(|w| w.usbwuallowed().allowed()); |
| 516 | 516 | ||
| 517 | regs.dpdmvalue.write(|w| w.state().resume()); | 517 | regs.dpdmvalue.write(|w| w.state().resume()); |
| 518 | regs.tasks_dpdmdrive.write(|w| w.tasks_dpdmdrive().set_bit()); | 518 | regs.tasks_dpdmdrive.write(|w| w.tasks_dpdmdrive().set_bit()); |
