Skip to content

Commit

Permalink
Merge #13
Browse files Browse the repository at this point in the history
13: Update to svd2rust 0.25.1 r=jonas-schievink a=jonas-schievink



Co-authored-by: Jonas Schievink <[email protected]>
  • Loading branch information
bors[bot] and Jonas Schievink authored Sep 28, 2022
2 parents 204dfb8 + cabef47 commit f0fb908
Show file tree
Hide file tree
Showing 7,868 changed files with 207,542 additions and 784,561 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@

- Regenerate all PACs with svd2rust 0.19.0
- Consolidate all nRF PACs in a common repo, [`nrf-rs/nrf-pacs`](https://github.com/nrf-rs/nrf-pacs).

[0.10.0]: https://github.com/nrf-rs/nrf-pacs/releases/tag/v0.10.0
[0.10.1]: https://github.com/nrf-rs/nrf-pacs/releases/tag/v0.10.1
[0.11.0]: https://github.com/nrf-rs/nrf-pacs/releases/tag/v0.11.0
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ vcell = "0.1.3"
cortex-m-rt = ">=0.6.15,<0.8"

# meta-dependencies (upgrade as needed, they apply to all PACs):
# @svd2rust = 0.21.0
# @form = 0.8.0
# @svd2rust = 0.25.1
# @form = 0.10.0
56 changes: 28 additions & 28 deletions pacs/nrf51-pac/src/aar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,94 +2,94 @@
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00 - Start resolving addresses based on IRKs specified in the IRK data structure."]
pub tasks_start: crate::Reg<tasks_start::TASKS_START_SPEC>,
pub tasks_start: TASKS_START,
_reserved1: [u8; 0x04],
#[doc = "0x08 - Stop resolving addresses."]
pub tasks_stop: crate::Reg<tasks_stop::TASKS_STOP_SPEC>,
pub tasks_stop: TASKS_STOP,
_reserved2: [u8; 0xf4],
#[doc = "0x100 - Address resolution procedure completed."]
pub events_end: crate::Reg<events_end::EVENTS_END_SPEC>,
pub events_end: EVENTS_END,
#[doc = "0x104 - Address resolved."]
pub events_resolved: crate::Reg<events_resolved::EVENTS_RESOLVED_SPEC>,
pub events_resolved: EVENTS_RESOLVED,
#[doc = "0x108 - Address not resolved."]
pub events_notresolved: crate::Reg<events_notresolved::EVENTS_NOTRESOLVED_SPEC>,
pub events_notresolved: EVENTS_NOTRESOLVED,
_reserved5: [u8; 0x01f8],
#[doc = "0x304 - Interrupt enable set register."]
pub intenset: crate::Reg<intenset::INTENSET_SPEC>,
pub intenset: INTENSET,
#[doc = "0x308 - Interrupt enable clear register."]
pub intenclr: crate::Reg<intenclr::INTENCLR_SPEC>,
pub intenclr: INTENCLR,
_reserved7: [u8; 0xf4],
#[doc = "0x400 - Resolution status."]
pub status: crate::Reg<status::STATUS_SPEC>,
pub status: STATUS,
_reserved8: [u8; 0xfc],
#[doc = "0x500 - Enable AAR."]
pub enable: crate::Reg<enable::ENABLE_SPEC>,
pub enable: ENABLE,
#[doc = "0x504 - Number of Identity root Keys in the IRK data structure."]
pub nirk: crate::Reg<nirk::NIRK_SPEC>,
pub nirk: NIRK,
#[doc = "0x508 - Pointer to the IRK data structure."]
pub irkptr: crate::Reg<irkptr::IRKPTR_SPEC>,
pub irkptr: IRKPTR,
_reserved11: [u8; 0x04],
#[doc = "0x510 - Pointer to the resolvable address (6 bytes)."]
pub addrptr: crate::Reg<addrptr::ADDRPTR_SPEC>,
pub addrptr: ADDRPTR,
#[doc = "0x514 - Pointer to a scratch data area used for temporary storage during resolution. A minimum of 3 bytes must be reserved."]
pub scratchptr: crate::Reg<scratchptr::SCRATCHPTR_SPEC>,
pub scratchptr: SCRATCHPTR,
_reserved13: [u8; 0x0ae4],
#[doc = "0xffc - Peripheral power control."]
pub power: crate::Reg<power::POWER_SPEC>,
pub power: POWER,
}
#[doc = "TASKS_START register accessor: an alias for `Reg<TASKS_START_SPEC>`"]
#[doc = "TASKS_START (w) register accessor: an alias for `Reg<TASKS_START_SPEC>`"]
pub type TASKS_START = crate::Reg<tasks_start::TASKS_START_SPEC>;
#[doc = "Start resolving addresses based on IRKs specified in the IRK data structure."]
pub mod tasks_start;
#[doc = "TASKS_STOP register accessor: an alias for `Reg<TASKS_STOP_SPEC>`"]
#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg<TASKS_STOP_SPEC>`"]
pub type TASKS_STOP = crate::Reg<tasks_stop::TASKS_STOP_SPEC>;
#[doc = "Stop resolving addresses."]
pub mod tasks_stop;
#[doc = "EVENTS_END register accessor: an alias for `Reg<EVENTS_END_SPEC>`"]
#[doc = "EVENTS_END (rw) register accessor: an alias for `Reg<EVENTS_END_SPEC>`"]
pub type EVENTS_END = crate::Reg<events_end::EVENTS_END_SPEC>;
#[doc = "Address resolution procedure completed."]
pub mod events_end;
#[doc = "EVENTS_RESOLVED register accessor: an alias for `Reg<EVENTS_RESOLVED_SPEC>`"]
#[doc = "EVENTS_RESOLVED (rw) register accessor: an alias for `Reg<EVENTS_RESOLVED_SPEC>`"]
pub type EVENTS_RESOLVED = crate::Reg<events_resolved::EVENTS_RESOLVED_SPEC>;
#[doc = "Address resolved."]
pub mod events_resolved;
#[doc = "EVENTS_NOTRESOLVED register accessor: an alias for `Reg<EVENTS_NOTRESOLVED_SPEC>`"]
#[doc = "EVENTS_NOTRESOLVED (rw) register accessor: an alias for `Reg<EVENTS_NOTRESOLVED_SPEC>`"]
pub type EVENTS_NOTRESOLVED = crate::Reg<events_notresolved::EVENTS_NOTRESOLVED_SPEC>;
#[doc = "Address not resolved."]
pub mod events_notresolved;
#[doc = "INTENSET register accessor: an alias for `Reg<INTENSET_SPEC>`"]
#[doc = "INTENSET (rw) register accessor: an alias for `Reg<INTENSET_SPEC>`"]
pub type INTENSET = crate::Reg<intenset::INTENSET_SPEC>;
#[doc = "Interrupt enable set register."]
pub mod intenset;
#[doc = "INTENCLR register accessor: an alias for `Reg<INTENCLR_SPEC>`"]
#[doc = "INTENCLR (rw) register accessor: an alias for `Reg<INTENCLR_SPEC>`"]
pub type INTENCLR = crate::Reg<intenclr::INTENCLR_SPEC>;
#[doc = "Interrupt enable clear register."]
pub mod intenclr;
#[doc = "STATUS register accessor: an alias for `Reg<STATUS_SPEC>`"]
#[doc = "STATUS (r) register accessor: an alias for `Reg<STATUS_SPEC>`"]
pub type STATUS = crate::Reg<status::STATUS_SPEC>;
#[doc = "Resolution status."]
pub mod status;
#[doc = "ENABLE register accessor: an alias for `Reg<ENABLE_SPEC>`"]
#[doc = "ENABLE (rw) register accessor: an alias for `Reg<ENABLE_SPEC>`"]
pub type ENABLE = crate::Reg<enable::ENABLE_SPEC>;
#[doc = "Enable AAR."]
pub mod enable;
#[doc = "NIRK register accessor: an alias for `Reg<NIRK_SPEC>`"]
#[doc = "NIRK (rw) register accessor: an alias for `Reg<NIRK_SPEC>`"]
pub type NIRK = crate::Reg<nirk::NIRK_SPEC>;
#[doc = "Number of Identity root Keys in the IRK data structure."]
pub mod nirk;
#[doc = "IRKPTR register accessor: an alias for `Reg<IRKPTR_SPEC>`"]
#[doc = "IRKPTR (rw) register accessor: an alias for `Reg<IRKPTR_SPEC>`"]
pub type IRKPTR = crate::Reg<irkptr::IRKPTR_SPEC>;
#[doc = "Pointer to the IRK data structure."]
pub mod irkptr;
#[doc = "ADDRPTR register accessor: an alias for `Reg<ADDRPTR_SPEC>`"]
#[doc = "ADDRPTR (rw) register accessor: an alias for `Reg<ADDRPTR_SPEC>`"]
pub type ADDRPTR = crate::Reg<addrptr::ADDRPTR_SPEC>;
#[doc = "Pointer to the resolvable address (6 bytes)."]
pub mod addrptr;
#[doc = "SCRATCHPTR register accessor: an alias for `Reg<SCRATCHPTR_SPEC>`"]
#[doc = "SCRATCHPTR (rw) register accessor: an alias for `Reg<SCRATCHPTR_SPEC>`"]
pub type SCRATCHPTR = crate::Reg<scratchptr::SCRATCHPTR_SPEC>;
#[doc = "Pointer to a scratch data area used for temporary storage during resolution. A minimum of 3 bytes must be reserved."]
pub mod scratchptr;
#[doc = "POWER register accessor: an alias for `Reg<POWER_SPEC>`"]
#[doc = "POWER (rw) register accessor: an alias for `Reg<POWER_SPEC>`"]
pub type POWER = crate::Reg<power::POWER_SPEC>;
#[doc = "Peripheral power control."]
pub mod power;
44 changes: 10 additions & 34 deletions pacs/nrf51-pac/src/aar/enable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ impl From<crate::W<ENABLE_SPEC>> for W {
W(writer)
}
}
#[doc = "Field `ENABLE` reader - Enable AAR."]
pub type ENABLE_R = crate::FieldReader<u8, ENABLE_A>;
#[doc = "Enable AAR.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
Expand All @@ -49,14 +51,8 @@ impl From<ENABLE_A> for u8 {
variant as _
}
}
#[doc = "Field `ENABLE` reader - Enable AAR."]
pub struct ENABLE_R(crate::FieldReader<u8, ENABLE_A>);
impl ENABLE_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
ENABLE_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<ENABLE_A> {
match self.bits {
Expand All @@ -68,31 +64,17 @@ impl ENABLE_R {
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
**self == ENABLE_A::DISABLED
*self == ENABLE_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
**self == ENABLE_A::ENABLED
}
}
impl core::ops::Deref for ENABLE_R {
type Target = crate::FieldReader<u8, ENABLE_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
*self == ENABLE_A::ENABLED
}
}
#[doc = "Field `ENABLE` writer - Enable AAR."]
pub struct ENABLE_W<'a> {
w: &'a mut W,
}
impl<'a> ENABLE_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ENABLE_A) -> &'a mut W {
unsafe { self.bits(variant.into()) }
}
pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 2, O>;
impl<'a, const O: u8> ENABLE_W<'a, O> {
#[doc = "Disabled AAR."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
Expand All @@ -103,25 +85,19 @@ impl<'a> ENABLE_W<'a> {
pub fn enabled(self) -> &'a mut W {
self.variant(ENABLE_A::ENABLED)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03);
self.w
}
}
impl R {
#[doc = "Bits 0:1 - Enable AAR."]
#[inline(always)]
pub fn enable(&self) -> ENABLE_R {
ENABLE_R::new((self.bits & 0x03) as u8)
ENABLE_R::new((self.bits & 3) as u8)
}
}
impl W {
#[doc = "Bits 0:1 - Enable AAR."]
#[inline(always)]
pub fn enable(&mut self) -> ENABLE_W {
ENABLE_W { w: self }
pub fn enable(&mut self) -> ENABLE_W<0> {
ENABLE_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
Expand Down
Loading

0 comments on commit f0fb908

Please sign in to comment.