feat: add display UI with splash screen, dashboard, and RSSI sparkline

Implement full SSD1306 OLED display support:
- Splash screen on boot (1.5s) with project name, version, board
- Dashboard showing radio state, config, counters, RSSI/SNR
- RSSI history sparkline (64-sample ring buffer, 2px-wide bars)
- DisplayOn/DisplayOff host commands routed via dedicated channel
- Pure render functions against generic DrawTarget (no hardware coupling)
- Display on/off control bypasses radio task entirely

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Opus 4.6 committed 2026-03-29 20:42:54 -06:00
1 parent 7064110293
commit 3102fc747a
17624 files changed
+4564928 -38

No files matched your search

+72
View File
@@ -0,0 +1,72 @@
#[doc = "Register `CIDR0` reader"]
pub struct R(crate::R<CIDR0_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CIDR0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CIDR0_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CIDR0_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `PRMBL_0` reader - Preamble\\[0\\]. Contains bits\\[7:0\\]
of the component identification code."]
pub type PRMBL_0_R = crate::FieldReader<u8, PRMBL_0_A>;
#[doc = "Preamble\\[0\\]. Contains bits\\[7:0\\]
of the component identification code.\n\nValue on reset: 13"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum PRMBL_0_A {
#[doc = "13: Bits\\[7:0\\]
of the identification code."]
VALUE = 13,
}
impl From<PRMBL_0_A> for u8 {
#[inline(always)]
fn from(variant: PRMBL_0_A) -> Self {
variant as _
}
}
impl PRMBL_0_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<PRMBL_0_A> {
match self.bits {
13 => Some(PRMBL_0_A::VALUE),
_ => None,
}
}
#[doc = "Checks if the value of the field is `VALUE`"]
#[inline(always)]
pub fn is_value(&self) -> bool {
*self == PRMBL_0_A::VALUE
}
}
impl R {
#[doc = "Bits 0:7 - Preamble\\[0\\]. Contains bits\\[7:0\\]
of the component identification code."]
#[inline(always)]
pub fn prmbl_0(&self) -> PRMBL_0_R {
PRMBL_0_R::new((self.bits & 0xff) as u8)
}
}
#[doc = "Component ID0 Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cidr0](index.html) module"]
pub struct CIDR0_SPEC;
impl crate::RegisterSpec for CIDR0_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cidr0::R](R) reader structure"]
impl crate::Readable for CIDR0_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets CIDR0 to value 0x0d"]
impl crate::Resettable for CIDR0_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x0d
}
}
+110
View File
@@ -0,0 +1,110 @@
#[doc = "Register `CIDR1` reader"]
pub struct R(crate::R<CIDR1_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CIDR1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CIDR1_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CIDR1_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `PRMBL_1` reader - Preamble\\[1\\]. Contains bits\\[11:8\\]
of the component identification code."]
pub type PRMBL_1_R = crate::FieldReader<u8, PRMBL_1_A>;
#[doc = "Preamble\\[1\\]. Contains bits\\[11:8\\]
of the component identification code.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum PRMBL_1_A {
#[doc = "0: Bits\\[11:8\\]
of the identification code."]
VALUE = 0,
}
impl From<PRMBL_1_A> for u8 {
#[inline(always)]
fn from(variant: PRMBL_1_A) -> Self {
variant as _
}
}
impl PRMBL_1_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<PRMBL_1_A> {
match self.bits {
0 => Some(PRMBL_1_A::VALUE),
_ => None,
}
}
#[doc = "Checks if the value of the field is `VALUE`"]
#[inline(always)]
pub fn is_value(&self) -> bool {
*self == PRMBL_1_A::VALUE
}
}
#[doc = "Field `CLASS` reader - Class of the component, for example, whether the component is a ROM table or a generic CoreSight component. Contains bits\\[15:12\\]
of the component identification code"]
pub type CLASS_R = crate::FieldReader<u8, CLASS_A>;
#[doc = "Class of the component, for example, whether the component is a ROM table or a generic CoreSight component. Contains bits\\[15:12\\]
of the component identification code\n\nValue on reset: 9"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum CLASS_A {
#[doc = "9: Indicates that the component is a CoreSight component."]
CORESIGHT = 9,
}
impl From<CLASS_A> for u8 {
#[inline(always)]
fn from(variant: CLASS_A) -> Self {
variant as _
}
}
impl CLASS_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<CLASS_A> {
match self.bits {
9 => Some(CLASS_A::CORESIGHT),
_ => None,
}
}
#[doc = "Checks if the value of the field is `CORESIGHT`"]
#[inline(always)]
pub fn is_coresight(&self) -> bool {
*self == CLASS_A::CORESIGHT
}
}
impl R {
#[doc = "Bits 0:3 - Preamble\\[1\\]. Contains bits\\[11:8\\]
of the component identification code."]
#[inline(always)]
pub fn prmbl_1(&self) -> PRMBL_1_R {
PRMBL_1_R::new((self.bits & 0x0f) as u8)
}
#[doc = "Bits 4:7 - Class of the component, for example, whether the component is a ROM table or a generic CoreSight component. Contains bits\\[15:12\\]
of the component identification code"]
#[inline(always)]
pub fn class(&self) -> CLASS_R {
CLASS_R::new(((self.bits >> 4) & 0x0f) as u8)
}
}
#[doc = "Component ID1 Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cidr1](index.html) module"]
pub struct CIDR1_SPEC;
impl crate::RegisterSpec for CIDR1_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cidr1::R](R) reader structure"]
impl crate::Readable for CIDR1_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets CIDR1 to value 0x90"]
impl crate::Resettable for CIDR1_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x90
}
}
+72
View File
@@ -0,0 +1,72 @@
#[doc = "Register `CIDR2` reader"]
pub struct R(crate::R<CIDR2_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CIDR2_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CIDR2_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CIDR2_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `PRMBL_2` reader - Preamble\\[2\\]. Contains bits\\[23:16\\]
of the component identification code."]
pub type PRMBL_2_R = crate::FieldReader<u8, PRMBL_2_A>;
#[doc = "Preamble\\[2\\]. Contains bits\\[23:16\\]
of the component identification code.\n\nValue on reset: 5"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum PRMBL_2_A {
#[doc = "5: Bits\\[23:16\\]
of the identification code."]
VALUE = 5,
}
impl From<PRMBL_2_A> for u8 {
#[inline(always)]
fn from(variant: PRMBL_2_A) -> Self {
variant as _
}
}
impl PRMBL_2_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<PRMBL_2_A> {
match self.bits {
5 => Some(PRMBL_2_A::VALUE),
_ => None,
}
}
#[doc = "Checks if the value of the field is `VALUE`"]
#[inline(always)]
pub fn is_value(&self) -> bool {
*self == PRMBL_2_A::VALUE
}
}
impl R {
#[doc = "Bits 0:7 - Preamble\\[2\\]. Contains bits\\[23:16\\]
of the component identification code."]
#[inline(always)]
pub fn prmbl_2(&self) -> PRMBL_2_R {
PRMBL_2_R::new((self.bits & 0xff) as u8)
}
}
#[doc = "Component ID2 Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cidr2](index.html) module"]
pub struct CIDR2_SPEC;
impl crate::RegisterSpec for CIDR2_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cidr2::R](R) reader structure"]
impl crate::Readable for CIDR2_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets CIDR2 to value 0x05"]
impl crate::Resettable for CIDR2_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x05
}
}
+72
View File
@@ -0,0 +1,72 @@
#[doc = "Register `CIDR3` reader"]
pub struct R(crate::R<CIDR3_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CIDR3_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CIDR3_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CIDR3_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `PRMBL_3` reader - Preamble\\[3\\]. Contains bits\\[31:24\\]
of the component identification code."]
pub type PRMBL_3_R = crate::FieldReader<u8, PRMBL_3_A>;
#[doc = "Preamble\\[3\\]. Contains bits\\[31:24\\]
of the component identification code.\n\nValue on reset: 177"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum PRMBL_3_A {
#[doc = "177: Bits\\[31:24\\]
of the identification code."]
VALUE = 177,
}
impl From<PRMBL_3_A> for u8 {
#[inline(always)]
fn from(variant: PRMBL_3_A) -> Self {
variant as _
}
}
impl PRMBL_3_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<PRMBL_3_A> {
match self.bits {
177 => Some(PRMBL_3_A::VALUE),
_ => None,
}
}
#[doc = "Checks if the value of the field is `VALUE`"]
#[inline(always)]
pub fn is_value(&self) -> bool {
*self == PRMBL_3_A::VALUE
}
}
impl R {
#[doc = "Bits 0:7 - Preamble\\[3\\]. Contains bits\\[31:24\\]
of the component identification code."]
#[inline(always)]
pub fn prmbl_3(&self) -> PRMBL_3_R {
PRMBL_3_R::new((self.bits & 0xff) as u8)
}
}
#[doc = "Component ID3 Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cidr3](index.html) module"]
pub struct CIDR3_SPEC;
impl crate::RegisterSpec for CIDR3_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cidr3::R](R) reader structure"]
impl crate::Readable for CIDR3_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets CIDR3 to value 0xb1"]
impl crate::Resettable for CIDR3_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xb1
}
}
+153
View File
@@ -0,0 +1,153 @@
#[doc = "Register `CTIAPPCLEAR` writer"]
pub struct W(crate::W<CTIAPPCLEAR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CTIAPPCLEAR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CTIAPPCLEAR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CTIAPPCLEAR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Sets the corresponding bits in the CTIAPPSET to 0. There is one bit of the register for each channel.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum APPCLEAR_0_AW {
#[doc = "1: Clears the event for channel 0."]
CLEAR = 1,
}
impl From<APPCLEAR_0_AW> for bool {
#[inline(always)]
fn from(variant: APPCLEAR_0_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `APPCLEAR_0` writer - Sets the corresponding bits in the CTIAPPSET to 0. There is one bit of the register for each channel."]
pub type APPCLEAR_0_W<'a, const O: u8> =
crate::BitWriter<'a, u32, CTIAPPCLEAR_SPEC, APPCLEAR_0_AW, O>;
impl<'a, const O: u8> APPCLEAR_0_W<'a, O> {
#[doc = "Clears the event for channel 0."]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(APPCLEAR_0_AW::CLEAR)
}
}
#[doc = "Sets the corresponding bits in the CTIAPPSET to 0. There is one bit of the register for each channel.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum APPCLEAR_1_AW {
#[doc = "1: Clears the event for channel 1."]
CLEAR = 1,
}
impl From<APPCLEAR_1_AW> for bool {
#[inline(always)]
fn from(variant: APPCLEAR_1_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `APPCLEAR_1` writer - Sets the corresponding bits in the CTIAPPSET to 0. There is one bit of the register for each channel."]
pub type APPCLEAR_1_W<'a, const O: u8> =
crate::BitWriter<'a, u32, CTIAPPCLEAR_SPEC, APPCLEAR_1_AW, O>;
impl<'a, const O: u8> APPCLEAR_1_W<'a, O> {
#[doc = "Clears the event for channel 1."]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(APPCLEAR_1_AW::CLEAR)
}
}
#[doc = "Sets the corresponding bits in the CTIAPPSET to 0. There is one bit of the register for each channel.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum APPCLEAR_2_AW {
#[doc = "1: Clears the event for channel 2."]
CLEAR = 1,
}
impl From<APPCLEAR_2_AW> for bool {
#[inline(always)]
fn from(variant: APPCLEAR_2_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `APPCLEAR_2` writer - Sets the corresponding bits in the CTIAPPSET to 0. There is one bit of the register for each channel."]
pub type APPCLEAR_2_W<'a, const O: u8> =
crate::BitWriter<'a, u32, CTIAPPCLEAR_SPEC, APPCLEAR_2_AW, O>;
impl<'a, const O: u8> APPCLEAR_2_W<'a, O> {
#[doc = "Clears the event for channel 2."]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(APPCLEAR_2_AW::CLEAR)
}
}
#[doc = "Sets the corresponding bits in the CTIAPPSET to 0. There is one bit of the register for each channel.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum APPCLEAR_3_AW {
#[doc = "1: Clears the event for channel 3."]
CLEAR = 1,
}
impl From<APPCLEAR_3_AW> for bool {
#[inline(always)]
fn from(variant: APPCLEAR_3_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `APPCLEAR_3` writer - Sets the corresponding bits in the CTIAPPSET to 0. There is one bit of the register for each channel."]
pub type APPCLEAR_3_W<'a, const O: u8> =
crate::BitWriter<'a, u32, CTIAPPCLEAR_SPEC, APPCLEAR_3_AW, O>;
impl<'a, const O: u8> APPCLEAR_3_W<'a, O> {
#[doc = "Clears the event for channel 3."]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(APPCLEAR_3_AW::CLEAR)
}
}
impl W {
#[doc = "Bit 0 - Sets the corresponding bits in the CTIAPPSET to 0. There is one bit of the register for each channel."]
#[inline(always)]
pub fn appclear_0(&mut self) -> APPCLEAR_0_W<0> {
APPCLEAR_0_W::new(self)
}
#[doc = "Bit 1 - Sets the corresponding bits in the CTIAPPSET to 0. There is one bit of the register for each channel."]
#[inline(always)]
pub fn appclear_1(&mut self) -> APPCLEAR_1_W<1> {
APPCLEAR_1_W::new(self)
}
#[doc = "Bit 2 - Sets the corresponding bits in the CTIAPPSET to 0. There is one bit of the register for each channel."]
#[inline(always)]
pub fn appclear_2(&mut self) -> APPCLEAR_2_W<2> {
APPCLEAR_2_W::new(self)
}
#[doc = "Bit 3 - Sets the corresponding bits in the CTIAPPSET to 0. There is one bit of the register for each channel."]
#[inline(always)]
pub fn appclear_3(&mut self) -> APPCLEAR_3_W<3> {
APPCLEAR_3_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CTI Application Trigger Clear register\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ctiappclear](index.html) module"]
pub struct CTIAPPCLEAR_SPEC;
impl crate::RegisterSpec for CTIAPPCLEAR_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [ctiappclear::W](W) writer structure"]
impl crate::Writable for CTIAPPCLEAR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CTIAPPCLEAR to value 0"]
impl crate::Resettable for CTIAPPCLEAR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+153
View File
@@ -0,0 +1,153 @@
#[doc = "Register `CTIAPPPULSE` writer"]
pub struct W(crate::W<CTIAPPPULSE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CTIAPPPULSE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CTIAPPPULSE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CTIAPPPULSE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Setting a bit HIGH generates a channel event pulse for the selected channel. There is one bit of the register for each channel.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum APPULSE_0_AW {
#[doc = "1: Generates an event pulse on channel 0."]
GENERATE = 1,
}
impl From<APPULSE_0_AW> for bool {
#[inline(always)]
fn from(variant: APPULSE_0_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `APPULSE_0` writer - Setting a bit HIGH generates a channel event pulse for the selected channel. There is one bit of the register for each channel."]
pub type APPULSE_0_W<'a, const O: u8> =
crate::BitWriter<'a, u32, CTIAPPPULSE_SPEC, APPULSE_0_AW, O>;
impl<'a, const O: u8> APPULSE_0_W<'a, O> {
#[doc = "Generates an event pulse on channel 0."]
#[inline(always)]
pub fn generate(self) -> &'a mut W {
self.variant(APPULSE_0_AW::GENERATE)
}
}
#[doc = "Setting a bit HIGH generates a channel event pulse for the selected channel. There is one bit of the register for each channel.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum APPULSE_1_AW {
#[doc = "1: Generates an event pulse on channel 1."]
GENERATE = 1,
}
impl From<APPULSE_1_AW> for bool {
#[inline(always)]
fn from(variant: APPULSE_1_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `APPULSE_1` writer - Setting a bit HIGH generates a channel event pulse for the selected channel. There is one bit of the register for each channel."]
pub type APPULSE_1_W<'a, const O: u8> =
crate::BitWriter<'a, u32, CTIAPPPULSE_SPEC, APPULSE_1_AW, O>;
impl<'a, const O: u8> APPULSE_1_W<'a, O> {
#[doc = "Generates an event pulse on channel 1."]
#[inline(always)]
pub fn generate(self) -> &'a mut W {
self.variant(APPULSE_1_AW::GENERATE)
}
}
#[doc = "Setting a bit HIGH generates a channel event pulse for the selected channel. There is one bit of the register for each channel.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum APPULSE_2_AW {
#[doc = "1: Generates an event pulse on channel 2."]
GENERATE = 1,
}
impl From<APPULSE_2_AW> for bool {
#[inline(always)]
fn from(variant: APPULSE_2_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `APPULSE_2` writer - Setting a bit HIGH generates a channel event pulse for the selected channel. There is one bit of the register for each channel."]
pub type APPULSE_2_W<'a, const O: u8> =
crate::BitWriter<'a, u32, CTIAPPPULSE_SPEC, APPULSE_2_AW, O>;
impl<'a, const O: u8> APPULSE_2_W<'a, O> {
#[doc = "Generates an event pulse on channel 2."]
#[inline(always)]
pub fn generate(self) -> &'a mut W {
self.variant(APPULSE_2_AW::GENERATE)
}
}
#[doc = "Setting a bit HIGH generates a channel event pulse for the selected channel. There is one bit of the register for each channel.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum APPULSE_3_AW {
#[doc = "1: Generates an event pulse on channel 3."]
GENERATE = 1,
}
impl From<APPULSE_3_AW> for bool {
#[inline(always)]
fn from(variant: APPULSE_3_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `APPULSE_3` writer - Setting a bit HIGH generates a channel event pulse for the selected channel. There is one bit of the register for each channel."]
pub type APPULSE_3_W<'a, const O: u8> =
crate::BitWriter<'a, u32, CTIAPPPULSE_SPEC, APPULSE_3_AW, O>;
impl<'a, const O: u8> APPULSE_3_W<'a, O> {
#[doc = "Generates an event pulse on channel 3."]
#[inline(always)]
pub fn generate(self) -> &'a mut W {
self.variant(APPULSE_3_AW::GENERATE)
}
}
impl W {
#[doc = "Bit 0 - Setting a bit HIGH generates a channel event pulse for the selected channel. There is one bit of the register for each channel."]
#[inline(always)]
pub fn appulse_0(&mut self) -> APPULSE_0_W<0> {
APPULSE_0_W::new(self)
}
#[doc = "Bit 1 - Setting a bit HIGH generates a channel event pulse for the selected channel. There is one bit of the register for each channel."]
#[inline(always)]
pub fn appulse_1(&mut self) -> APPULSE_1_W<1> {
APPULSE_1_W::new(self)
}
#[doc = "Bit 2 - Setting a bit HIGH generates a channel event pulse for the selected channel. There is one bit of the register for each channel."]
#[inline(always)]
pub fn appulse_2(&mut self) -> APPULSE_2_W<2> {
APPULSE_2_W::new(self)
}
#[doc = "Bit 3 - Setting a bit HIGH generates a channel event pulse for the selected channel. There is one bit of the register for each channel."]
#[inline(always)]
pub fn appulse_3(&mut self) -> APPULSE_3_W<3> {
APPULSE_3_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CTI Application Pulse register\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ctiapppulse](index.html) module"]
pub struct CTIAPPPULSE_SPEC;
impl crate::RegisterSpec for CTIAPPPULSE_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [ctiapppulse::W](W) writer structure"]
impl crate::Writable for CTIAPPPULSE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CTIAPPPULSE to value 0"]
impl crate::Resettable for CTIAPPPULSE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+334
View File
@@ -0,0 +1,334 @@
#[doc = "Register `CTIAPPSET` reader"]
pub struct R(crate::R<CTIAPPSET_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CTIAPPSET_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CTIAPPSET_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CTIAPPSET_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CTIAPPSET` writer"]
pub struct W(crate::W<CTIAPPSET_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CTIAPPSET_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CTIAPPSET_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CTIAPPSET_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `APPSET_0` reader - Application trigger event for channel 0."]
pub type APPSET_0_R = crate::BitReader<APPSET_0_A>;
#[doc = "Application trigger event for channel 0.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum APPSET_0_A {
#[doc = "0: Application trigger 0 is inactive."]
INACTIVE = 0,
#[doc = "1: Application trigger 0 is active."]
ACTIVE = 1,
}
impl From<APPSET_0_A> for bool {
#[inline(always)]
fn from(variant: APPSET_0_A) -> Self {
variant as u8 != 0
}
}
impl APPSET_0_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> APPSET_0_A {
match self.bits {
false => APPSET_0_A::INACTIVE,
true => APPSET_0_A::ACTIVE,
}
}
#[doc = "Checks if the value of the field is `INACTIVE`"]
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == APPSET_0_A::INACTIVE
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == APPSET_0_A::ACTIVE
}
}
#[doc = "Application trigger event for channel 0.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum APPSET_0_AW {
#[doc = "1: Generate channel event for channel 0."]
ACTIVATE = 1,
}
impl From<APPSET_0_AW> for bool {
#[inline(always)]
fn from(variant: APPSET_0_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `APPSET_0` writer - Application trigger event for channel 0."]
pub type APPSET_0_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTIAPPSET_SPEC, APPSET_0_AW, O>;
impl<'a, const O: u8> APPSET_0_W<'a, O> {
#[doc = "Generate channel event for channel 0."]
#[inline(always)]
pub fn activate(self) -> &'a mut W {
self.variant(APPSET_0_AW::ACTIVATE)
}
}
#[doc = "Field `APPSET_1` reader - Application trigger event for channel 1."]
pub type APPSET_1_R = crate::BitReader<APPSET_1_A>;
#[doc = "Application trigger event for channel 1.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum APPSET_1_A {
#[doc = "0: Application trigger 1 is inactive."]
INACTIVE = 0,
#[doc = "1: Application trigger 1 is active."]
ACTIVE = 1,
}
impl From<APPSET_1_A> for bool {
#[inline(always)]
fn from(variant: APPSET_1_A) -> Self {
variant as u8 != 0
}
}
impl APPSET_1_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> APPSET_1_A {
match self.bits {
false => APPSET_1_A::INACTIVE,
true => APPSET_1_A::ACTIVE,
}
}
#[doc = "Checks if the value of the field is `INACTIVE`"]
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == APPSET_1_A::INACTIVE
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == APPSET_1_A::ACTIVE
}
}
#[doc = "Application trigger event for channel 1.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum APPSET_1_AW {
#[doc = "1: Generate channel event for channel 1."]
ACTIVATE = 1,
}
impl From<APPSET_1_AW> for bool {
#[inline(always)]
fn from(variant: APPSET_1_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `APPSET_1` writer - Application trigger event for channel 1."]
pub type APPSET_1_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTIAPPSET_SPEC, APPSET_1_AW, O>;
impl<'a, const O: u8> APPSET_1_W<'a, O> {
#[doc = "Generate channel event for channel 1."]
#[inline(always)]
pub fn activate(self) -> &'a mut W {
self.variant(APPSET_1_AW::ACTIVATE)
}
}
#[doc = "Field `APPSET_2` reader - Application trigger event for channel 2."]
pub type APPSET_2_R = crate::BitReader<APPSET_2_A>;
#[doc = "Application trigger event for channel 2.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum APPSET_2_A {
#[doc = "0: Application trigger 2 is inactive."]
INACTIVE = 0,
#[doc = "1: Application trigger 2 is active."]
ACTIVE = 1,
}
impl From<APPSET_2_A> for bool {
#[inline(always)]
fn from(variant: APPSET_2_A) -> Self {
variant as u8 != 0
}
}
impl APPSET_2_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> APPSET_2_A {
match self.bits {
false => APPSET_2_A::INACTIVE,
true => APPSET_2_A::ACTIVE,
}
}
#[doc = "Checks if the value of the field is `INACTIVE`"]
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == APPSET_2_A::INACTIVE
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == APPSET_2_A::ACTIVE
}
}
#[doc = "Application trigger event for channel 2.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum APPSET_2_AW {
#[doc = "1: Generate channel event for channel 2."]
ACTIVATE = 1,
}
impl From<APPSET_2_AW> for bool {
#[inline(always)]
fn from(variant: APPSET_2_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `APPSET_2` writer - Application trigger event for channel 2."]
pub type APPSET_2_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTIAPPSET_SPEC, APPSET_2_AW, O>;
impl<'a, const O: u8> APPSET_2_W<'a, O> {
#[doc = "Generate channel event for channel 2."]
#[inline(always)]
pub fn activate(self) -> &'a mut W {
self.variant(APPSET_2_AW::ACTIVATE)
}
}
#[doc = "Field `APPSET_3` reader - Application trigger event for channel 3."]
pub type APPSET_3_R = crate::BitReader<APPSET_3_A>;
#[doc = "Application trigger event for channel 3.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum APPSET_3_A {
#[doc = "0: Application trigger 3 is inactive."]
INACTIVE = 0,
#[doc = "1: Application trigger 3 is active."]
ACTIVE = 1,
}
impl From<APPSET_3_A> for bool {
#[inline(always)]
fn from(variant: APPSET_3_A) -> Self {
variant as u8 != 0
}
}
impl APPSET_3_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> APPSET_3_A {
match self.bits {
false => APPSET_3_A::INACTIVE,
true => APPSET_3_A::ACTIVE,
}
}
#[doc = "Checks if the value of the field is `INACTIVE`"]
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == APPSET_3_A::INACTIVE
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == APPSET_3_A::ACTIVE
}
}
#[doc = "Application trigger event for channel 3.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum APPSET_3_AW {
#[doc = "1: Generate channel event for channel 3."]
ACTIVATE = 1,
}
impl From<APPSET_3_AW> for bool {
#[inline(always)]
fn from(variant: APPSET_3_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `APPSET_3` writer - Application trigger event for channel 3."]
pub type APPSET_3_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTIAPPSET_SPEC, APPSET_3_AW, O>;
impl<'a, const O: u8> APPSET_3_W<'a, O> {
#[doc = "Generate channel event for channel 3."]
#[inline(always)]
pub fn activate(self) -> &'a mut W {
self.variant(APPSET_3_AW::ACTIVATE)
}
}
impl R {
#[doc = "Bit 0 - Application trigger event for channel 0."]
#[inline(always)]
pub fn appset_0(&self) -> APPSET_0_R {
APPSET_0_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Application trigger event for channel 1."]
#[inline(always)]
pub fn appset_1(&self) -> APPSET_1_R {
APPSET_1_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Application trigger event for channel 2."]
#[inline(always)]
pub fn appset_2(&self) -> APPSET_2_R {
APPSET_2_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Application trigger event for channel 3."]
#[inline(always)]
pub fn appset_3(&self) -> APPSET_3_R {
APPSET_3_R::new(((self.bits >> 3) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Application trigger event for channel 0."]
#[inline(always)]
pub fn appset_0(&mut self) -> APPSET_0_W<0> {
APPSET_0_W::new(self)
}
#[doc = "Bit 1 - Application trigger event for channel 1."]
#[inline(always)]
pub fn appset_1(&mut self) -> APPSET_1_W<1> {
APPSET_1_W::new(self)
}
#[doc = "Bit 2 - Application trigger event for channel 2."]
#[inline(always)]
pub fn appset_2(&mut self) -> APPSET_2_W<2> {
APPSET_2_W::new(self)
}
#[doc = "Bit 3 - Application trigger event for channel 3."]
#[inline(always)]
pub fn appset_3(&mut self) -> APPSET_3_W<3> {
APPSET_3_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CTI Application Trigger Set register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ctiappset](index.html) module"]
pub struct CTIAPPSET_SPEC;
impl crate::RegisterSpec for CTIAPPSET_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [ctiappset::R](R) reader structure"]
impl crate::Readable for CTIAPPSET_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [ctiappset::W](W) writer structure"]
impl crate::Writable for CTIAPPSET_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CTIAPPSET to value 0"]
impl crate::Resettable for CTIAPPSET_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+197
View File
@@ -0,0 +1,197 @@
#[doc = "Register `CTICHINSTATUS` reader"]
pub struct R(crate::R<CTICHINSTATUS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CTICHINSTATUS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CTICHINSTATUS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CTICHINSTATUS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `CTICHINSTATUS_0` reader - Shows the status of the ctitrigin 0 input."]
pub type CTICHINSTATUS_0_R = crate::BitReader<CTICHINSTATUS_0_A>;
#[doc = "Shows the status of the ctitrigin 0 input.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CTICHINSTATUS_0_A {
#[doc = "1: Ctichin 0 is active."]
ACTIVE = 1,
#[doc = "0: Ctichin 0 is inactive."]
INACTIVE = 0,
}
impl From<CTICHINSTATUS_0_A> for bool {
#[inline(always)]
fn from(variant: CTICHINSTATUS_0_A) -> Self {
variant as u8 != 0
}
}
impl CTICHINSTATUS_0_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CTICHINSTATUS_0_A {
match self.bits {
true => CTICHINSTATUS_0_A::ACTIVE,
false => CTICHINSTATUS_0_A::INACTIVE,
}
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == CTICHINSTATUS_0_A::ACTIVE
}
#[doc = "Checks if the value of the field is `INACTIVE`"]
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == CTICHINSTATUS_0_A::INACTIVE
}
}
#[doc = "Field `CTICHINSTATUS_1` reader - Shows the status of the ctitrigin 1 input."]
pub type CTICHINSTATUS_1_R = crate::BitReader<CTICHINSTATUS_1_A>;
#[doc = "Shows the status of the ctitrigin 1 input.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CTICHINSTATUS_1_A {
#[doc = "1: Ctichin 1 is active."]
ACTIVE = 1,
#[doc = "0: Ctichin 1 is inactive."]
INACTIVE = 0,
}
impl From<CTICHINSTATUS_1_A> for bool {
#[inline(always)]
fn from(variant: CTICHINSTATUS_1_A) -> Self {
variant as u8 != 0
}
}
impl CTICHINSTATUS_1_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CTICHINSTATUS_1_A {
match self.bits {
true => CTICHINSTATUS_1_A::ACTIVE,
false => CTICHINSTATUS_1_A::INACTIVE,
}
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == CTICHINSTATUS_1_A::ACTIVE
}
#[doc = "Checks if the value of the field is `INACTIVE`"]
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == CTICHINSTATUS_1_A::INACTIVE
}
}
#[doc = "Field `CTICHINSTATUS_2` reader - Shows the status of the ctitrigin 2 input."]
pub type CTICHINSTATUS_2_R = crate::BitReader<CTICHINSTATUS_2_A>;
#[doc = "Shows the status of the ctitrigin 2 input.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CTICHINSTATUS_2_A {
#[doc = "1: Ctichin 2 is active."]
ACTIVE = 1,
#[doc = "0: Ctichin 2 is inactive."]
INACTIVE = 0,
}
impl From<CTICHINSTATUS_2_A> for bool {
#[inline(always)]
fn from(variant: CTICHINSTATUS_2_A) -> Self {
variant as u8 != 0
}
}
impl CTICHINSTATUS_2_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CTICHINSTATUS_2_A {
match self.bits {
true => CTICHINSTATUS_2_A::ACTIVE,
false => CTICHINSTATUS_2_A::INACTIVE,
}
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == CTICHINSTATUS_2_A::ACTIVE
}
#[doc = "Checks if the value of the field is `INACTIVE`"]
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == CTICHINSTATUS_2_A::INACTIVE
}
}
#[doc = "Field `CTICHINSTATUS_3` reader - Shows the status of the ctitrigin 3 input."]
pub type CTICHINSTATUS_3_R = crate::BitReader<CTICHINSTATUS_3_A>;
#[doc = "Shows the status of the ctitrigin 3 input.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CTICHINSTATUS_3_A {
#[doc = "1: Ctichin 3 is active."]
ACTIVE = 1,
#[doc = "0: Ctichin 3 is inactive."]
INACTIVE = 0,
}
impl From<CTICHINSTATUS_3_A> for bool {
#[inline(always)]
fn from(variant: CTICHINSTATUS_3_A) -> Self {
variant as u8 != 0
}
}
impl CTICHINSTATUS_3_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CTICHINSTATUS_3_A {
match self.bits {
true => CTICHINSTATUS_3_A::ACTIVE,
false => CTICHINSTATUS_3_A::INACTIVE,
}
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == CTICHINSTATUS_3_A::ACTIVE
}
#[doc = "Checks if the value of the field is `INACTIVE`"]
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == CTICHINSTATUS_3_A::INACTIVE
}
}
impl R {
#[doc = "Bit 0 - Shows the status of the ctitrigin 0 input."]
#[inline(always)]
pub fn ctichinstatus_0(&self) -> CTICHINSTATUS_0_R {
CTICHINSTATUS_0_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Shows the status of the ctitrigin 1 input."]
#[inline(always)]
pub fn ctichinstatus_1(&self) -> CTICHINSTATUS_1_R {
CTICHINSTATUS_1_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Shows the status of the ctitrigin 2 input."]
#[inline(always)]
pub fn ctichinstatus_2(&self) -> CTICHINSTATUS_2_R {
CTICHINSTATUS_2_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Shows the status of the ctitrigin 3 input."]
#[inline(always)]
pub fn ctichinstatus_3(&self) -> CTICHINSTATUS_3_R {
CTICHINSTATUS_3_R::new(((self.bits >> 3) & 1) != 0)
}
}
#[doc = "CTI Channel In Status register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ctichinstatus](index.html) module"]
pub struct CTICHINSTATUS_SPEC;
impl crate::RegisterSpec for CTICHINSTATUS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [ctichinstatus::R](R) reader structure"]
impl crate::Readable for CTICHINSTATUS_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets CTICHINSTATUS to value 0"]
impl crate::Resettable for CTICHINSTATUS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+126
View File
@@ -0,0 +1,126 @@
#[doc = "Register `CTICONTROL` reader"]
pub struct R(crate::R<CTICONTROL_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CTICONTROL_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CTICONTROL_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CTICONTROL_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CTICONTROL` writer"]
pub struct W(crate::W<CTICONTROL_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CTICONTROL_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CTICONTROL_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CTICONTROL_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `GLBEN` reader - Enables or disables the CTI."]
pub type GLBEN_R = crate::BitReader<GLBEN_A>;
#[doc = "Enables or disables the CTI.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum GLBEN_A {
#[doc = "0: All cross-triggering mapping logic functionality is disabled."]
DISABLED = 0,
#[doc = "1: Cross-triggering mapping logic functionality is enabled."]
ENABLED = 1,
}
impl From<GLBEN_A> for bool {
#[inline(always)]
fn from(variant: GLBEN_A) -> Self {
variant as u8 != 0
}
}
impl GLBEN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> GLBEN_A {
match self.bits {
false => GLBEN_A::DISABLED,
true => GLBEN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == GLBEN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == GLBEN_A::ENABLED
}
}
#[doc = "Field `GLBEN` writer - Enables or disables the CTI."]
pub type GLBEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTICONTROL_SPEC, GLBEN_A, O>;
impl<'a, const O: u8> GLBEN_W<'a, O> {
#[doc = "All cross-triggering mapping logic functionality is disabled."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(GLBEN_A::DISABLED)
}
#[doc = "Cross-triggering mapping logic functionality is enabled."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(GLBEN_A::ENABLED)
}
}
impl R {
#[doc = "Bit 0 - Enables or disables the CTI."]
#[inline(always)]
pub fn glben(&self) -> GLBEN_R {
GLBEN_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Enables or disables the CTI."]
#[inline(always)]
pub fn glben(&mut self) -> GLBEN_W<0> {
GLBEN_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CTI Control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cticontrol](index.html) module"]
pub struct CTICONTROL_SPEC;
impl crate::RegisterSpec for CTICONTROL_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cticontrol::R](R) reader structure"]
impl crate::Readable for CTICONTROL_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cticontrol::W](W) writer structure"]
impl crate::Writable for CTICONTROL_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CTICONTROL to value 0"]
impl crate::Resettable for CTICONTROL_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+306
View File
@@ -0,0 +1,306 @@
#[doc = "Register `CTIGATE` reader"]
pub struct R(crate::R<CTIGATE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CTIGATE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CTIGATE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CTIGATE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CTIGATE` writer"]
pub struct W(crate::W<CTIGATE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CTIGATE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CTIGATE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CTIGATE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CTIGATEEN_0` reader - Enable ctichout0."]
pub type CTIGATEEN_0_R = crate::BitReader<CTIGATEEN_0_A>;
#[doc = "Enable ctichout0.\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CTIGATEEN_0_A {
#[doc = "1: Enable ctichout channel 0 propagation."]
ENABLED = 1,
#[doc = "0: Disable ctichout channel 0 propagation."]
DISABLED = 0,
}
impl From<CTIGATEEN_0_A> for bool {
#[inline(always)]
fn from(variant: CTIGATEEN_0_A) -> Self {
variant as u8 != 0
}
}
impl CTIGATEEN_0_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CTIGATEEN_0_A {
match self.bits {
true => CTIGATEEN_0_A::ENABLED,
false => CTIGATEEN_0_A::DISABLED,
}
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CTIGATEEN_0_A::ENABLED
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CTIGATEEN_0_A::DISABLED
}
}
#[doc = "Field `CTIGATEEN_0` writer - Enable ctichout0."]
pub type CTIGATEEN_0_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTIGATE_SPEC, CTIGATEEN_0_A, O>;
impl<'a, const O: u8> CTIGATEEN_0_W<'a, O> {
#[doc = "Enable ctichout channel 0 propagation."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(CTIGATEEN_0_A::ENABLED)
}
#[doc = "Disable ctichout channel 0 propagation."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(CTIGATEEN_0_A::DISABLED)
}
}
#[doc = "Field `CTIGATEEN_1` reader - Enable ctichout1."]
pub type CTIGATEEN_1_R = crate::BitReader<CTIGATEEN_1_A>;
#[doc = "Enable ctichout1.\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CTIGATEEN_1_A {
#[doc = "1: Enable ctichout channel 1 propagation."]
ENABLED = 1,
#[doc = "0: Disable ctichout channel 1 propagation."]
DISABLED = 0,
}
impl From<CTIGATEEN_1_A> for bool {
#[inline(always)]
fn from(variant: CTIGATEEN_1_A) -> Self {
variant as u8 != 0
}
}
impl CTIGATEEN_1_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CTIGATEEN_1_A {
match self.bits {
true => CTIGATEEN_1_A::ENABLED,
false => CTIGATEEN_1_A::DISABLED,
}
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CTIGATEEN_1_A::ENABLED
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CTIGATEEN_1_A::DISABLED
}
}
#[doc = "Field `CTIGATEEN_1` writer - Enable ctichout1."]
pub type CTIGATEEN_1_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTIGATE_SPEC, CTIGATEEN_1_A, O>;
impl<'a, const O: u8> CTIGATEEN_1_W<'a, O> {
#[doc = "Enable ctichout channel 1 propagation."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(CTIGATEEN_1_A::ENABLED)
}
#[doc = "Disable ctichout channel 1 propagation."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(CTIGATEEN_1_A::DISABLED)
}
}
#[doc = "Field `CTIGATEEN_2` reader - Enable ctichout2."]
pub type CTIGATEEN_2_R = crate::BitReader<CTIGATEEN_2_A>;
#[doc = "Enable ctichout2.\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CTIGATEEN_2_A {
#[doc = "1: Enable ctichout channel 2 propagation."]
ENABLED = 1,
#[doc = "0: Disable ctichout channel 2 propagation."]
DISABLED = 0,
}
impl From<CTIGATEEN_2_A> for bool {
#[inline(always)]
fn from(variant: CTIGATEEN_2_A) -> Self {
variant as u8 != 0
}
}
impl CTIGATEEN_2_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CTIGATEEN_2_A {
match self.bits {
true => CTIGATEEN_2_A::ENABLED,
false => CTIGATEEN_2_A::DISABLED,
}
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CTIGATEEN_2_A::ENABLED
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CTIGATEEN_2_A::DISABLED
}
}
#[doc = "Field `CTIGATEEN_2` writer - Enable ctichout2."]
pub type CTIGATEEN_2_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTIGATE_SPEC, CTIGATEEN_2_A, O>;
impl<'a, const O: u8> CTIGATEEN_2_W<'a, O> {
#[doc = "Enable ctichout channel 2 propagation."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(CTIGATEEN_2_A::ENABLED)
}
#[doc = "Disable ctichout channel 2 propagation."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(CTIGATEEN_2_A::DISABLED)
}
}
#[doc = "Field `CTIGATEEN_3` reader - Enable ctichout3."]
pub type CTIGATEEN_3_R = crate::BitReader<CTIGATEEN_3_A>;
#[doc = "Enable ctichout3.\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CTIGATEEN_3_A {
#[doc = "1: Enable ctichout channel 3 propagation."]
ENABLED = 1,
#[doc = "0: Disable ctichout channel 3 propagation."]
DISABLED = 0,
}
impl From<CTIGATEEN_3_A> for bool {
#[inline(always)]
fn from(variant: CTIGATEEN_3_A) -> Self {
variant as u8 != 0
}
}
impl CTIGATEEN_3_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CTIGATEEN_3_A {
match self.bits {
true => CTIGATEEN_3_A::ENABLED,
false => CTIGATEEN_3_A::DISABLED,
}
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CTIGATEEN_3_A::ENABLED
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CTIGATEEN_3_A::DISABLED
}
}
#[doc = "Field `CTIGATEEN_3` writer - Enable ctichout3."]
pub type CTIGATEEN_3_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTIGATE_SPEC, CTIGATEEN_3_A, O>;
impl<'a, const O: u8> CTIGATEEN_3_W<'a, O> {
#[doc = "Enable ctichout channel 3 propagation."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(CTIGATEEN_3_A::ENABLED)
}
#[doc = "Disable ctichout channel 3 propagation."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(CTIGATEEN_3_A::DISABLED)
}
}
impl R {
#[doc = "Bit 0 - Enable ctichout0."]
#[inline(always)]
pub fn ctigateen_0(&self) -> CTIGATEEN_0_R {
CTIGATEEN_0_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Enable ctichout1."]
#[inline(always)]
pub fn ctigateen_1(&self) -> CTIGATEEN_1_R {
CTIGATEEN_1_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Enable ctichout2."]
#[inline(always)]
pub fn ctigateen_2(&self) -> CTIGATEEN_2_R {
CTIGATEEN_2_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Enable ctichout3."]
#[inline(always)]
pub fn ctigateen_3(&self) -> CTIGATEEN_3_R {
CTIGATEEN_3_R::new(((self.bits >> 3) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Enable ctichout0."]
#[inline(always)]
pub fn ctigateen_0(&mut self) -> CTIGATEEN_0_W<0> {
CTIGATEEN_0_W::new(self)
}
#[doc = "Bit 1 - Enable ctichout1."]
#[inline(always)]
pub fn ctigateen_1(&mut self) -> CTIGATEEN_1_W<1> {
CTIGATEEN_1_W::new(self)
}
#[doc = "Bit 2 - Enable ctichout2."]
#[inline(always)]
pub fn ctigateen_2(&mut self) -> CTIGATEEN_2_W<2> {
CTIGATEEN_2_W::new(self)
}
#[doc = "Bit 3 - Enable ctichout3."]
#[inline(always)]
pub fn ctigateen_3(&mut self) -> CTIGATEEN_3_W<3> {
CTIGATEEN_3_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Enable CTI Channel Gate register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ctigate](index.html) module"]
pub struct CTIGATE_SPEC;
impl crate::RegisterSpec for CTIGATE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [ctigate::R](R) reader structure"]
impl crate::Readable for CTIGATE_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [ctigate::W](W) writer structure"]
impl crate::Writable for CTIGATE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CTIGATE to value 0x0f"]
impl crate::Resettable for CTIGATE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x0f
}
}
+307
View File
@@ -0,0 +1,307 @@
#[doc = "Register `CTIINEN[%s]` reader"]
pub struct R(crate::R<CTIINEN_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CTIINEN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CTIINEN_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CTIINEN_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CTIINEN[%s]` writer"]
pub struct W(crate::W<CTIINEN_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CTIINEN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CTIINEN_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CTIINEN_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `TRIGINEN_0` reader - Enables a cross trigger event to channel 0 when a ctitrigin input is activated."]
pub type TRIGINEN_0_R = crate::BitReader<TRIGINEN_0_A>;
#[doc = "Enables a cross trigger event to channel 0 when a ctitrigin input is activated.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TRIGINEN_0_A {
#[doc = "0: Input trigger n events are ignored by channel 0."]
DISABLED = 0,
#[doc = "1: When an event is received on input trigger n (ctitrigin\\[n\\]), generate an event on channel 0."]
ENABLED = 1,
}
impl From<TRIGINEN_0_A> for bool {
#[inline(always)]
fn from(variant: TRIGINEN_0_A) -> Self {
variant as u8 != 0
}
}
impl TRIGINEN_0_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TRIGINEN_0_A {
match self.bits {
false => TRIGINEN_0_A::DISABLED,
true => TRIGINEN_0_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TRIGINEN_0_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TRIGINEN_0_A::ENABLED
}
}
#[doc = "Field `TRIGINEN_0` writer - Enables a cross trigger event to channel 0 when a ctitrigin input is activated."]
pub type TRIGINEN_0_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTIINEN_SPEC, TRIGINEN_0_A, O>;
impl<'a, const O: u8> TRIGINEN_0_W<'a, O> {
#[doc = "Input trigger n events are ignored by channel 0."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(TRIGINEN_0_A::DISABLED)
}
#[doc = "When an event is received on input trigger n (ctitrigin\\[n\\]), generate an event on channel 0."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(TRIGINEN_0_A::ENABLED)
}
}
#[doc = "Field `TRIGINEN_1` reader - Enables a cross trigger event to channel 1 when a ctitrigin input is activated."]
pub type TRIGINEN_1_R = crate::BitReader<TRIGINEN_1_A>;
#[doc = "Enables a cross trigger event to channel 1 when a ctitrigin input is activated.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TRIGINEN_1_A {
#[doc = "0: Input trigger n events are ignored by channel 1."]
DISABLED = 0,
#[doc = "1: When an event is received on input trigger n (ctitrigin\\[n\\]), generate an event on channel 1."]
ENABLED = 1,
}
impl From<TRIGINEN_1_A> for bool {
#[inline(always)]
fn from(variant: TRIGINEN_1_A) -> Self {
variant as u8 != 0
}
}
impl TRIGINEN_1_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TRIGINEN_1_A {
match self.bits {
false => TRIGINEN_1_A::DISABLED,
true => TRIGINEN_1_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TRIGINEN_1_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TRIGINEN_1_A::ENABLED
}
}
#[doc = "Field `TRIGINEN_1` writer - Enables a cross trigger event to channel 1 when a ctitrigin input is activated."]
pub type TRIGINEN_1_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTIINEN_SPEC, TRIGINEN_1_A, O>;
impl<'a, const O: u8> TRIGINEN_1_W<'a, O> {
#[doc = "Input trigger n events are ignored by channel 1."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(TRIGINEN_1_A::DISABLED)
}
#[doc = "When an event is received on input trigger n (ctitrigin\\[n\\]), generate an event on channel 1."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(TRIGINEN_1_A::ENABLED)
}
}
#[doc = "Field `TRIGINEN_2` reader - Enables a cross trigger event to channel 2 when a ctitrigin input is activated."]
pub type TRIGINEN_2_R = crate::BitReader<TRIGINEN_2_A>;
#[doc = "Enables a cross trigger event to channel 2 when a ctitrigin input is activated.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TRIGINEN_2_A {
#[doc = "0: Input trigger n events are ignored by channel 2."]
DISABLED = 0,
#[doc = "1: When an event is received on input trigger n (ctitrigin\\[n\\]), generate an event on channel 2."]
ENABLED = 1,
}
impl From<TRIGINEN_2_A> for bool {
#[inline(always)]
fn from(variant: TRIGINEN_2_A) -> Self {
variant as u8 != 0
}
}
impl TRIGINEN_2_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TRIGINEN_2_A {
match self.bits {
false => TRIGINEN_2_A::DISABLED,
true => TRIGINEN_2_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TRIGINEN_2_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TRIGINEN_2_A::ENABLED
}
}
#[doc = "Field `TRIGINEN_2` writer - Enables a cross trigger event to channel 2 when a ctitrigin input is activated."]
pub type TRIGINEN_2_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTIINEN_SPEC, TRIGINEN_2_A, O>;
impl<'a, const O: u8> TRIGINEN_2_W<'a, O> {
#[doc = "Input trigger n events are ignored by channel 2."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(TRIGINEN_2_A::DISABLED)
}
#[doc = "When an event is received on input trigger n (ctitrigin\\[n\\]), generate an event on channel 2."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(TRIGINEN_2_A::ENABLED)
}
}
#[doc = "Field `TRIGINEN_3` reader - Enables a cross trigger event to channel 3 when a ctitrigin input is activated."]
pub type TRIGINEN_3_R = crate::BitReader<TRIGINEN_3_A>;
#[doc = "Enables a cross trigger event to channel 3 when a ctitrigin input is activated.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TRIGINEN_3_A {
#[doc = "0: Input trigger n events are ignored by channel 3."]
DISABLED = 0,
#[doc = "1: When an event is received on input trigger n (ctitrigin\\[n\\]), generate an event on channel 3."]
ENABLED = 1,
}
impl From<TRIGINEN_3_A> for bool {
#[inline(always)]
fn from(variant: TRIGINEN_3_A) -> Self {
variant as u8 != 0
}
}
impl TRIGINEN_3_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TRIGINEN_3_A {
match self.bits {
false => TRIGINEN_3_A::DISABLED,
true => TRIGINEN_3_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TRIGINEN_3_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TRIGINEN_3_A::ENABLED
}
}
#[doc = "Field `TRIGINEN_3` writer - Enables a cross trigger event to channel 3 when a ctitrigin input is activated."]
pub type TRIGINEN_3_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTIINEN_SPEC, TRIGINEN_3_A, O>;
impl<'a, const O: u8> TRIGINEN_3_W<'a, O> {
#[doc = "Input trigger n events are ignored by channel 3."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(TRIGINEN_3_A::DISABLED)
}
#[doc = "When an event is received on input trigger n (ctitrigin\\[n\\]), generate an event on channel 3."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(TRIGINEN_3_A::ENABLED)
}
}
impl R {
#[doc = "Bit 0 - Enables a cross trigger event to channel 0 when a ctitrigin input is activated."]
#[inline(always)]
pub fn triginen_0(&self) -> TRIGINEN_0_R {
TRIGINEN_0_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Enables a cross trigger event to channel 1 when a ctitrigin input is activated."]
#[inline(always)]
pub fn triginen_1(&self) -> TRIGINEN_1_R {
TRIGINEN_1_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Enables a cross trigger event to channel 2 when a ctitrigin input is activated."]
#[inline(always)]
pub fn triginen_2(&self) -> TRIGINEN_2_R {
TRIGINEN_2_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Enables a cross trigger event to channel 3 when a ctitrigin input is activated."]
#[inline(always)]
pub fn triginen_3(&self) -> TRIGINEN_3_R {
TRIGINEN_3_R::new(((self.bits >> 3) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Enables a cross trigger event to channel 0 when a ctitrigin input is activated."]
#[inline(always)]
pub fn triginen_0(&mut self) -> TRIGINEN_0_W<0> {
TRIGINEN_0_W::new(self)
}
#[doc = "Bit 1 - Enables a cross trigger event to channel 1 when a ctitrigin input is activated."]
#[inline(always)]
pub fn triginen_1(&mut self) -> TRIGINEN_1_W<1> {
TRIGINEN_1_W::new(self)
}
#[doc = "Bit 2 - Enables a cross trigger event to channel 2 when a ctitrigin input is activated."]
#[inline(always)]
pub fn triginen_2(&mut self) -> TRIGINEN_2_W<2> {
TRIGINEN_2_W::new(self)
}
#[doc = "Bit 3 - Enables a cross trigger event to channel 3 when a ctitrigin input is activated."]
#[inline(always)]
pub fn triginen_3(&mut self) -> TRIGINEN_3_W<3> {
TRIGINEN_3_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Description collection: CTI Trigger input\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ctiinen](index.html) module"]
pub struct CTIINEN_SPEC;
impl crate::RegisterSpec for CTIINEN_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [ctiinen::R](R) reader structure"]
impl crate::Readable for CTIINEN_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [ctiinen::W](W) writer structure"]
impl crate::Writable for CTIINEN_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CTIINEN[%s]
to value 0"]
impl crate::Resettable for CTIINEN_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+254
View File
@@ -0,0 +1,254 @@
#[doc = "Register `CTIINTACK` writer"]
pub struct W(crate::W<CTIINTACK_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CTIINTACK_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CTIINTACK_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CTIINTACK_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Processor debug request\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DEBUGREQ_AW {
#[doc = "1: Clears the ctitrigout."]
ACKNOWLEDGE = 1,
}
impl From<DEBUGREQ_AW> for bool {
#[inline(always)]
fn from(variant: DEBUGREQ_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `DEBUGREQ` writer - Processor debug request"]
pub type DEBUGREQ_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTIINTACK_SPEC, DEBUGREQ_AW, O>;
impl<'a, const O: u8> DEBUGREQ_W<'a, O> {
#[doc = "Clears the ctitrigout."]
#[inline(always)]
pub fn acknowledge(self) -> &'a mut W {
self.variant(DEBUGREQ_AW::ACKNOWLEDGE)
}
}
#[doc = "Processor Restart\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CPURESTART_AW {
#[doc = "1: Clears the ctitrigout."]
ACKNOWLEDGE = 1,
}
impl From<CPURESTART_AW> for bool {
#[inline(always)]
fn from(variant: CPURESTART_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `CPURESTART` writer - Processor Restart"]
pub type CPURESTART_W<'a, const O: u8> =
crate::BitWriter<'a, u32, CTIINTACK_SPEC, CPURESTART_AW, O>;
impl<'a, const O: u8> CPURESTART_W<'a, O> {
#[doc = "Clears the ctitrigout."]
#[inline(always)]
pub fn acknowledge(self) -> &'a mut W {
self.variant(CPURESTART_AW::ACKNOWLEDGE)
}
}
#[doc = "N/A\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UNUSED0_AW {
#[doc = "1: Clears the ctitrigout."]
ACKNOWLEDGE = 1,
}
impl From<UNUSED0_AW> for bool {
#[inline(always)]
fn from(variant: UNUSED0_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `UNUSED0` writer - N/A"]
pub type UNUSED0_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTIINTACK_SPEC, UNUSED0_AW, O>;
impl<'a, const O: u8> UNUSED0_W<'a, O> {
#[doc = "Clears the ctitrigout."]
#[inline(always)]
pub fn acknowledge(self) -> &'a mut W {
self.variant(UNUSED0_AW::ACKNOWLEDGE)
}
}
#[doc = "N/A\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UNUSED1_AW {
#[doc = "1: Clears the ctitrigout."]
ACKNOWLEDGE = 1,
}
impl From<UNUSED1_AW> for bool {
#[inline(always)]
fn from(variant: UNUSED1_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `UNUSED1` writer - N/A"]
pub type UNUSED1_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTIINTACK_SPEC, UNUSED1_AW, O>;
impl<'a, const O: u8> UNUSED1_W<'a, O> {
#[doc = "Clears the ctitrigout."]
#[inline(always)]
pub fn acknowledge(self) -> &'a mut W {
self.variant(UNUSED1_AW::ACKNOWLEDGE)
}
}
#[doc = "N/A\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UNUSED2_AW {
#[doc = "1: Clears the ctitrigout."]
ACKNOWLEDGE = 1,
}
impl From<UNUSED2_AW> for bool {
#[inline(always)]
fn from(variant: UNUSED2_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `UNUSED2` writer - N/A"]
pub type UNUSED2_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTIINTACK_SPEC, UNUSED2_AW, O>;
impl<'a, const O: u8> UNUSED2_W<'a, O> {
#[doc = "Clears the ctitrigout."]
#[inline(always)]
pub fn acknowledge(self) -> &'a mut W {
self.variant(UNUSED2_AW::ACKNOWLEDGE)
}
}
#[doc = "N/A\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UNUSED3_AW {
#[doc = "1: Clears the ctitrigout."]
ACKNOWLEDGE = 1,
}
impl From<UNUSED3_AW> for bool {
#[inline(always)]
fn from(variant: UNUSED3_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `UNUSED3` writer - N/A"]
pub type UNUSED3_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTIINTACK_SPEC, UNUSED3_AW, O>;
impl<'a, const O: u8> UNUSED3_W<'a, O> {
#[doc = "Clears the ctitrigout."]
#[inline(always)]
pub fn acknowledge(self) -> &'a mut W {
self.variant(UNUSED3_AW::ACKNOWLEDGE)
}
}
#[doc = "N/A\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UNUSED4_AW {
#[doc = "1: Clears the ctitrigout."]
ACKNOWLEDGE = 1,
}
impl From<UNUSED4_AW> for bool {
#[inline(always)]
fn from(variant: UNUSED4_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `UNUSED4` writer - N/A"]
pub type UNUSED4_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTIINTACK_SPEC, UNUSED4_AW, O>;
impl<'a, const O: u8> UNUSED4_W<'a, O> {
#[doc = "Clears the ctitrigout."]
#[inline(always)]
pub fn acknowledge(self) -> &'a mut W {
self.variant(UNUSED4_AW::ACKNOWLEDGE)
}
}
#[doc = "N/A\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UNUSED5_AW {
#[doc = "1: Clears the ctitrigout."]
ACKNOWLEDGE = 1,
}
impl From<UNUSED5_AW> for bool {
#[inline(always)]
fn from(variant: UNUSED5_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `UNUSED5` writer - N/A"]
pub type UNUSED5_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTIINTACK_SPEC, UNUSED5_AW, O>;
impl<'a, const O: u8> UNUSED5_W<'a, O> {
#[doc = "Clears the ctitrigout."]
#[inline(always)]
pub fn acknowledge(self) -> &'a mut W {
self.variant(UNUSED5_AW::ACKNOWLEDGE)
}
}
impl W {
#[doc = "Bit 0 - Processor debug request"]
#[inline(always)]
pub fn debugreq(&mut self) -> DEBUGREQ_W<0> {
DEBUGREQ_W::new(self)
}
#[doc = "Bit 1 - Processor Restart"]
#[inline(always)]
pub fn cpurestart(&mut self) -> CPURESTART_W<1> {
CPURESTART_W::new(self)
}
#[doc = "Bit 2 - N/A"]
#[inline(always)]
pub fn unused0(&mut self) -> UNUSED0_W<2> {
UNUSED0_W::new(self)
}
#[doc = "Bit 3 - N/A"]
#[inline(always)]
pub fn unused1(&mut self) -> UNUSED1_W<3> {
UNUSED1_W::new(self)
}
#[doc = "Bit 4 - N/A"]
#[inline(always)]
pub fn unused2(&mut self) -> UNUSED2_W<4> {
UNUSED2_W::new(self)
}
#[doc = "Bit 5 - N/A"]
#[inline(always)]
pub fn unused3(&mut self) -> UNUSED3_W<5> {
UNUSED3_W::new(self)
}
#[doc = "Bit 6 - N/A"]
#[inline(always)]
pub fn unused4(&mut self) -> UNUSED4_W<6> {
UNUSED4_W::new(self)
}
#[doc = "Bit 7 - N/A"]
#[inline(always)]
pub fn unused5(&mut self) -> UNUSED5_W<7> {
UNUSED5_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CTI Interrupt Acknowledge register\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ctiintack](index.html) module"]
pub struct CTIINTACK_SPEC;
impl crate::RegisterSpec for CTIINTACK_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [ctiintack::W](W) writer structure"]
impl crate::Writable for CTIINTACK_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CTIINTACK to value 0"]
impl crate::Resettable for CTIINTACK_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+311
View File
@@ -0,0 +1,311 @@
#[doc = "Register `CTIOUTEN[%s]` reader"]
pub struct R(crate::R<CTIOUTEN_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CTIOUTEN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CTIOUTEN_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CTIOUTEN_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CTIOUTEN[%s]` writer"]
pub struct W(crate::W<CTIOUTEN_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CTIOUTEN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CTIOUTEN_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CTIOUTEN_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `TRIGOUTEN_0` reader - Enables a cross trigger event to ctitrigout when channel 0 is activated."]
pub type TRIGOUTEN_0_R = crate::BitReader<TRIGOUTEN_0_A>;
#[doc = "Enables a cross trigger event to ctitrigout when channel 0 is activated.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TRIGOUTEN_0_A {
#[doc = "0: Channel 0 is ignored by output trigger n."]
DISABLED = 0,
#[doc = "1: When an event occurs on channel 0, generate an event on output event n (ctitrigout\\[n\\])."]
ENABLED = 1,
}
impl From<TRIGOUTEN_0_A> for bool {
#[inline(always)]
fn from(variant: TRIGOUTEN_0_A) -> Self {
variant as u8 != 0
}
}
impl TRIGOUTEN_0_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TRIGOUTEN_0_A {
match self.bits {
false => TRIGOUTEN_0_A::DISABLED,
true => TRIGOUTEN_0_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TRIGOUTEN_0_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TRIGOUTEN_0_A::ENABLED
}
}
#[doc = "Field `TRIGOUTEN_0` writer - Enables a cross trigger event to ctitrigout when channel 0 is activated."]
pub type TRIGOUTEN_0_W<'a, const O: u8> =
crate::BitWriter<'a, u32, CTIOUTEN_SPEC, TRIGOUTEN_0_A, O>;
impl<'a, const O: u8> TRIGOUTEN_0_W<'a, O> {
#[doc = "Channel 0 is ignored by output trigger n."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(TRIGOUTEN_0_A::DISABLED)
}
#[doc = "When an event occurs on channel 0, generate an event on output event n (ctitrigout\\[n\\])."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(TRIGOUTEN_0_A::ENABLED)
}
}
#[doc = "Field `TRIGOUTEN_1` reader - Enables a cross trigger event to ctitrigout when channel 1 is activated."]
pub type TRIGOUTEN_1_R = crate::BitReader<TRIGOUTEN_1_A>;
#[doc = "Enables a cross trigger event to ctitrigout when channel 1 is activated.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TRIGOUTEN_1_A {
#[doc = "0: Channel 1 is ignored by output trigger n."]
DISABLED = 0,
#[doc = "1: When an event occurs on channel 1, generate an event on output event n (ctitrigout\\[n\\])."]
ENABLED = 1,
}
impl From<TRIGOUTEN_1_A> for bool {
#[inline(always)]
fn from(variant: TRIGOUTEN_1_A) -> Self {
variant as u8 != 0
}
}
impl TRIGOUTEN_1_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TRIGOUTEN_1_A {
match self.bits {
false => TRIGOUTEN_1_A::DISABLED,
true => TRIGOUTEN_1_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TRIGOUTEN_1_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TRIGOUTEN_1_A::ENABLED
}
}
#[doc = "Field `TRIGOUTEN_1` writer - Enables a cross trigger event to ctitrigout when channel 1 is activated."]
pub type TRIGOUTEN_1_W<'a, const O: u8> =
crate::BitWriter<'a, u32, CTIOUTEN_SPEC, TRIGOUTEN_1_A, O>;
impl<'a, const O: u8> TRIGOUTEN_1_W<'a, O> {
#[doc = "Channel 1 is ignored by output trigger n."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(TRIGOUTEN_1_A::DISABLED)
}
#[doc = "When an event occurs on channel 1, generate an event on output event n (ctitrigout\\[n\\])."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(TRIGOUTEN_1_A::ENABLED)
}
}
#[doc = "Field `TRIGOUTEN_2` reader - Enables a cross trigger event to ctitrigout when channel 2 is activated."]
pub type TRIGOUTEN_2_R = crate::BitReader<TRIGOUTEN_2_A>;
#[doc = "Enables a cross trigger event to ctitrigout when channel 2 is activated.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TRIGOUTEN_2_A {
#[doc = "0: Channel 2 is ignored by output trigger n."]
DISABLED = 0,
#[doc = "1: When an event occurs on channel 2, generate an event on output event n (ctitrigout\\[n\\])."]
ENABLED = 1,
}
impl From<TRIGOUTEN_2_A> for bool {
#[inline(always)]
fn from(variant: TRIGOUTEN_2_A) -> Self {
variant as u8 != 0
}
}
impl TRIGOUTEN_2_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TRIGOUTEN_2_A {
match self.bits {
false => TRIGOUTEN_2_A::DISABLED,
true => TRIGOUTEN_2_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TRIGOUTEN_2_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TRIGOUTEN_2_A::ENABLED
}
}
#[doc = "Field `TRIGOUTEN_2` writer - Enables a cross trigger event to ctitrigout when channel 2 is activated."]
pub type TRIGOUTEN_2_W<'a, const O: u8> =
crate::BitWriter<'a, u32, CTIOUTEN_SPEC, TRIGOUTEN_2_A, O>;
impl<'a, const O: u8> TRIGOUTEN_2_W<'a, O> {
#[doc = "Channel 2 is ignored by output trigger n."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(TRIGOUTEN_2_A::DISABLED)
}
#[doc = "When an event occurs on channel 2, generate an event on output event n (ctitrigout\\[n\\])."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(TRIGOUTEN_2_A::ENABLED)
}
}
#[doc = "Field `TRIGOUTEN_3` reader - Enables a cross trigger event to ctitrigout when channel 3 is activated."]
pub type TRIGOUTEN_3_R = crate::BitReader<TRIGOUTEN_3_A>;
#[doc = "Enables a cross trigger event to ctitrigout when channel 3 is activated.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TRIGOUTEN_3_A {
#[doc = "0: Channel 3 is ignored by output trigger n."]
DISABLED = 0,
#[doc = "1: When an event occurs on channel 3, generate an event on output event n (ctitrigout\\[n\\])."]
ENABLED = 1,
}
impl From<TRIGOUTEN_3_A> for bool {
#[inline(always)]
fn from(variant: TRIGOUTEN_3_A) -> Self {
variant as u8 != 0
}
}
impl TRIGOUTEN_3_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TRIGOUTEN_3_A {
match self.bits {
false => TRIGOUTEN_3_A::DISABLED,
true => TRIGOUTEN_3_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TRIGOUTEN_3_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TRIGOUTEN_3_A::ENABLED
}
}
#[doc = "Field `TRIGOUTEN_3` writer - Enables a cross trigger event to ctitrigout when channel 3 is activated."]
pub type TRIGOUTEN_3_W<'a, const O: u8> =
crate::BitWriter<'a, u32, CTIOUTEN_SPEC, TRIGOUTEN_3_A, O>;
impl<'a, const O: u8> TRIGOUTEN_3_W<'a, O> {
#[doc = "Channel 3 is ignored by output trigger n."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(TRIGOUTEN_3_A::DISABLED)
}
#[doc = "When an event occurs on channel 3, generate an event on output event n (ctitrigout\\[n\\])."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(TRIGOUTEN_3_A::ENABLED)
}
}
impl R {
#[doc = "Bit 0 - Enables a cross trigger event to ctitrigout when channel 0 is activated."]
#[inline(always)]
pub fn trigouten_0(&self) -> TRIGOUTEN_0_R {
TRIGOUTEN_0_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Enables a cross trigger event to ctitrigout when channel 1 is activated."]
#[inline(always)]
pub fn trigouten_1(&self) -> TRIGOUTEN_1_R {
TRIGOUTEN_1_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Enables a cross trigger event to ctitrigout when channel 2 is activated."]
#[inline(always)]
pub fn trigouten_2(&self) -> TRIGOUTEN_2_R {
TRIGOUTEN_2_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Enables a cross trigger event to ctitrigout when channel 3 is activated."]
#[inline(always)]
pub fn trigouten_3(&self) -> TRIGOUTEN_3_R {
TRIGOUTEN_3_R::new(((self.bits >> 3) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Enables a cross trigger event to ctitrigout when channel 0 is activated."]
#[inline(always)]
pub fn trigouten_0(&mut self) -> TRIGOUTEN_0_W<0> {
TRIGOUTEN_0_W::new(self)
}
#[doc = "Bit 1 - Enables a cross trigger event to ctitrigout when channel 1 is activated."]
#[inline(always)]
pub fn trigouten_1(&mut self) -> TRIGOUTEN_1_W<1> {
TRIGOUTEN_1_W::new(self)
}
#[doc = "Bit 2 - Enables a cross trigger event to ctitrigout when channel 2 is activated."]
#[inline(always)]
pub fn trigouten_2(&mut self) -> TRIGOUTEN_2_W<2> {
TRIGOUTEN_2_W::new(self)
}
#[doc = "Bit 3 - Enables a cross trigger event to ctitrigout when channel 3 is activated."]
#[inline(always)]
pub fn trigouten_3(&mut self) -> TRIGOUTEN_3_W<3> {
TRIGOUTEN_3_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Description collection: CTI Trigger output\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ctiouten](index.html) module"]
pub struct CTIOUTEN_SPEC;
impl crate::RegisterSpec for CTIOUTEN_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [ctiouten::R](R) reader structure"]
impl crate::Readable for CTIOUTEN_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [ctiouten::W](W) writer structure"]
impl crate::Writable for CTIOUTEN_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CTIOUTEN[%s]
to value 0"]
impl crate::Resettable for CTIOUTEN_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+361
View File
@@ -0,0 +1,361 @@
#[doc = "Register `CTITRIGINSTATUS` reader"]
pub struct R(crate::R<CTITRIGINSTATUS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CTITRIGINSTATUS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CTITRIGINSTATUS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CTITRIGINSTATUS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `CPUHALTED` reader - Processor Halted"]
pub type CPUHALTED_R = crate::BitReader<CPUHALTED_A>;
#[doc = "Processor Halted\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CPUHALTED_A {
#[doc = "1: Ctitrigin 0 is active."]
ACTIVE = 1,
#[doc = "0: Ctitrigin 0 is inactive."]
INACTIVE = 0,
}
impl From<CPUHALTED_A> for bool {
#[inline(always)]
fn from(variant: CPUHALTED_A) -> Self {
variant as u8 != 0
}
}
impl CPUHALTED_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CPUHALTED_A {
match self.bits {
true => CPUHALTED_A::ACTIVE,
false => CPUHALTED_A::INACTIVE,
}
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == CPUHALTED_A::ACTIVE
}
#[doc = "Checks if the value of the field is `INACTIVE`"]
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == CPUHALTED_A::INACTIVE
}
}
#[doc = "Field `DWTCOMPOUT0` reader - DWT Comparator Output 0"]
pub type DWTCOMPOUT0_R = crate::BitReader<DWTCOMPOUT0_A>;
#[doc = "DWT Comparator Output 0\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DWTCOMPOUT0_A {
#[doc = "1: Ctitrigin 1 is active."]
ACTIVE = 1,
#[doc = "0: Ctitrigin 1 is inactive."]
INACTIVE = 0,
}
impl From<DWTCOMPOUT0_A> for bool {
#[inline(always)]
fn from(variant: DWTCOMPOUT0_A) -> Self {
variant as u8 != 0
}
}
impl DWTCOMPOUT0_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> DWTCOMPOUT0_A {
match self.bits {
true => DWTCOMPOUT0_A::ACTIVE,
false => DWTCOMPOUT0_A::INACTIVE,
}
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == DWTCOMPOUT0_A::ACTIVE
}
#[doc = "Checks if the value of the field is `INACTIVE`"]
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == DWTCOMPOUT0_A::INACTIVE
}
}
#[doc = "Field `DWTCOMPOUT1` reader - DWT Comparator Output 1"]
pub type DWTCOMPOUT1_R = crate::BitReader<DWTCOMPOUT1_A>;
#[doc = "DWT Comparator Output 1\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DWTCOMPOUT1_A {
#[doc = "1: Ctitrigin 2 is active."]
ACTIVE = 1,
#[doc = "0: Ctitrigin 2 is inactive."]
INACTIVE = 0,
}
impl From<DWTCOMPOUT1_A> for bool {
#[inline(always)]
fn from(variant: DWTCOMPOUT1_A) -> Self {
variant as u8 != 0
}
}
impl DWTCOMPOUT1_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> DWTCOMPOUT1_A {
match self.bits {
true => DWTCOMPOUT1_A::ACTIVE,
false => DWTCOMPOUT1_A::INACTIVE,
}
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == DWTCOMPOUT1_A::ACTIVE
}
#[doc = "Checks if the value of the field is `INACTIVE`"]
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == DWTCOMPOUT1_A::INACTIVE
}
}
#[doc = "Field `DWTCOMPOUT2` reader - DWT Comparator Output 2"]
pub type DWTCOMPOUT2_R = crate::BitReader<DWTCOMPOUT2_A>;
#[doc = "DWT Comparator Output 2\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DWTCOMPOUT2_A {
#[doc = "1: Ctitrigin 3 is active."]
ACTIVE = 1,
#[doc = "0: Ctitrigin 3 is inactive."]
INACTIVE = 0,
}
impl From<DWTCOMPOUT2_A> for bool {
#[inline(always)]
fn from(variant: DWTCOMPOUT2_A) -> Self {
variant as u8 != 0
}
}
impl DWTCOMPOUT2_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> DWTCOMPOUT2_A {
match self.bits {
true => DWTCOMPOUT2_A::ACTIVE,
false => DWTCOMPOUT2_A::INACTIVE,
}
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == DWTCOMPOUT2_A::ACTIVE
}
#[doc = "Checks if the value of the field is `INACTIVE`"]
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == DWTCOMPOUT2_A::INACTIVE
}
}
#[doc = "Field `UNUSED0` reader - N/A"]
pub type UNUSED0_R = crate::BitReader<UNUSED0_A>;
#[doc = "N/A\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UNUSED0_A {
#[doc = "1: Ctitrigin 4 is active."]
ACTIVE = 1,
#[doc = "0: Ctitrigin 4 is inactive."]
INACTIVE = 0,
}
impl From<UNUSED0_A> for bool {
#[inline(always)]
fn from(variant: UNUSED0_A) -> Self {
variant as u8 != 0
}
}
impl UNUSED0_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> UNUSED0_A {
match self.bits {
true => UNUSED0_A::ACTIVE,
false => UNUSED0_A::INACTIVE,
}
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == UNUSED0_A::ACTIVE
}
#[doc = "Checks if the value of the field is `INACTIVE`"]
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == UNUSED0_A::INACTIVE
}
}
#[doc = "Field `UNUSED1` reader - N/A"]
pub type UNUSED1_R = crate::BitReader<UNUSED1_A>;
#[doc = "N/A\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UNUSED1_A {
#[doc = "1: Ctitrigin 5 is active."]
ACTIVE = 1,
#[doc = "0: Ctitrigin 5 is inactive."]
INACTIVE = 0,
}
impl From<UNUSED1_A> for bool {
#[inline(always)]
fn from(variant: UNUSED1_A) -> Self {
variant as u8 != 0
}
}
impl UNUSED1_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> UNUSED1_A {
match self.bits {
true => UNUSED1_A::ACTIVE,
false => UNUSED1_A::INACTIVE,
}
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == UNUSED1_A::ACTIVE
}
#[doc = "Checks if the value of the field is `INACTIVE`"]
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == UNUSED1_A::INACTIVE
}
}
#[doc = "Field `UNUSED2` reader - N/A"]
pub type UNUSED2_R = crate::BitReader<UNUSED2_A>;
#[doc = "N/A\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UNUSED2_A {
#[doc = "1: Ctitrigin 6 is active."]
ACTIVE = 1,
#[doc = "0: Ctitrigin 6 is inactive."]
INACTIVE = 0,
}
impl From<UNUSED2_A> for bool {
#[inline(always)]
fn from(variant: UNUSED2_A) -> Self {
variant as u8 != 0
}
}
impl UNUSED2_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> UNUSED2_A {
match self.bits {
true => UNUSED2_A::ACTIVE,
false => UNUSED2_A::INACTIVE,
}
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == UNUSED2_A::ACTIVE
}
#[doc = "Checks if the value of the field is `INACTIVE`"]
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == UNUSED2_A::INACTIVE
}
}
#[doc = "Field `UNUSED3` reader - N/A"]
pub type UNUSED3_R = crate::BitReader<UNUSED3_A>;
#[doc = "N/A\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UNUSED3_A {
#[doc = "1: Ctitrigin 7 is active."]
ACTIVE = 1,
#[doc = "0: Ctitrigin 7 is inactive."]
INACTIVE = 0,
}
impl From<UNUSED3_A> for bool {
#[inline(always)]
fn from(variant: UNUSED3_A) -> Self {
variant as u8 != 0
}
}
impl UNUSED3_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> UNUSED3_A {
match self.bits {
true => UNUSED3_A::ACTIVE,
false => UNUSED3_A::INACTIVE,
}
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == UNUSED3_A::ACTIVE
}
#[doc = "Checks if the value of the field is `INACTIVE`"]
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == UNUSED3_A::INACTIVE
}
}
impl R {
#[doc = "Bit 0 - Processor Halted"]
#[inline(always)]
pub fn cpuhalted(&self) -> CPUHALTED_R {
CPUHALTED_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - DWT Comparator Output 0"]
#[inline(always)]
pub fn dwtcompout0(&self) -> DWTCOMPOUT0_R {
DWTCOMPOUT0_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - DWT Comparator Output 1"]
#[inline(always)]
pub fn dwtcompout1(&self) -> DWTCOMPOUT1_R {
DWTCOMPOUT1_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - DWT Comparator Output 2"]
#[inline(always)]
pub fn dwtcompout2(&self) -> DWTCOMPOUT2_R {
DWTCOMPOUT2_R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bit 4 - N/A"]
#[inline(always)]
pub fn unused0(&self) -> UNUSED0_R {
UNUSED0_R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 5 - N/A"]
#[inline(always)]
pub fn unused1(&self) -> UNUSED1_R {
UNUSED1_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 6 - N/A"]
#[inline(always)]
pub fn unused2(&self) -> UNUSED2_R {
UNUSED2_R::new(((self.bits >> 6) & 1) != 0)
}
#[doc = "Bit 7 - N/A"]
#[inline(always)]
pub fn unused3(&self) -> UNUSED3_R {
UNUSED3_R::new(((self.bits >> 7) & 1) != 0)
}
}
#[doc = "CTI Trigger In Status register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ctitriginstatus](index.html) module"]
pub struct CTITRIGINSTATUS_SPEC;
impl crate::RegisterSpec for CTITRIGINSTATUS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [ctitriginstatus::R](R) reader structure"]
impl crate::Readable for CTITRIGINSTATUS_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets CTITRIGINSTATUS to value 0"]
impl crate::Resettable for CTITRIGINSTATUS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+361
View File
@@ -0,0 +1,361 @@
#[doc = "Register `CTITRIGOUTSTATUS` reader"]
pub struct R(crate::R<CTITRIGOUTSTATUS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CTITRIGOUTSTATUS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CTITRIGOUTSTATUS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CTITRIGOUTSTATUS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `DEBUGREQ` reader - Processor debug request"]
pub type DEBUGREQ_R = crate::BitReader<DEBUGREQ_A>;
#[doc = "Processor debug request\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DEBUGREQ_A {
#[doc = "1: Ctitrigout 0 is active."]
ACTIVE = 1,
#[doc = "0: Ctitrigout 0 is inactive."]
INACTIVE = 0,
}
impl From<DEBUGREQ_A> for bool {
#[inline(always)]
fn from(variant: DEBUGREQ_A) -> Self {
variant as u8 != 0
}
}
impl DEBUGREQ_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> DEBUGREQ_A {
match self.bits {
true => DEBUGREQ_A::ACTIVE,
false => DEBUGREQ_A::INACTIVE,
}
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == DEBUGREQ_A::ACTIVE
}
#[doc = "Checks if the value of the field is `INACTIVE`"]
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == DEBUGREQ_A::INACTIVE
}
}
#[doc = "Field `CPURESTART` reader - Processor Restart"]
pub type CPURESTART_R = crate::BitReader<CPURESTART_A>;
#[doc = "Processor Restart\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CPURESTART_A {
#[doc = "1: Ctitrigout 1 is active."]
ACTIVE = 1,
#[doc = "0: Ctitrigout 1 is inactive."]
INACTIVE = 0,
}
impl From<CPURESTART_A> for bool {
#[inline(always)]
fn from(variant: CPURESTART_A) -> Self {
variant as u8 != 0
}
}
impl CPURESTART_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CPURESTART_A {
match self.bits {
true => CPURESTART_A::ACTIVE,
false => CPURESTART_A::INACTIVE,
}
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == CPURESTART_A::ACTIVE
}
#[doc = "Checks if the value of the field is `INACTIVE`"]
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == CPURESTART_A::INACTIVE
}
}
#[doc = "Field `UNUSED0` reader - N/A"]
pub type UNUSED0_R = crate::BitReader<UNUSED0_A>;
#[doc = "N/A\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UNUSED0_A {
#[doc = "1: Ctitrigout 2 is active."]
ACTIVE = 1,
#[doc = "0: Ctitrigout 2 is inactive."]
INACTIVE = 0,
}
impl From<UNUSED0_A> for bool {
#[inline(always)]
fn from(variant: UNUSED0_A) -> Self {
variant as u8 != 0
}
}
impl UNUSED0_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> UNUSED0_A {
match self.bits {
true => UNUSED0_A::ACTIVE,
false => UNUSED0_A::INACTIVE,
}
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == UNUSED0_A::ACTIVE
}
#[doc = "Checks if the value of the field is `INACTIVE`"]
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == UNUSED0_A::INACTIVE
}
}
#[doc = "Field `UNUSED1` reader - N/A"]
pub type UNUSED1_R = crate::BitReader<UNUSED1_A>;
#[doc = "N/A\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UNUSED1_A {
#[doc = "1: Ctitrigout 3 is active."]
ACTIVE = 1,
#[doc = "0: Ctitrigout 3 is inactive."]
INACTIVE = 0,
}
impl From<UNUSED1_A> for bool {
#[inline(always)]
fn from(variant: UNUSED1_A) -> Self {
variant as u8 != 0
}
}
impl UNUSED1_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> UNUSED1_A {
match self.bits {
true => UNUSED1_A::ACTIVE,
false => UNUSED1_A::INACTIVE,
}
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == UNUSED1_A::ACTIVE
}
#[doc = "Checks if the value of the field is `INACTIVE`"]
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == UNUSED1_A::INACTIVE
}
}
#[doc = "Field `UNUSED2` reader - N/A"]
pub type UNUSED2_R = crate::BitReader<UNUSED2_A>;
#[doc = "N/A\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UNUSED2_A {
#[doc = "1: Ctitrigout 4 is active."]
ACTIVE = 1,
#[doc = "0: Ctitrigout 4 is inactive."]
INACTIVE = 0,
}
impl From<UNUSED2_A> for bool {
#[inline(always)]
fn from(variant: UNUSED2_A) -> Self {
variant as u8 != 0
}
}
impl UNUSED2_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> UNUSED2_A {
match self.bits {
true => UNUSED2_A::ACTIVE,
false => UNUSED2_A::INACTIVE,
}
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == UNUSED2_A::ACTIVE
}
#[doc = "Checks if the value of the field is `INACTIVE`"]
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == UNUSED2_A::INACTIVE
}
}
#[doc = "Field `UNUSED3` reader - N/A"]
pub type UNUSED3_R = crate::BitReader<UNUSED3_A>;
#[doc = "N/A\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UNUSED3_A {
#[doc = "1: Ctitrigout 5 is active."]
ACTIVE = 1,
#[doc = "0: Ctitrigout 5 is inactive."]
INACTIVE = 0,
}
impl From<UNUSED3_A> for bool {
#[inline(always)]
fn from(variant: UNUSED3_A) -> Self {
variant as u8 != 0
}
}
impl UNUSED3_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> UNUSED3_A {
match self.bits {
true => UNUSED3_A::ACTIVE,
false => UNUSED3_A::INACTIVE,
}
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == UNUSED3_A::ACTIVE
}
#[doc = "Checks if the value of the field is `INACTIVE`"]
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == UNUSED3_A::INACTIVE
}
}
#[doc = "Field `UNUSED4` reader - N/A"]
pub type UNUSED4_R = crate::BitReader<UNUSED4_A>;
#[doc = "N/A\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UNUSED4_A {
#[doc = "1: Ctitrigout 6 is active."]
ACTIVE = 1,
#[doc = "0: Ctitrigout 6 is inactive."]
INACTIVE = 0,
}
impl From<UNUSED4_A> for bool {
#[inline(always)]
fn from(variant: UNUSED4_A) -> Self {
variant as u8 != 0
}
}
impl UNUSED4_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> UNUSED4_A {
match self.bits {
true => UNUSED4_A::ACTIVE,
false => UNUSED4_A::INACTIVE,
}
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == UNUSED4_A::ACTIVE
}
#[doc = "Checks if the value of the field is `INACTIVE`"]
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == UNUSED4_A::INACTIVE
}
}
#[doc = "Field `UNUSED5` reader - N/A"]
pub type UNUSED5_R = crate::BitReader<UNUSED5_A>;
#[doc = "N/A\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UNUSED5_A {
#[doc = "1: Ctitrigout 7 is active."]
ACTIVE = 1,
#[doc = "0: Ctitrigout 7 is inactive."]
INACTIVE = 0,
}
impl From<UNUSED5_A> for bool {
#[inline(always)]
fn from(variant: UNUSED5_A) -> Self {
variant as u8 != 0
}
}
impl UNUSED5_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> UNUSED5_A {
match self.bits {
true => UNUSED5_A::ACTIVE,
false => UNUSED5_A::INACTIVE,
}
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == UNUSED5_A::ACTIVE
}
#[doc = "Checks if the value of the field is `INACTIVE`"]
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == UNUSED5_A::INACTIVE
}
}
impl R {
#[doc = "Bit 0 - Processor debug request"]
#[inline(always)]
pub fn debugreq(&self) -> DEBUGREQ_R {
DEBUGREQ_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Processor Restart"]
#[inline(always)]
pub fn cpurestart(&self) -> CPURESTART_R {
CPURESTART_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - N/A"]
#[inline(always)]
pub fn unused0(&self) -> UNUSED0_R {
UNUSED0_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - N/A"]
#[inline(always)]
pub fn unused1(&self) -> UNUSED1_R {
UNUSED1_R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bit 4 - N/A"]
#[inline(always)]
pub fn unused2(&self) -> UNUSED2_R {
UNUSED2_R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 5 - N/A"]
#[inline(always)]
pub fn unused3(&self) -> UNUSED3_R {
UNUSED3_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 6 - N/A"]
#[inline(always)]
pub fn unused4(&self) -> UNUSED4_R {
UNUSED4_R::new(((self.bits >> 6) & 1) != 0)
}
#[doc = "Bit 7 - N/A"]
#[inline(always)]
pub fn unused5(&self) -> UNUSED5_R {
UNUSED5_R::new(((self.bits >> 7) & 1) != 0)
}
}
#[doc = "CTI Trigger Out Status register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ctitrigoutstatus](index.html) module"]
pub struct CTITRIGOUTSTATUS_SPEC;
impl crate::RegisterSpec for CTITRIGOUTSTATUS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [ctitrigoutstatus::R](R) reader structure"]
impl crate::Readable for CTITRIGOUTSTATUS_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets CTITRIGOUTSTATUS to value 0"]
impl crate::Resettable for CTITRIGOUTSTATUS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+40
View File
@@ -0,0 +1,40 @@
#[doc = "Register `DEVARCH` reader"]
pub struct R(crate::R<DEVARCH_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DEVARCH_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DEVARCH_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DEVARCH_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `Architecture` reader - Contains the CTI device architecture."]
pub type ARCHITECTURE_R = crate::BitReader<bool>;
impl R {
#[doc = "Bit 0 - Contains the CTI device architecture."]
#[inline(always)]
pub fn architecture(&self) -> ARCHITECTURE_R {
ARCHITECTURE_R::new((self.bits & 1) != 0)
}
}
#[doc = "Device Architecture register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [devarch](index.html) module"]
pub struct DEVARCH_SPEC;
impl crate::RegisterSpec for DEVARCH_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [devarch::R](R) reader structure"]
impl crate::Readable for DEVARCH_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets DEVARCH to value 0x4770_1a14"]
impl crate::Resettable for DEVARCH_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x4770_1a14
}
}
+54
View File
@@ -0,0 +1,54 @@
#[doc = "Register `DEVID` reader"]
pub struct R(crate::R<DEVID_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DEVID_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DEVID_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DEVID_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `EXTMUXNUM` reader - Indicates the number of multiplexers available on Trigger Inputs and Trigger Outputs that are using asicctl. The default value of 0b00000 indicates that no multiplexing is present."]
pub type EXTMUXNUM_R = crate::FieldReader<u8, u8>;
#[doc = "Field `NUMTRIG` reader - Number of ECT triggers available."]
pub type NUMTRIG_R = crate::FieldReader<u8, u8>;
#[doc = "Field `NUMCH` reader - Number of ECT channels available."]
pub type NUMCH_R = crate::FieldReader<u8, u8>;
impl R {
#[doc = "Bits 0:4 - Indicates the number of multiplexers available on Trigger Inputs and Trigger Outputs that are using asicctl. The default value of 0b00000 indicates that no multiplexing is present."]
#[inline(always)]
pub fn extmuxnum(&self) -> EXTMUXNUM_R {
EXTMUXNUM_R::new((self.bits & 0x1f) as u8)
}
#[doc = "Bits 8:15 - Number of ECT triggers available."]
#[inline(always)]
pub fn numtrig(&self) -> NUMTRIG_R {
NUMTRIG_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 16:19 - Number of ECT channels available."]
#[inline(always)]
pub fn numch(&self) -> NUMCH_R {
NUMCH_R::new(((self.bits >> 16) & 0x0f) as u8)
}
}
#[doc = "Device Configuration register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [devid](index.html) module"]
pub struct DEVID_SPEC;
impl crate::RegisterSpec for DEVID_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [devid::R](R) reader structure"]
impl crate::Readable for DEVID_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets DEVID to value 0x0004_0800"]
impl crate::Resettable for DEVID_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x0004_0800
}
}
+103
View File
@@ -0,0 +1,103 @@
#[doc = "Register `DEVTYPE` reader"]
pub struct R(crate::R<DEVTYPE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DEVTYPE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DEVTYPE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DEVTYPE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `MAJOR` reader - Major classification of the type of the debug component as specified in the Arm Architecture Specification for this debug and trace component."]
pub type MAJOR_R = crate::FieldReader<u8, MAJOR_A>;
#[doc = "Major classification of the type of the debug component as specified in the Arm Architecture Specification for this debug and trace component.\n\nValue on reset: 4"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum MAJOR_A {
#[doc = "4: Indicates that this component allows a debugger to control other components in an Arm CoreSight SoC-400 system."]
CONTROLLER = 4,
}
impl From<MAJOR_A> for u8 {
#[inline(always)]
fn from(variant: MAJOR_A) -> Self {
variant as _
}
}
impl MAJOR_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<MAJOR_A> {
match self.bits {
4 => Some(MAJOR_A::CONTROLLER),
_ => None,
}
}
#[doc = "Checks if the value of the field is `CONTROLLER`"]
#[inline(always)]
pub fn is_controller(&self) -> bool {
*self == MAJOR_A::CONTROLLER
}
}
#[doc = "Field `SUB` reader - Sub-classification of the type of the debug component as specified in the Arm Architecture Specification within the major classification as specified in the MAJOR field."]
pub type SUB_R = crate::FieldReader<u8, SUB_A>;
#[doc = "Sub-classification of the type of the debug component as specified in the Arm Architecture Specification within the major classification as specified in the MAJOR field.\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum SUB_A {
#[doc = "1: Indicates that this component is a sub-triggering component."]
CROSSTRIGGER = 1,
}
impl From<SUB_A> for u8 {
#[inline(always)]
fn from(variant: SUB_A) -> Self {
variant as _
}
}
impl SUB_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<SUB_A> {
match self.bits {
1 => Some(SUB_A::CROSSTRIGGER),
_ => None,
}
}
#[doc = "Checks if the value of the field is `CROSSTRIGGER`"]
#[inline(always)]
pub fn is_crosstrigger(&self) -> bool {
*self == SUB_A::CROSSTRIGGER
}
}
impl R {
#[doc = "Bits 0:3 - Major classification of the type of the debug component as specified in the Arm Architecture Specification for this debug and trace component."]
#[inline(always)]
pub fn major(&self) -> MAJOR_R {
MAJOR_R::new((self.bits & 0x0f) as u8)
}
#[doc = "Bits 4:7 - Sub-classification of the type of the debug component as specified in the Arm Architecture Specification within the major classification as specified in the MAJOR field."]
#[inline(always)]
pub fn sub(&self) -> SUB_R {
SUB_R::new(((self.bits >> 4) & 0x0f) as u8)
}
}
#[doc = "Device Type Identifier register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [devtype](index.html) module"]
pub struct DEVTYPE_SPEC;
impl crate::RegisterSpec for DEVTYPE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [devtype::R](R) reader structure"]
impl crate::Readable for DEVTYPE_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets DEVTYPE to value 0x14"]
impl crate::Resettable for DEVTYPE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x14
}
}
+72
View File
@@ -0,0 +1,72 @@
#[doc = "Register `PIDR0` reader"]
pub struct R(crate::R<PIDR0_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PIDR0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PIDR0_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PIDR0_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `PART_0` reader - Bits\\[7:0\\]
of the 12-bit part number of the component. The designer of the component assigns this part number."]
pub type PART_0_R = crate::FieldReader<u8, PART_0_A>;
#[doc = "Bits\\[7:0\\]
of the 12-bit part number of the component. The designer of the component assigns this part number.\n\nValue on reset: 33"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum PART_0_A {
#[doc = "33: Indicates bits\\[7:0\\]
of the part number of the component."]
PARTNUMBER_L = 33,
}
impl From<PART_0_A> for u8 {
#[inline(always)]
fn from(variant: PART_0_A) -> Self {
variant as _
}
}
impl PART_0_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<PART_0_A> {
match self.bits {
33 => Some(PART_0_A::PARTNUMBER_L),
_ => None,
}
}
#[doc = "Checks if the value of the field is `PARTNUMBER_L`"]
#[inline(always)]
pub fn is_partnumber_l(&self) -> bool {
*self == PART_0_A::PARTNUMBER_L
}
}
impl R {
#[doc = "Bits 0:7 - Bits\\[7:0\\]
of the 12-bit part number of the component. The designer of the component assigns this part number."]
#[inline(always)]
pub fn part_0(&self) -> PART_0_R {
PART_0_R::new((self.bits & 0xff) as u8)
}
}
#[doc = "Peripheral ID0 Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [pidr0](index.html) module"]
pub struct PIDR0_SPEC;
impl crate::RegisterSpec for PIDR0_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [pidr0::R](R) reader structure"]
impl crate::Readable for PIDR0_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets PIDR0 to value 0x21"]
impl crate::Resettable for PIDR0_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x21
}
}
+108
View File
@@ -0,0 +1,108 @@
#[doc = "Register `PIDR1` reader"]
pub struct R(crate::R<PIDR1_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PIDR1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PIDR1_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PIDR1_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `PART_1` reader - Bits\\[11:8\\]
of the 12-bit part number of the component. The designer of the component assigns this part number."]
pub type PART_1_R = crate::FieldReader<u8, PART_1_A>;
#[doc = "Bits\\[11:8\\]
of the 12-bit part number of the component. The designer of the component assigns this part number.\n\nValue on reset: 13"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum PART_1_A {
#[doc = "13: Indicates bits\\[11:8\\]
of the part number of the component."]
PARTNUMBER_H = 13,
}
impl From<PART_1_A> for u8 {
#[inline(always)]
fn from(variant: PART_1_A) -> Self {
variant as _
}
}
impl PART_1_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<PART_1_A> {
match self.bits {
13 => Some(PART_1_A::PARTNUMBER_H),
_ => None,
}
}
#[doc = "Checks if the value of the field is `PARTNUMBER_H`"]
#[inline(always)]
pub fn is_partnumber_h(&self) -> bool {
*self == PART_1_A::PARTNUMBER_H
}
}
#[doc = "Field `DES_0` reader - Together, PIDR1.DES_0, PIDR2.DES_1, and PIDR4.DES_2 identify the designer of the component."]
pub type DES_0_R = crate::FieldReader<u8, DES_0_A>;
#[doc = "Together, PIDR1.DES_0, PIDR2.DES_1, and PIDR4.DES_2 identify the designer of the component.\n\nValue on reset: 11"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum DES_0_A {
#[doc = "11: Arm. Bits\\[3:0\\]
of the JEDEC JEP106 Identity Code"]
ARM = 11,
}
impl From<DES_0_A> for u8 {
#[inline(always)]
fn from(variant: DES_0_A) -> Self {
variant as _
}
}
impl DES_0_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<DES_0_A> {
match self.bits {
11 => Some(DES_0_A::ARM),
_ => None,
}
}
#[doc = "Checks if the value of the field is `ARM`"]
#[inline(always)]
pub fn is_arm(&self) -> bool {
*self == DES_0_A::ARM
}
}
impl R {
#[doc = "Bits 0:3 - Bits\\[11:8\\]
of the 12-bit part number of the component. The designer of the component assigns this part number."]
#[inline(always)]
pub fn part_1(&self) -> PART_1_R {
PART_1_R::new((self.bits & 0x0f) as u8)
}
#[doc = "Bits 4:7 - Together, PIDR1.DES_0, PIDR2.DES_1, and PIDR4.DES_2 identify the designer of the component."]
#[inline(always)]
pub fn des_0(&self) -> DES_0_R {
DES_0_R::new(((self.bits >> 4) & 0x0f) as u8)
}
}
#[doc = "Peripheral ID1 Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [pidr1](index.html) module"]
pub struct PIDR1_SPEC;
impl crate::RegisterSpec for PIDR1_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [pidr1::R](R) reader structure"]
impl crate::Readable for PIDR1_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets PIDR1 to value 0xbd"]
impl crate::Resettable for PIDR1_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xbd
}
}
+111
View File
@@ -0,0 +1,111 @@
#[doc = "Register `PIDR2` reader"]
pub struct R(crate::R<PIDR2_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PIDR2_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PIDR2_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PIDR2_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `DES_1` reader - Together, PIDR1.DES_0, PIDR2.DES_1, and PIDR4.DES_2 identify the designer of the component."]
pub type DES_1_R = crate::FieldReader<u8, DES_1_A>;
#[doc = "Together, PIDR1.DES_0, PIDR2.DES_1, and PIDR4.DES_2 identify the designer of the component.\n\nValue on reset: 3"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum DES_1_A {
#[doc = "3: Arm. Bits\\[6:4\\]
of the JEDEC JEP106 Identity Code"]
ARM = 3,
}
impl From<DES_1_A> for u8 {
#[inline(always)]
fn from(variant: DES_1_A) -> Self {
variant as _
}
}
impl DES_1_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<DES_1_A> {
match self.bits {
3 => Some(DES_1_A::ARM),
_ => None,
}
}
#[doc = "Checks if the value of the field is `ARM`"]
#[inline(always)]
pub fn is_arm(&self) -> bool {
*self == DES_1_A::ARM
}
}
#[doc = "Field `JEDEC` reader - Always 1. Indicates that the JEDEC-assigned designer ID is used."]
pub type JEDEC_R = crate::BitReader<bool>;
#[doc = "Field `REVISION` reader - Peripheral revision"]
pub type REVISION_R = crate::FieldReader<u8, REVISION_A>;
#[doc = "Peripheral revision\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum REVISION_A {
#[doc = "0: This device is at r0p0"]
REV0P0 = 0,
}
impl From<REVISION_A> for u8 {
#[inline(always)]
fn from(variant: REVISION_A) -> Self {
variant as _
}
}
impl REVISION_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<REVISION_A> {
match self.bits {
0 => Some(REVISION_A::REV0P0),
_ => None,
}
}
#[doc = "Checks if the value of the field is `REV0P0`"]
#[inline(always)]
pub fn is_rev0p0(&self) -> bool {
*self == REVISION_A::REV0P0
}
}
impl R {
#[doc = "Bits 0:2 - Together, PIDR1.DES_0, PIDR2.DES_1, and PIDR4.DES_2 identify the designer of the component."]
#[inline(always)]
pub fn des_1(&self) -> DES_1_R {
DES_1_R::new((self.bits & 7) as u8)
}
#[doc = "Bit 3 - Always 1. Indicates that the JEDEC-assigned designer ID is used."]
#[inline(always)]
pub fn jedec(&self) -> JEDEC_R {
JEDEC_R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bits 4:7 - Peripheral revision"]
#[inline(always)]
pub fn revision(&self) -> REVISION_R {
REVISION_R::new(((self.bits >> 4) & 0x0f) as u8)
}
}
#[doc = "Peripheral ID2 Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [pidr2](index.html) module"]
pub struct PIDR2_SPEC;
impl crate::RegisterSpec for PIDR2_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [pidr2::R](R) reader structure"]
impl crate::Readable for PIDR2_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets PIDR2 to value 0x0b"]
impl crate::Resettable for PIDR2_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x0b
}
}
+103
View File
@@ -0,0 +1,103 @@
#[doc = "Register `PIDR3` reader"]
pub struct R(crate::R<PIDR3_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PIDR3_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PIDR3_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PIDR3_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `CMOD` reader - Customer Modified. Indicates whether the customer has modified the behavior of the component. In most cases, this field is 0b0000. Customers change this value when they make authorized modifications to this component."]
pub type CMOD_R = crate::FieldReader<u8, CMOD_A>;
#[doc = "Customer Modified. Indicates whether the customer has modified the behavior of the component. In most cases, this field is 0b0000. Customers change this value when they make authorized modifications to this component.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum CMOD_A {
#[doc = "0: Indicates that the customer has not modified this component."]
UNMODIFIED = 0,
}
impl From<CMOD_A> for u8 {
#[inline(always)]
fn from(variant: CMOD_A) -> Self {
variant as _
}
}
impl CMOD_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<CMOD_A> {
match self.bits {
0 => Some(CMOD_A::UNMODIFIED),
_ => None,
}
}
#[doc = "Checks if the value of the field is `UNMODIFIED`"]
#[inline(always)]
pub fn is_unmodified(&self) -> bool {
*self == CMOD_A::UNMODIFIED
}
}
#[doc = "Field `REVAND` reader - Indicates minor errata fixes specific to the revision of the component being used, for example metal fixes after implementation. In most cases, this field is 0b0000. Arm recommends that the component designers ensure that a metal fix can change this field if required, for example, by driving it from registers that reset to 0b0000."]
pub type REVAND_R = crate::FieldReader<u8, REVAND_A>;
#[doc = "Indicates minor errata fixes specific to the revision of the component being used, for example metal fixes after implementation. In most cases, this field is 0b0000. Arm recommends that the component designers ensure that a metal fix can change this field if required, for example, by driving it from registers that reset to 0b0000.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum REVAND_A {
#[doc = "0: Indicates that there are no errata fixes to this component."]
NO_ERRATA = 0,
}
impl From<REVAND_A> for u8 {
#[inline(always)]
fn from(variant: REVAND_A) -> Self {
variant as _
}
}
impl REVAND_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<REVAND_A> {
match self.bits {
0 => Some(REVAND_A::NO_ERRATA),
_ => None,
}
}
#[doc = "Checks if the value of the field is `NO_ERRATA`"]
#[inline(always)]
pub fn is_no_errata(&self) -> bool {
*self == REVAND_A::NO_ERRATA
}
}
impl R {
#[doc = "Bits 0:3 - Customer Modified. Indicates whether the customer has modified the behavior of the component. In most cases, this field is 0b0000. Customers change this value when they make authorized modifications to this component."]
#[inline(always)]
pub fn cmod(&self) -> CMOD_R {
CMOD_R::new((self.bits & 0x0f) as u8)
}
#[doc = "Bits 4:7 - Indicates minor errata fixes specific to the revision of the component being used, for example metal fixes after implementation. In most cases, this field is 0b0000. Arm recommends that the component designers ensure that a metal fix can change this field if required, for example, by driving it from registers that reset to 0b0000."]
#[inline(always)]
pub fn revand(&self) -> REVAND_R {
REVAND_R::new(((self.bits >> 4) & 0x0f) as u8)
}
}
#[doc = "Peripheral ID3 Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [pidr3](index.html) module"]
pub struct PIDR3_SPEC;
impl crate::RegisterSpec for PIDR3_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [pidr3::R](R) reader structure"]
impl crate::Readable for PIDR3_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets PIDR3 to value 0"]
impl crate::Resettable for PIDR3_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+75
View File
@@ -0,0 +1,75 @@
#[doc = "Register `PIDR4` reader"]
pub struct R(crate::R<PIDR4_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PIDR4_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PIDR4_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PIDR4_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `DES_2` reader - Together, PIDR1.DES_0, PIDR2.DES_1, and PIDR4.DES_2 identify the designer of the component."]
pub type DES_2_R = crate::FieldReader<u8, DES_2_A>;
#[doc = "Together, PIDR1.DES_0, PIDR2.DES_1, and PIDR4.DES_2 identify the designer of the component.\n\nValue on reset: 4"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum DES_2_A {
#[doc = "4: JEDEC continuation code."]
CODE = 4,
}
impl From<DES_2_A> for u8 {
#[inline(always)]
fn from(variant: DES_2_A) -> Self {
variant as _
}
}
impl DES_2_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<DES_2_A> {
match self.bits {
4 => Some(DES_2_A::CODE),
_ => None,
}
}
#[doc = "Checks if the value of the field is `CODE`"]
#[inline(always)]
pub fn is_code(&self) -> bool {
*self == DES_2_A::CODE
}
}
#[doc = "Field `SIZE` reader - Always 0b0000. Indicates that the device only occupies 4KB of memory."]
pub type SIZE_R = crate::FieldReader<u8, u8>;
impl R {
#[doc = "Bits 0:3 - Together, PIDR1.DES_0, PIDR2.DES_1, and PIDR4.DES_2 identify the designer of the component."]
#[inline(always)]
pub fn des_2(&self) -> DES_2_R {
DES_2_R::new((self.bits & 0x0f) as u8)
}
#[doc = "Bits 4:7 - Always 0b0000. Indicates that the device only occupies 4KB of memory."]
#[inline(always)]
pub fn size(&self) -> SIZE_R {
SIZE_R::new(((self.bits >> 4) & 0x0f) as u8)
}
}
#[doc = "Peripheral ID4 Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [pidr4](index.html) module"]
pub struct PIDR4_SPEC;
impl crate::RegisterSpec for PIDR4_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [pidr4::R](R) reader structure"]
impl crate::Readable for PIDR4_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets PIDR4 to value 0x04"]
impl crate::Resettable for PIDR4_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x04
}
}
+31
View File
@@ -0,0 +1,31 @@
#[doc = "Register `PIDR5` reader"]
pub struct R(crate::R<PIDR5_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PIDR5_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PIDR5_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PIDR5_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Peripheral ID5 register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [pidr5](index.html) module"]
pub struct PIDR5_SPEC;
impl crate::RegisterSpec for PIDR5_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [pidr5::R](R) reader structure"]
impl crate::Readable for PIDR5_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets PIDR5 to value 0"]
impl crate::Resettable for PIDR5_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+31
View File
@@ -0,0 +1,31 @@
#[doc = "Register `PIDR6` reader"]
pub struct R(crate::R<PIDR6_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PIDR6_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PIDR6_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PIDR6_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Peripheral ID6 register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [pidr6](index.html) module"]
pub struct PIDR6_SPEC;
impl crate::RegisterSpec for PIDR6_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [pidr6::R](R) reader structure"]
impl crate::Readable for PIDR6_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets PIDR6 to value 0"]
impl crate::Resettable for PIDR6_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+31
View File
@@ -0,0 +1,31 @@
#[doc = "Register `PIDR7` reader"]
pub struct R(crate::R<PIDR7_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PIDR7_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PIDR7_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PIDR7_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Peripheral ID7 register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [pidr7](index.html) module"]
pub struct PIDR7_SPEC;
impl crate::RegisterSpec for PIDR7_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [pidr7::R](R) reader structure"]
impl crate::Readable for PIDR7_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets PIDR7 to value 0"]
impl crate::Resettable for PIDR7_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}