Merge #1029
1029: Update nrf pacs r=Dirbaio a=diondokter Co-authored-by: Dion Dokter <dion@tweedegolf.com>
This commit is contained in:
commit
71cc6833e1
@ -90,13 +90,13 @@ embedded-storage = "0.3.0"
|
|||||||
embedded-storage-async = { version = "0.3.0", optional = true }
|
embedded-storage-async = { version = "0.3.0", optional = true }
|
||||||
cfg-if = "1.0.0"
|
cfg-if = "1.0.0"
|
||||||
|
|
||||||
nrf52805-pac = { version = "0.11.0", optional = true, features = [ "rt" ] }
|
nrf52805-pac = { version = "0.12.0", optional = true, features = [ "rt" ] }
|
||||||
nrf52810-pac = { version = "0.11.0", optional = true, features = [ "rt" ] }
|
nrf52810-pac = { version = "0.12.0", optional = true, features = [ "rt" ] }
|
||||||
nrf52811-pac = { version = "0.11.0", optional = true, features = [ "rt" ] }
|
nrf52811-pac = { version = "0.12.0", optional = true, features = [ "rt" ] }
|
||||||
nrf52820-pac = { version = "0.11.0", optional = true, features = [ "rt" ] }
|
nrf52820-pac = { version = "0.12.0", optional = true, features = [ "rt" ] }
|
||||||
nrf52832-pac = { version = "0.11.0", optional = true, features = [ "rt" ] }
|
nrf52832-pac = { version = "0.12.0", optional = true, features = [ "rt" ] }
|
||||||
nrf52833-pac = { version = "0.11.0", optional = true, features = [ "rt" ] }
|
nrf52833-pac = { version = "0.12.0", optional = true, features = [ "rt" ] }
|
||||||
nrf52840-pac = { version = "0.11.0", optional = true, features = [ "rt" ] }
|
nrf52840-pac = { version = "0.12.0", optional = true, features = [ "rt" ] }
|
||||||
nrf5340-app-pac = { version = "0.11.0", optional = true, features = [ "rt" ] }
|
nrf5340-app-pac = { version = "0.12.0", optional = true, features = [ "rt" ] }
|
||||||
nrf5340-net-pac = { version = "0.11.0", optional = true, features = [ "rt" ] }
|
nrf5340-net-pac = { version = "0.12.0", optional = true, features = [ "rt" ] }
|
||||||
nrf9160-pac = { version = "0.11.0", optional = true, features = [ "rt" ] }
|
nrf9160-pac = { version = "0.12.0", optional = true, features = [ "rt" ] }
|
||||||
|
@ -193,8 +193,8 @@ impl_ppi_channel!(PPI_CH29, 29 => static);
|
|||||||
impl_ppi_channel!(PPI_CH30, 30 => static);
|
impl_ppi_channel!(PPI_CH30, 30 => static);
|
||||||
impl_ppi_channel!(PPI_CH31, 31 => static);
|
impl_ppi_channel!(PPI_CH31, 31 => static);
|
||||||
|
|
||||||
impl_saadc_input!(P0_04, ANALOGINPUT2);
|
impl_saadc_input!(P0_04, ANALOG_INPUT2);
|
||||||
impl_saadc_input!(P0_05, ANALOGINPUT3);
|
impl_saadc_input!(P0_05, ANALOG_INPUT3);
|
||||||
|
|
||||||
pub mod irqs {
|
pub mod irqs {
|
||||||
use embassy_cortex_m::interrupt::_export::declare;
|
use embassy_cortex_m::interrupt::_export::declare;
|
||||||
|
@ -211,14 +211,14 @@ impl_ppi_channel!(PPI_CH29, 29 => static);
|
|||||||
impl_ppi_channel!(PPI_CH30, 30 => static);
|
impl_ppi_channel!(PPI_CH30, 30 => static);
|
||||||
impl_ppi_channel!(PPI_CH31, 31 => static);
|
impl_ppi_channel!(PPI_CH31, 31 => static);
|
||||||
|
|
||||||
impl_saadc_input!(P0_02, ANALOGINPUT0);
|
impl_saadc_input!(P0_02, ANALOG_INPUT0);
|
||||||
impl_saadc_input!(P0_03, ANALOGINPUT1);
|
impl_saadc_input!(P0_03, ANALOG_INPUT1);
|
||||||
impl_saadc_input!(P0_04, ANALOGINPUT2);
|
impl_saadc_input!(P0_04, ANALOG_INPUT2);
|
||||||
impl_saadc_input!(P0_05, ANALOGINPUT3);
|
impl_saadc_input!(P0_05, ANALOG_INPUT3);
|
||||||
impl_saadc_input!(P0_28, ANALOGINPUT4);
|
impl_saadc_input!(P0_28, ANALOG_INPUT4);
|
||||||
impl_saadc_input!(P0_29, ANALOGINPUT5);
|
impl_saadc_input!(P0_29, ANALOG_INPUT5);
|
||||||
impl_saadc_input!(P0_30, ANALOGINPUT6);
|
impl_saadc_input!(P0_30, ANALOG_INPUT6);
|
||||||
impl_saadc_input!(P0_31, ANALOGINPUT7);
|
impl_saadc_input!(P0_31, ANALOG_INPUT7);
|
||||||
|
|
||||||
pub mod irqs {
|
pub mod irqs {
|
||||||
use embassy_cortex_m::interrupt::_export::declare;
|
use embassy_cortex_m::interrupt::_export::declare;
|
||||||
|
@ -212,14 +212,14 @@ impl_ppi_channel!(PPI_CH29, 29 => static);
|
|||||||
impl_ppi_channel!(PPI_CH30, 30 => static);
|
impl_ppi_channel!(PPI_CH30, 30 => static);
|
||||||
impl_ppi_channel!(PPI_CH31, 31 => static);
|
impl_ppi_channel!(PPI_CH31, 31 => static);
|
||||||
|
|
||||||
impl_saadc_input!(P0_02, ANALOGINPUT0);
|
impl_saadc_input!(P0_02, ANALOG_INPUT0);
|
||||||
impl_saadc_input!(P0_03, ANALOGINPUT1);
|
impl_saadc_input!(P0_03, ANALOG_INPUT1);
|
||||||
impl_saadc_input!(P0_04, ANALOGINPUT2);
|
impl_saadc_input!(P0_04, ANALOG_INPUT2);
|
||||||
impl_saadc_input!(P0_05, ANALOGINPUT3);
|
impl_saadc_input!(P0_05, ANALOG_INPUT3);
|
||||||
impl_saadc_input!(P0_28, ANALOGINPUT4);
|
impl_saadc_input!(P0_28, ANALOG_INPUT4);
|
||||||
impl_saadc_input!(P0_29, ANALOGINPUT5);
|
impl_saadc_input!(P0_29, ANALOG_INPUT5);
|
||||||
impl_saadc_input!(P0_30, ANALOGINPUT6);
|
impl_saadc_input!(P0_30, ANALOG_INPUT6);
|
||||||
impl_saadc_input!(P0_31, ANALOGINPUT7);
|
impl_saadc_input!(P0_31, ANALOG_INPUT7);
|
||||||
|
|
||||||
pub mod irqs {
|
pub mod irqs {
|
||||||
use embassy_cortex_m::interrupt::_export::declare;
|
use embassy_cortex_m::interrupt::_export::declare;
|
||||||
|
@ -225,14 +225,14 @@ impl_ppi_channel!(PPI_CH29, 29 => static);
|
|||||||
impl_ppi_channel!(PPI_CH30, 30 => static);
|
impl_ppi_channel!(PPI_CH30, 30 => static);
|
||||||
impl_ppi_channel!(PPI_CH31, 31 => static);
|
impl_ppi_channel!(PPI_CH31, 31 => static);
|
||||||
|
|
||||||
impl_saadc_input!(P0_02, ANALOGINPUT0);
|
impl_saadc_input!(P0_02, ANALOG_INPUT0);
|
||||||
impl_saadc_input!(P0_03, ANALOGINPUT1);
|
impl_saadc_input!(P0_03, ANALOG_INPUT1);
|
||||||
impl_saadc_input!(P0_04, ANALOGINPUT2);
|
impl_saadc_input!(P0_04, ANALOG_INPUT2);
|
||||||
impl_saadc_input!(P0_05, ANALOGINPUT3);
|
impl_saadc_input!(P0_05, ANALOG_INPUT3);
|
||||||
impl_saadc_input!(P0_28, ANALOGINPUT4);
|
impl_saadc_input!(P0_28, ANALOG_INPUT4);
|
||||||
impl_saadc_input!(P0_29, ANALOGINPUT5);
|
impl_saadc_input!(P0_29, ANALOG_INPUT5);
|
||||||
impl_saadc_input!(P0_30, ANALOGINPUT6);
|
impl_saadc_input!(P0_30, ANALOG_INPUT6);
|
||||||
impl_saadc_input!(P0_31, ANALOGINPUT7);
|
impl_saadc_input!(P0_31, ANALOG_INPUT7);
|
||||||
|
|
||||||
pub mod irqs {
|
pub mod irqs {
|
||||||
use embassy_cortex_m::interrupt::_export::declare;
|
use embassy_cortex_m::interrupt::_export::declare;
|
||||||
|
@ -271,14 +271,14 @@ impl_ppi_channel!(PPI_CH29, 29 => static);
|
|||||||
impl_ppi_channel!(PPI_CH30, 30 => static);
|
impl_ppi_channel!(PPI_CH30, 30 => static);
|
||||||
impl_ppi_channel!(PPI_CH31, 31 => static);
|
impl_ppi_channel!(PPI_CH31, 31 => static);
|
||||||
|
|
||||||
impl_saadc_input!(P0_02, ANALOGINPUT0);
|
impl_saadc_input!(P0_02, ANALOG_INPUT0);
|
||||||
impl_saadc_input!(P0_03, ANALOGINPUT1);
|
impl_saadc_input!(P0_03, ANALOG_INPUT1);
|
||||||
impl_saadc_input!(P0_04, ANALOGINPUT2);
|
impl_saadc_input!(P0_04, ANALOG_INPUT2);
|
||||||
impl_saadc_input!(P0_05, ANALOGINPUT3);
|
impl_saadc_input!(P0_05, ANALOG_INPUT3);
|
||||||
impl_saadc_input!(P0_28, ANALOGINPUT4);
|
impl_saadc_input!(P0_28, ANALOG_INPUT4);
|
||||||
impl_saadc_input!(P0_29, ANALOGINPUT5);
|
impl_saadc_input!(P0_29, ANALOG_INPUT5);
|
||||||
impl_saadc_input!(P0_30, ANALOGINPUT6);
|
impl_saadc_input!(P0_30, ANALOG_INPUT6);
|
||||||
impl_saadc_input!(P0_31, ANALOGINPUT7);
|
impl_saadc_input!(P0_31, ANALOG_INPUT7);
|
||||||
|
|
||||||
pub mod irqs {
|
pub mod irqs {
|
||||||
use embassy_cortex_m::interrupt::_export::declare;
|
use embassy_cortex_m::interrupt::_export::declare;
|
||||||
|
@ -276,14 +276,14 @@ impl_ppi_channel!(PPI_CH29, 29 => static);
|
|||||||
impl_ppi_channel!(PPI_CH30, 30 => static);
|
impl_ppi_channel!(PPI_CH30, 30 => static);
|
||||||
impl_ppi_channel!(PPI_CH31, 31 => static);
|
impl_ppi_channel!(PPI_CH31, 31 => static);
|
||||||
|
|
||||||
impl_saadc_input!(P0_02, ANALOGINPUT0);
|
impl_saadc_input!(P0_02, ANALOG_INPUT0);
|
||||||
impl_saadc_input!(P0_03, ANALOGINPUT1);
|
impl_saadc_input!(P0_03, ANALOG_INPUT1);
|
||||||
impl_saadc_input!(P0_04, ANALOGINPUT2);
|
impl_saadc_input!(P0_04, ANALOG_INPUT2);
|
||||||
impl_saadc_input!(P0_05, ANALOGINPUT3);
|
impl_saadc_input!(P0_05, ANALOG_INPUT3);
|
||||||
impl_saadc_input!(P0_28, ANALOGINPUT4);
|
impl_saadc_input!(P0_28, ANALOG_INPUT4);
|
||||||
impl_saadc_input!(P0_29, ANALOGINPUT5);
|
impl_saadc_input!(P0_29, ANALOG_INPUT5);
|
||||||
impl_saadc_input!(P0_30, ANALOGINPUT6);
|
impl_saadc_input!(P0_30, ANALOG_INPUT6);
|
||||||
impl_saadc_input!(P0_31, ANALOGINPUT7);
|
impl_saadc_input!(P0_31, ANALOG_INPUT7);
|
||||||
|
|
||||||
pub mod irqs {
|
pub mod irqs {
|
||||||
use embassy_cortex_m::interrupt::_export::declare;
|
use embassy_cortex_m::interrupt::_export::declare;
|
||||||
|
@ -458,14 +458,14 @@ impl_ppi_channel!(PPI_CH29, 29 => configurable);
|
|||||||
impl_ppi_channel!(PPI_CH30, 30 => configurable);
|
impl_ppi_channel!(PPI_CH30, 30 => configurable);
|
||||||
impl_ppi_channel!(PPI_CH31, 31 => configurable);
|
impl_ppi_channel!(PPI_CH31, 31 => configurable);
|
||||||
|
|
||||||
impl_saadc_input!(P0_13, ANALOGINPUT0);
|
impl_saadc_input!(P0_13, ANALOG_INPUT0);
|
||||||
impl_saadc_input!(P0_14, ANALOGINPUT1);
|
impl_saadc_input!(P0_14, ANALOG_INPUT1);
|
||||||
impl_saadc_input!(P0_15, ANALOGINPUT2);
|
impl_saadc_input!(P0_15, ANALOG_INPUT2);
|
||||||
impl_saadc_input!(P0_16, ANALOGINPUT3);
|
impl_saadc_input!(P0_16, ANALOG_INPUT3);
|
||||||
impl_saadc_input!(P0_17, ANALOGINPUT4);
|
impl_saadc_input!(P0_17, ANALOG_INPUT4);
|
||||||
impl_saadc_input!(P0_18, ANALOGINPUT5);
|
impl_saadc_input!(P0_18, ANALOG_INPUT5);
|
||||||
impl_saadc_input!(P0_19, ANALOGINPUT6);
|
impl_saadc_input!(P0_19, ANALOG_INPUT6);
|
||||||
impl_saadc_input!(P0_20, ANALOGINPUT7);
|
impl_saadc_input!(P0_20, ANALOG_INPUT7);
|
||||||
|
|
||||||
pub mod irqs {
|
pub mod irqs {
|
||||||
use embassy_cortex_m::interrupt::_export::declare;
|
use embassy_cortex_m::interrupt::_export::declare;
|
||||||
|
@ -339,14 +339,14 @@ impl_ppi_channel!(PPI_CH13, 13 => configurable);
|
|||||||
impl_ppi_channel!(PPI_CH14, 14 => configurable);
|
impl_ppi_channel!(PPI_CH14, 14 => configurable);
|
||||||
impl_ppi_channel!(PPI_CH15, 15 => configurable);
|
impl_ppi_channel!(PPI_CH15, 15 => configurable);
|
||||||
|
|
||||||
impl_saadc_input!(P0_13, ANALOGINPUT0);
|
impl_saadc_input!(P0_13, ANALOG_INPUT0);
|
||||||
impl_saadc_input!(P0_14, ANALOGINPUT1);
|
impl_saadc_input!(P0_14, ANALOG_INPUT1);
|
||||||
impl_saadc_input!(P0_15, ANALOGINPUT2);
|
impl_saadc_input!(P0_15, ANALOG_INPUT2);
|
||||||
impl_saadc_input!(P0_16, ANALOGINPUT3);
|
impl_saadc_input!(P0_16, ANALOG_INPUT3);
|
||||||
impl_saadc_input!(P0_17, ANALOGINPUT4);
|
impl_saadc_input!(P0_17, ANALOG_INPUT4);
|
||||||
impl_saadc_input!(P0_18, ANALOGINPUT5);
|
impl_saadc_input!(P0_18, ANALOG_INPUT5);
|
||||||
impl_saadc_input!(P0_19, ANALOGINPUT6);
|
impl_saadc_input!(P0_19, ANALOG_INPUT6);
|
||||||
impl_saadc_input!(P0_20, ANALOGINPUT7);
|
impl_saadc_input!(P0_20, ANALOG_INPUT7);
|
||||||
|
|
||||||
pub mod irqs {
|
pub mod irqs {
|
||||||
use embassy_cortex_m::interrupt::_export::declare;
|
use embassy_cortex_m::interrupt::_export::declare;
|
||||||
|
@ -313,7 +313,7 @@ impl<'d, T: Instance, P: UsbSupply> driver::Bus for Bus<'d, T, P> {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
regs.eventcause.write(|w| w.ready().set_bit()); // Write 1 to clear.
|
regs.eventcause.write(|w| w.ready().clear_bit_by_one());
|
||||||
|
|
||||||
errata::post_enable();
|
errata::post_enable();
|
||||||
|
|
||||||
@ -367,24 +367,24 @@ impl<'d, T: Instance, P: UsbSupply> driver::Bus for Bus<'d, T, P> {
|
|||||||
let r = regs.eventcause.read();
|
let r = regs.eventcause.read();
|
||||||
|
|
||||||
if r.isooutcrc().bit() {
|
if r.isooutcrc().bit() {
|
||||||
regs.eventcause.write(|w| w.isooutcrc().set_bit());
|
regs.eventcause.write(|w| w.isooutcrc().detected());
|
||||||
trace!("USB event: isooutcrc");
|
trace!("USB event: isooutcrc");
|
||||||
}
|
}
|
||||||
if r.usbwuallowed().bit() {
|
if r.usbwuallowed().bit() {
|
||||||
regs.eventcause.write(|w| w.usbwuallowed().set_bit());
|
regs.eventcause.write(|w| w.usbwuallowed().allowed());
|
||||||
trace!("USB event: usbwuallowed");
|
trace!("USB event: usbwuallowed");
|
||||||
}
|
}
|
||||||
if r.suspend().bit() {
|
if r.suspend().bit() {
|
||||||
regs.eventcause.write(|w| w.suspend().set_bit());
|
regs.eventcause.write(|w| w.suspend().detected());
|
||||||
regs.lowpower.write(|w| w.lowpower().low_power());
|
regs.lowpower.write(|w| w.lowpower().low_power());
|
||||||
return Poll::Ready(Event::Suspend);
|
return Poll::Ready(Event::Suspend);
|
||||||
}
|
}
|
||||||
if r.resume().bit() {
|
if r.resume().bit() {
|
||||||
regs.eventcause.write(|w| w.resume().set_bit());
|
regs.eventcause.write(|w| w.resume().detected());
|
||||||
return Poll::Ready(Event::Resume);
|
return Poll::Ready(Event::Resume);
|
||||||
}
|
}
|
||||||
if r.ready().bit() {
|
if r.ready().bit() {
|
||||||
regs.eventcause.write(|w| w.ready().set_bit());
|
regs.eventcause.write(|w| w.ready().ready());
|
||||||
trace!("USB event: ready");
|
trace!("USB event: ready");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -512,7 +512,7 @@ impl<'d, T: Instance, P: UsbSupply> driver::Bus for Bus<'d, T, P> {
|
|||||||
} else if r.resume().bit() {
|
} else if r.resume().bit() {
|
||||||
Poll::Ready(())
|
Poll::Ready(())
|
||||||
} else if r.usbwuallowed().bit() {
|
} else if r.usbwuallowed().bit() {
|
||||||
regs.eventcause.write(|w| w.usbwuallowed().set_bit());
|
regs.eventcause.write(|w| w.usbwuallowed().allowed());
|
||||||
|
|
||||||
regs.dpdmvalue.write(|w| w.state().resume());
|
regs.dpdmvalue.write(|w| w.state().resume());
|
||||||
regs.tasks_dpdmdrive.write(|w| w.tasks_dpdmdrive().set_bit());
|
regs.tasks_dpdmdrive.write(|w| w.tasks_dpdmdrive().set_bit());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user