-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a8d8acb
commit 7005a41
Showing
118 changed files
with
2,793 additions
and
6,313 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ _cluster: | |
R?_PMS_W: {} | ||
R?_PMS_R: {} | ||
M%s: | ||
dimIncrement: 16 | ||
M?_STATUS: | ||
name: STATUS | ||
_strip: M0_ | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#[repr(C)] | ||
#[cfg_attr(feature = "impl-register-debug", derive(Debug))] | ||
#[doc = "Cluster M%s, containing M?_STATUS, M?_STATUS_CLR, M?_EXCEPTION_INFO0, M?_EXCEPTION_INFO1"] | ||
pub struct M { | ||
status: STATUS, | ||
status_clr: STATUS_CLR, | ||
exception_info0: EXCEPTION_INFO0, | ||
exception_info1: EXCEPTION_INFO1, | ||
} | ||
impl M { | ||
#[doc = "0x00 - M0 status register"] | ||
#[inline(always)] | ||
pub const fn status(&self) -> &STATUS { | ||
&self.status | ||
} | ||
#[doc = "0x04 - M0 status clear register"] | ||
#[inline(always)] | ||
pub const fn status_clr(&self) -> &STATUS_CLR { | ||
&self.status_clr | ||
} | ||
#[doc = "0x08 - M0 exception_info0 register"] | ||
#[inline(always)] | ||
pub const fn exception_info0(&self) -> &EXCEPTION_INFO0 { | ||
&self.exception_info0 | ||
} | ||
#[doc = "0x0c - M0 exception_info1 register"] | ||
#[inline(always)] | ||
pub const fn exception_info1(&self) -> &EXCEPTION_INFO1 { | ||
&self.exception_info1 | ||
} | ||
} | ||
#[doc = "STATUS (r) register accessor: M0 status register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`status::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@status`] module"] | ||
pub type STATUS = crate::Reg<status::STATUS_SPEC>; | ||
#[doc = "M0 status register"] | ||
pub mod status; | ||
#[doc = "STATUS_CLR (w) register accessor: M0 status clear register\n\nYou can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`status_clr::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@status_clr`] module"] | ||
pub type STATUS_CLR = crate::Reg<status_clr::STATUS_CLR_SPEC>; | ||
#[doc = "M0 status clear register"] | ||
pub mod status_clr; | ||
#[doc = "EXCEPTION_INFO0 (r) register accessor: M0 exception_info0 register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`exception_info0::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@exception_info0`] module"] | ||
pub type EXCEPTION_INFO0 = crate::Reg<exception_info0::EXCEPTION_INFO0_SPEC>; | ||
#[doc = "M0 exception_info0 register"] | ||
pub mod exception_info0; | ||
#[doc = "EXCEPTION_INFO1 (r) register accessor: M0 exception_info1 register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`exception_info1::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@exception_info1`] module"] | ||
pub type EXCEPTION_INFO1 = crate::Reg<exception_info1::EXCEPTION_INFO1_SPEC>; | ||
#[doc = "M0 exception_info1 register"] | ||
pub mod exception_info1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#[doc = "Register `EXCEPTION_INFO0` reader"] | ||
pub type R = crate::R<EXCEPTION_INFO0_SPEC>; | ||
#[doc = "Field `EXCEPTION_REGION` reader - Exception region"] | ||
pub type EXCEPTION_REGION_R = crate::FieldReader; | ||
#[doc = "Field `EXCEPTION_MODE` reader - Exception mode"] | ||
pub type EXCEPTION_MODE_R = crate::FieldReader; | ||
#[doc = "Field `EXCEPTION_ID` reader - Exception id information"] | ||
pub type EXCEPTION_ID_R = crate::FieldReader; | ||
impl R { | ||
#[doc = "Bits 0:3 - Exception region"] | ||
#[inline(always)] | ||
pub fn exception_region(&self) -> EXCEPTION_REGION_R { | ||
EXCEPTION_REGION_R::new((self.bits & 0x0f) as u8) | ||
} | ||
#[doc = "Bits 16:17 - Exception mode"] | ||
#[inline(always)] | ||
pub fn exception_mode(&self) -> EXCEPTION_MODE_R { | ||
EXCEPTION_MODE_R::new(((self.bits >> 16) & 3) as u8) | ||
} | ||
#[doc = "Bits 18:22 - Exception id information"] | ||
#[inline(always)] | ||
pub fn exception_id(&self) -> EXCEPTION_ID_R { | ||
EXCEPTION_ID_R::new(((self.bits >> 18) & 0x1f) as u8) | ||
} | ||
} | ||
#[cfg(feature = "impl-register-debug")] | ||
impl core::fmt::Debug for R { | ||
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { | ||
f.debug_struct("EXCEPTION_INFO0") | ||
.field( | ||
"exception_region", | ||
&format_args!("{}", self.exception_region().bits()), | ||
) | ||
.field( | ||
"exception_mode", | ||
&format_args!("{}", self.exception_mode().bits()), | ||
) | ||
.field( | ||
"exception_id", | ||
&format_args!("{}", self.exception_id().bits()), | ||
) | ||
.finish() | ||
} | ||
} | ||
#[cfg(feature = "impl-register-debug")] | ||
impl core::fmt::Debug for crate::generic::Reg<EXCEPTION_INFO0_SPEC> { | ||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { | ||
core::fmt::Debug::fmt(&self.read(), f) | ||
} | ||
} | ||
#[doc = "M0 exception_info0 register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`exception_info0::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] | ||
pub struct EXCEPTION_INFO0_SPEC; | ||
impl crate::RegisterSpec for EXCEPTION_INFO0_SPEC { | ||
type Ux = u32; | ||
} | ||
#[doc = "`read()` method returns [`exception_info0::R`](R) reader structure"] | ||
impl crate::Readable for EXCEPTION_INFO0_SPEC {} | ||
#[doc = "`reset()` method sets EXCEPTION_INFO0 to value 0"] | ||
impl crate::Resettable for EXCEPTION_INFO0_SPEC { | ||
const RESET_VALUE: u32 = 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#[doc = "Register `EXCEPTION_INFO1` reader"] | ||
pub type R = crate::R<EXCEPTION_INFO1_SPEC>; | ||
#[doc = "Field `EXCEPTION_ADDR` reader - Exception addr"] | ||
pub type EXCEPTION_ADDR_R = crate::FieldReader<u32>; | ||
impl R { | ||
#[doc = "Bits 0:31 - Exception addr"] | ||
#[inline(always)] | ||
pub fn exception_addr(&self) -> EXCEPTION_ADDR_R { | ||
EXCEPTION_ADDR_R::new(self.bits) | ||
} | ||
} | ||
#[cfg(feature = "impl-register-debug")] | ||
impl core::fmt::Debug for R { | ||
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { | ||
f.debug_struct("EXCEPTION_INFO1") | ||
.field( | ||
"exception_addr", | ||
&format_args!("{}", self.exception_addr().bits()), | ||
) | ||
.finish() | ||
} | ||
} | ||
#[cfg(feature = "impl-register-debug")] | ||
impl core::fmt::Debug for crate::generic::Reg<EXCEPTION_INFO1_SPEC> { | ||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { | ||
core::fmt::Debug::fmt(&self.read(), f) | ||
} | ||
} | ||
#[doc = "M0 exception_info1 register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`exception_info1::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] | ||
pub struct EXCEPTION_INFO1_SPEC; | ||
impl crate::RegisterSpec for EXCEPTION_INFO1_SPEC { | ||
type Ux = u32; | ||
} | ||
#[doc = "`read()` method returns [`exception_info1::R`](R) reader structure"] | ||
impl crate::Readable for EXCEPTION_INFO1_SPEC {} | ||
#[doc = "`reset()` method sets EXCEPTION_INFO1 to value 0"] | ||
impl crate::Resettable for EXCEPTION_INFO1_SPEC { | ||
const RESET_VALUE: u32 = 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#[doc = "Register `STATUS` reader"] | ||
pub type R = crate::R<STATUS_SPEC>; | ||
#[doc = "Field `EXCEPTION_STATUS` reader - Exception status"] | ||
pub type EXCEPTION_STATUS_R = crate::FieldReader; | ||
impl R { | ||
#[doc = "Bits 0:1 - Exception status"] | ||
#[inline(always)] | ||
pub fn exception_status(&self) -> EXCEPTION_STATUS_R { | ||
EXCEPTION_STATUS_R::new((self.bits & 3) as u8) | ||
} | ||
} | ||
#[cfg(feature = "impl-register-debug")] | ||
impl core::fmt::Debug for R { | ||
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { | ||
f.debug_struct("STATUS") | ||
.field( | ||
"exception_status", | ||
&format_args!("{}", self.exception_status().bits()), | ||
) | ||
.finish() | ||
} | ||
} | ||
#[cfg(feature = "impl-register-debug")] | ||
impl core::fmt::Debug for crate::generic::Reg<STATUS_SPEC> { | ||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { | ||
core::fmt::Debug::fmt(&self.read(), f) | ||
} | ||
} | ||
#[doc = "M0 status register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`status::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] | ||
pub struct STATUS_SPEC; | ||
impl crate::RegisterSpec for STATUS_SPEC { | ||
type Ux = u32; | ||
} | ||
#[doc = "`read()` method returns [`status::R`](R) reader structure"] | ||
impl crate::Readable for STATUS_SPEC {} | ||
#[doc = "`reset()` method sets STATUS to value 0"] | ||
impl crate::Resettable for STATUS_SPEC { | ||
const RESET_VALUE: u32 = 0; | ||
} |
Oops, something went wrong.