diff options
Diffstat (limited to 'src/pac')
| -rw-r--r-- | src/pac/evctrl.rs | 112 | ||||
| -rw-r--r-- | src/pac/intenclr.rs | 112 | ||||
| -rw-r--r-- | src/pac/intenset.rs | 112 | ||||
| -rw-r--r-- | src/pac/intflaga.rs | 664 | ||||
| -rw-r--r-- | src/pac/intflagahb.rs | 480 | ||||
| -rw-r--r-- | src/pac/intflagb.rs | 342 | ||||
| -rw-r--r-- | src/pac/intflagc.rs | 1170 | ||||
| -rw-r--r-- | src/pac/intflagd.rs | 296 | ||||
| -rw-r--r-- | src/pac/statusa.rs | 280 | ||||
| -rw-r--r-- | src/pac/statusb.rs | 147 | ||||
| -rw-r--r-- | src/pac/statusc.rs | 489 | ||||
| -rw-r--r-- | src/pac/statusd.rs | 128 | ||||
| -rw-r--r-- | src/pac/wrctrl.rs | 213 |
13 files changed, 4545 insertions, 0 deletions
diff --git a/src/pac/evctrl.rs b/src/pac/evctrl.rs new file mode 100644 index 0000000..d4cef29 --- /dev/null +++ b/src/pac/evctrl.rs @@ -0,0 +1,112 @@ +#[doc = "Register `EVCTRL` reader"] +pub struct R(crate::R<EVCTRL_SPEC>); +impl core::ops::Deref for R { + type Target = crate::R<EVCTRL_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl From<crate::R<EVCTRL_SPEC>> for R { + #[inline(always)] + fn from(reader: crate::R<EVCTRL_SPEC>) -> Self { + R(reader) + } +} +#[doc = "Register `EVCTRL` writer"] +pub struct W(crate::W<EVCTRL_SPEC>); +impl core::ops::Deref for W { + type Target = crate::W<EVCTRL_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<EVCTRL_SPEC>> for W { + #[inline(always)] + fn from(writer: crate::W<EVCTRL_SPEC>) -> Self { + W(writer) + } +} +#[doc = "Field `ERREO` reader - Peripheral acess error event output"] +pub struct ERREO_R(crate::FieldReader<bool, bool>); +impl ERREO_R { + pub(crate) fn new(bits: bool) -> Self { + ERREO_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for ERREO_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `ERREO` writer - Peripheral acess error event output"] +pub struct ERREO_W<'a> { + w: &'a mut W, +} +impl<'a> ERREO_W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !0x01) | (value as u8 & 0x01); + self.w + } +} +impl R { + #[doc = "Bit 0 - Peripheral acess error event output"] + #[inline(always)] + pub fn erreo(&self) -> ERREO_R { + ERREO_R::new((self.bits & 0x01) != 0) + } +} +impl W { + #[doc = "Bit 0 - Peripheral acess error event output"] + #[inline(always)] + pub fn erreo(&mut self) -> ERREO_W { + ERREO_W { w: self } + } + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u8) -> &mut Self { + self.0.bits(bits); + self + } +} +#[doc = "Event control\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 [evctrl](index.html) module"] +pub struct EVCTRL_SPEC; +impl crate::RegisterSpec for EVCTRL_SPEC { + type Ux = u8; +} +#[doc = "`read()` method returns [evctrl::R](R) reader structure"] +impl crate::Readable for EVCTRL_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [evctrl::W](W) writer structure"] +impl crate::Writable for EVCTRL_SPEC { + type Writer = W; +} +#[doc = "`reset()` method sets EVCTRL to value 0"] +impl crate::Resettable for EVCTRL_SPEC { + #[inline(always)] + fn reset_value() -> Self::Ux { + 0 + } +} diff --git a/src/pac/intenclr.rs b/src/pac/intenclr.rs new file mode 100644 index 0000000..0f515a1 --- /dev/null +++ b/src/pac/intenclr.rs @@ -0,0 +1,112 @@ +#[doc = "Register `INTENCLR` reader"] +pub struct R(crate::R<INTENCLR_SPEC>); +impl core::ops::Deref for R { + type Target = crate::R<INTENCLR_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl From<crate::R<INTENCLR_SPEC>> for R { + #[inline(always)] + fn from(reader: crate::R<INTENCLR_SPEC>) -> Self { + R(reader) + } +} +#[doc = "Register `INTENCLR` writer"] +pub struct W(crate::W<INTENCLR_SPEC>); +impl core::ops::Deref for W { + type Target = crate::W<INTENCLR_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<INTENCLR_SPEC>> for W { + #[inline(always)] + fn from(writer: crate::W<INTENCLR_SPEC>) -> Self { + W(writer) + } +} +#[doc = "Field `ERR` reader - Peripheral access error interrupt disable"] +pub struct ERR_R(crate::FieldReader<bool, bool>); +impl ERR_R { + pub(crate) fn new(bits: bool) -> Self { + ERR_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for ERR_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `ERR` writer - Peripheral access error interrupt disable"] +pub struct ERR_W<'a> { + w: &'a mut W, +} +impl<'a> ERR_W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !0x01) | (value as u8 & 0x01); + self.w + } +} +impl R { + #[doc = "Bit 0 - Peripheral access error interrupt disable"] + #[inline(always)] + pub fn err(&self) -> ERR_R { + ERR_R::new((self.bits & 0x01) != 0) + } +} +impl W { + #[doc = "Bit 0 - Peripheral access error interrupt disable"] + #[inline(always)] + pub fn err(&mut self) -> ERR_W { + ERR_W { w: self } + } + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u8) -> &mut Self { + self.0.bits(bits); + self + } +} +#[doc = "Interrupt enable clear\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u8; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + #[inline(always)] + fn reset_value() -> Self::Ux { + 0 + } +} diff --git a/src/pac/intenset.rs b/src/pac/intenset.rs new file mode 100644 index 0000000..dc118ea --- /dev/null +++ b/src/pac/intenset.rs @@ -0,0 +1,112 @@ +#[doc = "Register `INTENSET` reader"] +pub struct R(crate::R<INTENSET_SPEC>); +impl core::ops::Deref for R { + type Target = crate::R<INTENSET_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl From<crate::R<INTENSET_SPEC>> for R { + #[inline(always)] + fn from(reader: crate::R<INTENSET_SPEC>) -> Self { + R(reader) + } +} +#[doc = "Register `INTENSET` writer"] +pub struct W(crate::W<INTENSET_SPEC>); +impl core::ops::Deref for W { + type Target = crate::W<INTENSET_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<INTENSET_SPEC>> for W { + #[inline(always)] + fn from(writer: crate::W<INTENSET_SPEC>) -> Self { + W(writer) + } +} +#[doc = "Field `ERR` reader - Peripheral access error interrupt enable"] +pub struct ERR_R(crate::FieldReader<bool, bool>); +impl ERR_R { + pub(crate) fn new(bits: bool) -> Self { + ERR_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for ERR_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `ERR` writer - Peripheral access error interrupt enable"] +pub struct ERR_W<'a> { + w: &'a mut W, +} +impl<'a> ERR_W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !0x01) | (value as u8 & 0x01); + self.w + } +} +impl R { + #[doc = "Bit 0 - Peripheral access error interrupt enable"] + #[inline(always)] + pub fn err(&self) -> ERR_R { + ERR_R::new((self.bits & 0x01) != 0) + } +} +impl W { + #[doc = "Bit 0 - Peripheral access error interrupt enable"] + #[inline(always)] + pub fn err(&mut self) -> ERR_W { + ERR_W { w: self } + } + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u8) -> &mut Self { + self.0.bits(bits); + self + } +} +#[doc = "Interrupt enable set\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u8; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + #[inline(always)] + fn reset_value() -> Self::Ux { + 0 + } +} diff --git a/src/pac/intflaga.rs b/src/pac/intflaga.rs new file mode 100644 index 0000000..6846661 --- /dev/null +++ b/src/pac/intflaga.rs @@ -0,0 +1,664 @@ +#[doc = "Register `INTFLAGA` reader"] +pub struct R(crate::R<INTFLAGA_SPEC>); +impl core::ops::Deref for R { + type Target = crate::R<INTFLAGA_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl From<crate::R<INTFLAGA_SPEC>> for R { + #[inline(always)] + fn from(reader: crate::R<INTFLAGA_SPEC>) -> Self { + R(reader) + } +} +#[doc = "Register `INTFLAGA` writer"] +pub struct W(crate::W<INTFLAGA_SPEC>); +impl core::ops::Deref for W { + type Target = crate::W<INTFLAGA_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<INTFLAGA_SPEC>> for W { + #[inline(always)] + fn from(writer: crate::W<INTFLAGA_SPEC>) -> Self { + W(writer) + } +} +#[doc = "Field `PAC_` reader - PAC"] +pub struct PAC__R(crate::FieldReader<bool, bool>); +impl PAC__R { + pub(crate) fn new(bits: bool) -> Self { + PAC__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for PAC__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `PAC_` writer - PAC"] +pub struct PAC__W<'a> { + w: &'a mut W, +} +impl<'a> PAC__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); + self.w + } +} +#[doc = "Field `PM_` reader - PM"] +pub struct PM__R(crate::FieldReader<bool, bool>); +impl PM__R { + pub(crate) fn new(bits: bool) -> Self { + PM__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for PM__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `PM_` writer - PM"] +pub struct PM__W<'a> { + w: &'a mut W, +} +impl<'a> PM__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); + self.w + } +} +#[doc = "Field `MCLK_` reader - MCLK"] +pub struct MCLK__R(crate::FieldReader<bool, bool>); +impl MCLK__R { + pub(crate) fn new(bits: bool) -> Self { + MCLK__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for MCLK__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `MCLK_` writer - MCLK"] +pub struct MCLK__W<'a> { + w: &'a mut W, +} +impl<'a> MCLK__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); + self.w + } +} +#[doc = "Field `RSTC_` reader - RSTC"] +pub struct RSTC__R(crate::FieldReader<bool, bool>); +impl RSTC__R { + pub(crate) fn new(bits: bool) -> Self { + RSTC__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for RSTC__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `RSTC_` writer - RSTC"] +pub struct RSTC__W<'a> { + w: &'a mut W, +} +impl<'a> RSTC__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); + self.w + } +} +#[doc = "Field `OSCCTRL_` reader - OSCCTRL"] +pub struct OSCCTRL__R(crate::FieldReader<bool, bool>); +impl OSCCTRL__R { + pub(crate) fn new(bits: bool) -> Self { + OSCCTRL__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for OSCCTRL__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `OSCCTRL_` writer - OSCCTRL"] +pub struct OSCCTRL__W<'a> { + w: &'a mut W, +} +impl<'a> OSCCTRL__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); + self.w + } +} +#[doc = "Field `OSC32KCTRL_` reader - OSC32KCTRL"] +pub struct OSC32KCTRL__R(crate::FieldReader<bool, bool>); +impl OSC32KCTRL__R { + pub(crate) fn new(bits: bool) -> Self { + OSC32KCTRL__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for OSC32KCTRL__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `OSC32KCTRL_` writer - OSC32KCTRL"] +pub struct OSC32KCTRL__W<'a> { + w: &'a mut W, +} +impl<'a> OSC32KCTRL__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); + self.w + } +} +#[doc = "Field `SUPC_` reader - SUPC"] +pub struct SUPC__R(crate::FieldReader<bool, bool>); +impl SUPC__R { + pub(crate) fn new(bits: bool) -> Self { + SUPC__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for SUPC__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `SUPC_` writer - SUPC"] +pub struct SUPC__W<'a> { + w: &'a mut W, +} +impl<'a> SUPC__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); + self.w + } +} +#[doc = "Field `GCLK_` reader - GCLK"] +pub struct GCLK__R(crate::FieldReader<bool, bool>); +impl GCLK__R { + pub(crate) fn new(bits: bool) -> Self { + GCLK__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for GCLK__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `GCLK_` writer - GCLK"] +pub struct GCLK__W<'a> { + w: &'a mut W, +} +impl<'a> GCLK__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); + self.w + } +} +#[doc = "Field `WDT_` reader - WDT"] +pub struct WDT__R(crate::FieldReader<bool, bool>); +impl WDT__R { + pub(crate) fn new(bits: bool) -> Self { + WDT__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for WDT__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `WDT_` writer - WDT"] +pub struct WDT__W<'a> { + w: &'a mut W, +} +impl<'a> WDT__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); + self.w + } +} +#[doc = "Field `RTC_` reader - RTC"] +pub struct RTC__R(crate::FieldReader<bool, bool>); +impl RTC__R { + pub(crate) fn new(bits: bool) -> Self { + RTC__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for RTC__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `RTC_` writer - RTC"] +pub struct RTC__W<'a> { + w: &'a mut W, +} +impl<'a> RTC__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); + self.w + } +} +#[doc = "Field `EIC_` reader - EIC"] +pub struct EIC__R(crate::FieldReader<bool, bool>); +impl EIC__R { + pub(crate) fn new(bits: bool) -> Self { + EIC__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for EIC__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `EIC_` writer - EIC"] +pub struct EIC__W<'a> { + w: &'a mut W, +} +impl<'a> EIC__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); + self.w + } +} +#[doc = "Field `FREQM_` reader - FREQM"] +pub struct FREQM__R(crate::FieldReader<bool, bool>); +impl FREQM__R { + pub(crate) fn new(bits: bool) -> Self { + FREQM__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for FREQM__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `FREQM_` writer - FREQM"] +pub struct FREQM__W<'a> { + w: &'a mut W, +} +impl<'a> FREQM__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); + self.w + } +} +#[doc = "Field `TSENS_` reader - TSENS"] +pub struct TSENS__R(crate::FieldReader<bool, bool>); +impl TSENS__R { + pub(crate) fn new(bits: bool) -> Self { + TSENS__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TSENS__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TSENS_` writer - TSENS"] +pub struct TSENS__W<'a> { + w: &'a mut W, +} +impl<'a> TSENS__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); + self.w + } +} +impl R { + #[doc = "Bit 0 - PAC"] + #[inline(always)] + pub fn pac_(&self) -> PAC__R { + PAC__R::new((self.bits & 0x01) != 0) + } + #[doc = "Bit 1 - PM"] + #[inline(always)] + pub fn pm_(&self) -> PM__R { + PM__R::new(((self.bits >> 1) & 0x01) != 0) + } + #[doc = "Bit 2 - MCLK"] + #[inline(always)] + pub fn mclk_(&self) -> MCLK__R { + MCLK__R::new(((self.bits >> 2) & 0x01) != 0) + } + #[doc = "Bit 3 - RSTC"] + #[inline(always)] + pub fn rstc_(&self) -> RSTC__R { + RSTC__R::new(((self.bits >> 3) & 0x01) != 0) + } + #[doc = "Bit 4 - OSCCTRL"] + #[inline(always)] + pub fn oscctrl_(&self) -> OSCCTRL__R { + OSCCTRL__R::new(((self.bits >> 4) & 0x01) != 0) + } + #[doc = "Bit 5 - OSC32KCTRL"] + #[inline(always)] + pub fn osc32kctrl_(&self) -> OSC32KCTRL__R { + OSC32KCTRL__R::new(((self.bits >> 5) & 0x01) != 0) + } + #[doc = "Bit 6 - SUPC"] + #[inline(always)] + pub fn supc_(&self) -> SUPC__R { + SUPC__R::new(((self.bits >> 6) & 0x01) != 0) + } + #[doc = "Bit 7 - GCLK"] + #[inline(always)] + pub fn gclk_(&self) -> GCLK__R { + GCLK__R::new(((self.bits >> 7) & 0x01) != 0) + } + #[doc = "Bit 8 - WDT"] + #[inline(always)] + pub fn wdt_(&self) -> WDT__R { + WDT__R::new(((self.bits >> 8) & 0x01) != 0) + } + #[doc = "Bit 9 - RTC"] + #[inline(always)] + pub fn rtc_(&self) -> RTC__R { + RTC__R::new(((self.bits >> 9) & 0x01) != 0) + } + #[doc = "Bit 10 - EIC"] + #[inline(always)] + pub fn eic_(&self) -> EIC__R { + EIC__R::new(((self.bits >> 10) & 0x01) != 0) + } + #[doc = "Bit 11 - FREQM"] + #[inline(always)] + pub fn freqm_(&self) -> FREQM__R { + FREQM__R::new(((self.bits >> 11) & 0x01) != 0) + } + #[doc = "Bit 12 - TSENS"] + #[inline(always)] + pub fn tsens_(&self) -> TSENS__R { + TSENS__R::new(((self.bits >> 12) & 0x01) != 0) + } +} +impl W { + #[doc = "Bit 0 - PAC"] + #[inline(always)] + pub fn pac_(&mut self) -> PAC__W { + PAC__W { w: self } + } + #[doc = "Bit 1 - PM"] + #[inline(always)] + pub fn pm_(&mut self) -> PM__W { + PM__W { w: self } + } + #[doc = "Bit 2 - MCLK"] + #[inline(always)] + pub fn mclk_(&mut self) -> MCLK__W { + MCLK__W { w: self } + } + #[doc = "Bit 3 - RSTC"] + #[inline(always)] + pub fn rstc_(&mut self) -> RSTC__W { + RSTC__W { w: self } + } + #[doc = "Bit 4 - OSCCTRL"] + #[inline(always)] + pub fn oscctrl_(&mut self) -> OSCCTRL__W { + OSCCTRL__W { w: self } + } + #[doc = "Bit 5 - OSC32KCTRL"] + #[inline(always)] + pub fn osc32kctrl_(&mut self) -> OSC32KCTRL__W { + OSC32KCTRL__W { w: self } + } + #[doc = "Bit 6 - SUPC"] + #[inline(always)] + pub fn supc_(&mut self) -> SUPC__W { + SUPC__W { w: self } + } + #[doc = "Bit 7 - GCLK"] + #[inline(always)] + pub fn gclk_(&mut self) -> GCLK__W { + GCLK__W { w: self } + } + #[doc = "Bit 8 - WDT"] + #[inline(always)] + pub fn wdt_(&mut self) -> WDT__W { + WDT__W { w: self } + } + #[doc = "Bit 9 - RTC"] + #[inline(always)] + pub fn rtc_(&mut self) -> RTC__W { + RTC__W { w: self } + } + #[doc = "Bit 10 - EIC"] + #[inline(always)] + pub fn eic_(&mut self) -> EIC__W { + EIC__W { w: self } + } + #[doc = "Bit 11 - FREQM"] + #[inline(always)] + pub fn freqm_(&mut self) -> FREQM__W { + FREQM__W { w: self } + } + #[doc = "Bit 12 - TSENS"] + #[inline(always)] + pub fn tsens_(&mut self) -> TSENS__W { + TSENS__W { w: 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 = "Peripheral interrupt flag status - Bridge A\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 [intflaga](index.html) module"] +pub struct INTFLAGA_SPEC; +impl crate::RegisterSpec for INTFLAGA_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intflaga::R](R) reader structure"] +impl crate::Readable for INTFLAGA_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intflaga::W](W) writer structure"] +impl crate::Writable for INTFLAGA_SPEC { + type Writer = W; +} +#[doc = "`reset()` method sets INTFLAGA to value 0"] +impl crate::Resettable for INTFLAGA_SPEC { + #[inline(always)] + fn reset_value() -> Self::Ux { + 0 + } +} diff --git a/src/pac/intflagahb.rs b/src/pac/intflagahb.rs new file mode 100644 index 0000000..99f32e7 --- /dev/null +++ b/src/pac/intflagahb.rs @@ -0,0 +1,480 @@ +#[doc = "Register `INTFLAGAHB` reader"] +pub struct R(crate::R<INTFLAGAHB_SPEC>); +impl core::ops::Deref for R { + type Target = crate::R<INTFLAGAHB_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl From<crate::R<INTFLAGAHB_SPEC>> for R { + #[inline(always)] + fn from(reader: crate::R<INTFLAGAHB_SPEC>) -> Self { + R(reader) + } +} +#[doc = "Register `INTFLAGAHB` writer"] +pub struct W(crate::W<INTFLAGAHB_SPEC>); +impl core::ops::Deref for W { + type Target = crate::W<INTFLAGAHB_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<INTFLAGAHB_SPEC>> for W { + #[inline(always)] + fn from(writer: crate::W<INTFLAGAHB_SPEC>) -> Self { + W(writer) + } +} +#[doc = "Field `FLASH_` reader - FLASH"] +pub struct FLASH__R(crate::FieldReader<bool, bool>); +impl FLASH__R { + pub(crate) fn new(bits: bool) -> Self { + FLASH__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for FLASH__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `FLASH_` writer - FLASH"] +pub struct FLASH__W<'a> { + w: &'a mut W, +} +impl<'a> FLASH__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); + self.w + } +} +#[doc = "Field `HSRAMCM0P_` reader - HSRAMCM0P"] +pub struct HSRAMCM0P__R(crate::FieldReader<bool, bool>); +impl HSRAMCM0P__R { + pub(crate) fn new(bits: bool) -> Self { + HSRAMCM0P__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for HSRAMCM0P__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `HSRAMCM0P_` writer - HSRAMCM0P"] +pub struct HSRAMCM0P__W<'a> { + w: &'a mut W, +} +impl<'a> HSRAMCM0P__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); + self.w + } +} +#[doc = "Field `HSRAMDSU_` reader - HSRAMDSU"] +pub struct HSRAMDSU__R(crate::FieldReader<bool, bool>); +impl HSRAMDSU__R { + pub(crate) fn new(bits: bool) -> Self { + HSRAMDSU__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for HSRAMDSU__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `HSRAMDSU_` writer - HSRAMDSU"] +pub struct HSRAMDSU__W<'a> { + w: &'a mut W, +} +impl<'a> HSRAMDSU__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); + self.w + } +} +#[doc = "Field `HPB1_` reader - HPB1"] +pub struct HPB1__R(crate::FieldReader<bool, bool>); +impl HPB1__R { + pub(crate) fn new(bits: bool) -> Self { + HPB1__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for HPB1__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `HPB1_` writer - HPB1"] +pub struct HPB1__W<'a> { + w: &'a mut W, +} +impl<'a> HPB1__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); + self.w + } +} +#[doc = "Field `HPB0_` reader - HPB0"] +pub struct HPB0__R(crate::FieldReader<bool, bool>); +impl HPB0__R { + pub(crate) fn new(bits: bool) -> Self { + HPB0__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for HPB0__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `HPB0_` writer - HPB0"] +pub struct HPB0__W<'a> { + w: &'a mut W, +} +impl<'a> HPB0__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); + self.w + } +} +#[doc = "Field `HPB2_` reader - HPB2"] +pub struct HPB2__R(crate::FieldReader<bool, bool>); +impl HPB2__R { + pub(crate) fn new(bits: bool) -> Self { + HPB2__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for HPB2__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `HPB2_` writer - HPB2"] +pub struct HPB2__W<'a> { + w: &'a mut W, +} +impl<'a> HPB2__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); + self.w + } +} +#[doc = "Field `LPRAMDMAC_` reader - LPRAMDMAC"] +pub struct LPRAMDMAC__R(crate::FieldReader<bool, bool>); +impl LPRAMDMAC__R { + pub(crate) fn new(bits: bool) -> Self { + LPRAMDMAC__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for LPRAMDMAC__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `LPRAMDMAC_` writer - LPRAMDMAC"] +pub struct LPRAMDMAC__W<'a> { + w: &'a mut W, +} +impl<'a> LPRAMDMAC__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); + self.w + } +} +#[doc = "Field `DIVAS_` reader - DIVAS"] +pub struct DIVAS__R(crate::FieldReader<bool, bool>); +impl DIVAS__R { + pub(crate) fn new(bits: bool) -> Self { + DIVAS__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for DIVAS__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `DIVAS_` writer - DIVAS"] +pub struct DIVAS__W<'a> { + w: &'a mut W, +} +impl<'a> DIVAS__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); + self.w + } +} +#[doc = "Field `HPB3_` reader - HPB3"] +pub struct HPB3__R(crate::FieldReader<bool, bool>); +impl HPB3__R { + pub(crate) fn new(bits: bool) -> Self { + HPB3__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for HPB3__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `HPB3_` writer - HPB3"] +pub struct HPB3__W<'a> { + w: &'a mut W, +} +impl<'a> HPB3__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); + self.w + } +} +impl R { + #[doc = "Bit 0 - FLASH"] + #[inline(always)] + pub fn flash_(&self) -> FLASH__R { + FLASH__R::new((self.bits & 0x01) != 0) + } + #[doc = "Bit 1 - HSRAMCM0P"] + #[inline(always)] + pub fn hsramcm0p_(&self) -> HSRAMCM0P__R { + HSRAMCM0P__R::new(((self.bits >> 1) & 0x01) != 0) + } + #[doc = "Bit 2 - HSRAMDSU"] + #[inline(always)] + pub fn hsramdsu_(&self) -> HSRAMDSU__R { + HSRAMDSU__R::new(((self.bits >> 2) & 0x01) != 0) + } + #[doc = "Bit 3 - HPB1"] + #[inline(always)] + pub fn hpb1_(&self) -> HPB1__R { + HPB1__R::new(((self.bits >> 3) & 0x01) != 0) + } + #[doc = "Bit 4 - HPB0"] + #[inline(always)] + pub fn hpb0_(&self) -> HPB0__R { + HPB0__R::new(((self.bits >> 4) & 0x01) != 0) + } + #[doc = "Bit 5 - HPB2"] + #[inline(always)] + pub fn hpb2_(&self) -> HPB2__R { + HPB2__R::new(((self.bits >> 5) & 0x01) != 0) + } + #[doc = "Bit 6 - LPRAMDMAC"] + #[inline(always)] + pub fn lpramdmac_(&self) -> LPRAMDMAC__R { + LPRAMDMAC__R::new(((self.bits >> 6) & 0x01) != 0) + } + #[doc = "Bit 7 - DIVAS"] + #[inline(always)] + pub fn divas_(&self) -> DIVAS__R { + DIVAS__R::new(((self.bits >> 7) & 0x01) != 0) + } + #[doc = "Bit 8 - HPB3"] + #[inline(always)] + pub fn hpb3_(&self) -> HPB3__R { + HPB3__R::new(((self.bits >> 8) & 0x01) != 0) + } +} +impl W { + #[doc = "Bit 0 - FLASH"] + #[inline(always)] + pub fn flash_(&mut self) -> FLASH__W { + FLASH__W { w: self } + } + #[doc = "Bit 1 - HSRAMCM0P"] + #[inline(always)] + pub fn hsramcm0p_(&mut self) -> HSRAMCM0P__W { + HSRAMCM0P__W { w: self } + } + #[doc = "Bit 2 - HSRAMDSU"] + #[inline(always)] + pub fn hsramdsu_(&mut self) -> HSRAMDSU__W { + HSRAMDSU__W { w: self } + } + #[doc = "Bit 3 - HPB1"] + #[inline(always)] + pub fn hpb1_(&mut self) -> HPB1__W { + HPB1__W { w: self } + } + #[doc = "Bit 4 - HPB0"] + #[inline(always)] + pub fn hpb0_(&mut self) -> HPB0__W { + HPB0__W { w: self } + } + #[doc = "Bit 5 - HPB2"] + #[inline(always)] + pub fn hpb2_(&mut self) -> HPB2__W { + HPB2__W { w: self } + } + #[doc = "Bit 6 - LPRAMDMAC"] + #[inline(always)] + pub fn lpramdmac_(&mut self) -> LPRAMDMAC__W { + LPRAMDMAC__W { w: self } + } + #[doc = "Bit 7 - DIVAS"] + #[inline(always)] + pub fn divas_(&mut self) -> DIVAS__W { + DIVAS__W { w: self } + } + #[doc = "Bit 8 - HPB3"] + #[inline(always)] + pub fn hpb3_(&mut self) -> HPB3__W { + HPB3__W { w: 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 = "Bridge interrupt flag status\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 [intflagahb](index.html) module"] +pub struct INTFLAGAHB_SPEC; +impl crate::RegisterSpec for INTFLAGAHB_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intflagahb::R](R) reader structure"] +impl crate::Readable for INTFLAGAHB_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intflagahb::W](W) writer structure"] +impl crate::Writable for INTFLAGAHB_SPEC { + type Writer = W; +} +#[doc = "`reset()` method sets INTFLAGAHB to value 0"] +impl crate::Resettable for INTFLAGAHB_SPEC { + #[inline(always)] + fn reset_value() -> Self::Ux { + 0 + } +} diff --git a/src/pac/intflagb.rs b/src/pac/intflagb.rs new file mode 100644 index 0000000..786f5e9 --- /dev/null +++ b/src/pac/intflagb.rs @@ -0,0 +1,342 @@ +#[doc = "Register `INTFLAGB` reader"] +pub struct R(crate::R<INTFLAGB_SPEC>); +impl core::ops::Deref for R { + type Target = crate::R<INTFLAGB_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl From<crate::R<INTFLAGB_SPEC>> for R { + #[inline(always)] + fn from(reader: crate::R<INTFLAGB_SPEC>) -> Self { + R(reader) + } +} +#[doc = "Register `INTFLAGB` writer"] +pub struct W(crate::W<INTFLAGB_SPEC>); +impl core::ops::Deref for W { + type Target = crate::W<INTFLAGB_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<INTFLAGB_SPEC>> for W { + #[inline(always)] + fn from(writer: crate::W<INTFLAGB_SPEC>) -> Self { + W(writer) + } +} +#[doc = "Field `PORT_` reader - PORT"] +pub struct PORT__R(crate::FieldReader<bool, bool>); +impl PORT__R { + pub(crate) fn new(bits: bool) -> Self { + PORT__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for PORT__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `PORT_` writer - PORT"] +pub struct PORT__W<'a> { + w: &'a mut W, +} +impl<'a> PORT__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); + self.w + } +} +#[doc = "Field `DSU_` reader - DSU"] +pub struct DSU__R(crate::FieldReader<bool, bool>); +impl DSU__R { + pub(crate) fn new(bits: bool) -> Self { + DSU__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for DSU__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `DSU_` writer - DSU"] +pub struct DSU__W<'a> { + w: &'a mut W, +} +impl<'a> DSU__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); + self.w + } +} +#[doc = "Field `NVMCTRL_` reader - NVMCTRL"] +pub struct NVMCTRL__R(crate::FieldReader<bool, bool>); +impl NVMCTRL__R { + pub(crate) fn new(bits: bool) -> Self { + NVMCTRL__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for NVMCTRL__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `NVMCTRL_` writer - NVMCTRL"] +pub struct NVMCTRL__W<'a> { + w: &'a mut W, +} +impl<'a> NVMCTRL__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); + self.w + } +} +#[doc = "Field `DMAC_` reader - DMAC"] +pub struct DMAC__R(crate::FieldReader<bool, bool>); +impl DMAC__R { + pub(crate) fn new(bits: bool) -> Self { + DMAC__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for DMAC__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `DMAC_` writer - DMAC"] +pub struct DMAC__W<'a> { + w: &'a mut W, +} +impl<'a> DMAC__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); + self.w + } +} +#[doc = "Field `MTB_` reader - MTB"] +pub struct MTB__R(crate::FieldReader<bool, bool>); +impl MTB__R { + pub(crate) fn new(bits: bool) -> Self { + MTB__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for MTB__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `MTB_` writer - MTB"] +pub struct MTB__W<'a> { + w: &'a mut W, +} +impl<'a> MTB__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); + self.w + } +} +#[doc = "Field `HMATRIXHS_` reader - HMATRIXHS"] +pub struct HMATRIXHS__R(crate::FieldReader<bool, bool>); +impl HMATRIXHS__R { + pub(crate) fn new(bits: bool) -> Self { + HMATRIXHS__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for HMATRIXHS__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `HMATRIXHS_` writer - HMATRIXHS"] +pub struct HMATRIXHS__W<'a> { + w: &'a mut W, +} +impl<'a> HMATRIXHS__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); + self.w + } +} +impl R { + #[doc = "Bit 0 - PORT"] + #[inline(always)] + pub fn port_(&self) -> PORT__R { + PORT__R::new((self.bits & 0x01) != 0) + } + #[doc = "Bit 1 - DSU"] + #[inline(always)] + pub fn dsu_(&self) -> DSU__R { + DSU__R::new(((self.bits >> 1) & 0x01) != 0) + } + #[doc = "Bit 2 - NVMCTRL"] + #[inline(always)] + pub fn nvmctrl_(&self) -> NVMCTRL__R { + NVMCTRL__R::new(((self.bits >> 2) & 0x01) != 0) + } + #[doc = "Bit 3 - DMAC"] + #[inline(always)] + pub fn dmac_(&self) -> DMAC__R { + DMAC__R::new(((self.bits >> 3) & 0x01) != 0) + } + #[doc = "Bit 4 - MTB"] + #[inline(always)] + pub fn mtb_(&self) -> MTB__R { + MTB__R::new(((self.bits >> 4) & 0x01) != 0) + } + #[doc = "Bit 5 - HMATRIXHS"] + #[inline(always)] + pub fn hmatrixhs_(&self) -> HMATRIXHS__R { + HMATRIXHS__R::new(((self.bits >> 5) & 0x01) != 0) + } +} +impl W { + #[doc = "Bit 0 - PORT"] + #[inline(always)] + pub fn port_(&mut self) -> PORT__W { + PORT__W { w: self } + } + #[doc = "Bit 1 - DSU"] + #[inline(always)] + pub fn dsu_(&mut self) -> DSU__W { + DSU__W { w: self } + } + #[doc = "Bit 2 - NVMCTRL"] + #[inline(always)] + pub fn nvmctrl_(&mut self) -> NVMCTRL__W { + NVMCTRL__W { w: self } + } + #[doc = "Bit 3 - DMAC"] + #[inline(always)] + pub fn dmac_(&mut self) -> DMAC__W { + DMAC__W { w: self } + } + #[doc = "Bit 4 - MTB"] + #[inline(always)] + pub fn mtb_(&mut self) -> MTB__W { + MTB__W { w: self } + } + #[doc = "Bit 5 - HMATRIXHS"] + #[inline(always)] + pub fn hmatrixhs_(&mut self) -> HMATRIXHS__W { + HMATRIXHS__W { w: 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 = "Peripheral interrupt flag status - Bridge B\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 [intflagb](index.html) module"] +pub struct INTFLAGB_SPEC; +impl crate::RegisterSpec for INTFLAGB_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intflagb::R](R) reader structure"] +impl crate::Readable for INTFLAGB_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intflagb::W](W) writer structure"] +impl crate::Writable for INTFLAGB_SPEC { + type Writer = W; +} +#[doc = "`reset()` method sets INTFLAGB to value 0"] +impl crate::Resettable for INTFLAGB_SPEC { + #[inline(always)] + fn reset_value() -> Self::Ux { + 0 + } +} diff --git a/src/pac/intflagc.rs b/src/pac/intflagc.rs new file mode 100644 index 0000000..53dcfb4 --- /dev/null +++ b/src/pac/intflagc.rs @@ -0,0 +1,1170 @@ +#[doc = "Register `INTFLAGC` reader"] +pub struct R(crate::R<INTFLAGC_SPEC>); +impl core::ops::Deref for R { + type Target = crate::R<INTFLAGC_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl From<crate::R<INTFLAGC_SPEC>> for R { + #[inline(always)] + fn from(reader: crate::R<INTFLAGC_SPEC>) -> Self { + R(reader) + } +} +#[doc = "Register `INTFLAGC` writer"] +pub struct W(crate::W<INTFLAGC_SPEC>); +impl core::ops::Deref for W { + type Target = crate::W<INTFLAGC_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<INTFLAGC_SPEC>> for W { + #[inline(always)] + fn from(writer: crate::W<INTFLAGC_SPEC>) -> Self { + W(writer) + } +} +#[doc = "Field `EVSYS_` reader - EVSYS"] +pub struct EVSYS__R(crate::FieldReader<bool, bool>); +impl EVSYS__R { + pub(crate) fn new(bits: bool) -> Self { + EVSYS__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for EVSYS__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `EVSYS_` writer - EVSYS"] +pub struct EVSYS__W<'a> { + w: &'a mut W, +} +impl<'a> EVSYS__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); + self.w + } +} +#[doc = "Field `SERCOM0_` reader - SERCOM0"] +pub struct SERCOM0__R(crate::FieldReader<bool, bool>); +impl SERCOM0__R { + pub(crate) fn new(bits: bool) -> Self { + SERCOM0__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for SERCOM0__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `SERCOM0_` writer - SERCOM0"] +pub struct SERCOM0__W<'a> { + w: &'a mut W, +} +impl<'a> SERCOM0__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); + self.w + } +} +#[doc = "Field `SERCOM1_` reader - SERCOM1"] +pub struct SERCOM1__R(crate::FieldReader<bool, bool>); +impl SERCOM1__R { + pub(crate) fn new(bits: bool) -> Self { + SERCOM1__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for SERCOM1__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `SERCOM1_` writer - SERCOM1"] +pub struct SERCOM1__W<'a> { + w: &'a mut W, +} +impl<'a> SERCOM1__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); + self.w + } +} +#[doc = "Field `SERCOM2_` reader - SERCOM2"] +pub struct SERCOM2__R(crate::FieldReader<bool, bool>); +impl SERCOM2__R { + pub(crate) fn new(bits: bool) -> Self { + SERCOM2__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for SERCOM2__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `SERCOM2_` writer - SERCOM2"] +pub struct SERCOM2__W<'a> { + w: &'a mut W, +} +impl<'a> SERCOM2__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); + self.w + } +} +#[doc = "Field `SERCOM3_` reader - SERCOM3"] +pub struct SERCOM3__R(crate::FieldReader<bool, bool>); +impl SERCOM3__R { + pub(crate) fn new(bits: bool) -> Self { + SERCOM3__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for SERCOM3__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `SERCOM3_` writer - SERCOM3"] +pub struct SERCOM3__W<'a> { + w: &'a mut W, +} +impl<'a> SERCOM3__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); + self.w + } +} +#[doc = "Field `SERCOM4_` reader - SERCOM4"] +pub struct SERCOM4__R(crate::FieldReader<bool, bool>); +impl SERCOM4__R { + pub(crate) fn new(bits: bool) -> Self { + SERCOM4__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for SERCOM4__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `SERCOM4_` writer - SERCOM4"] +pub struct SERCOM4__W<'a> { + w: &'a mut W, +} +impl<'a> SERCOM4__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); + self.w + } +} +#[doc = "Field `SERCOM5_` reader - SERCOM5"] +pub struct SERCOM5__R(crate::FieldReader<bool, bool>); +impl SERCOM5__R { + pub(crate) fn new(bits: bool) -> Self { + SERCOM5__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for SERCOM5__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `SERCOM5_` writer - SERCOM5"] +pub struct SERCOM5__W<'a> { + w: &'a mut W, +} +impl<'a> SERCOM5__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); + self.w + } +} +#[doc = "Field `CAN0_` reader - CAN0"] +pub struct CAN0__R(crate::FieldReader<bool, bool>); +impl CAN0__R { + pub(crate) fn new(bits: bool) -> Self { + CAN0__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for CAN0__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `CAN0_` writer - CAN0"] +pub struct CAN0__W<'a> { + w: &'a mut W, +} +impl<'a> CAN0__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); + self.w + } +} +#[doc = "Field `CAN1_` reader - CAN1"] +pub struct CAN1__R(crate::FieldReader<bool, bool>); +impl CAN1__R { + pub(crate) fn new(bits: bool) -> Self { + CAN1__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for CAN1__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `CAN1_` writer - CAN1"] +pub struct CAN1__W<'a> { + w: &'a mut W, +} +impl<'a> CAN1__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); + self.w + } +} +#[doc = "Field `TCC0_` reader - TCC0"] +pub struct TCC0__R(crate::FieldReader<bool, bool>); +impl TCC0__R { + pub(crate) fn new(bits: bool) -> Self { + TCC0__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TCC0__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TCC0_` writer - TCC0"] +pub struct TCC0__W<'a> { + w: &'a mut W, +} +impl<'a> TCC0__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); + self.w + } +} +#[doc = "Field `TCC1_` reader - TCC1"] +pub struct TCC1__R(crate::FieldReader<bool, bool>); +impl TCC1__R { + pub(crate) fn new(bits: bool) -> Self { + TCC1__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TCC1__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TCC1_` writer - TCC1"] +pub struct TCC1__W<'a> { + w: &'a mut W, +} +impl<'a> TCC1__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); + self.w + } +} +#[doc = "Field `TCC2_` reader - TCC2"] +pub struct TCC2__R(crate::FieldReader<bool, bool>); +impl TCC2__R { + pub(crate) fn new(bits: bool) -> Self { + TCC2__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TCC2__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TCC2_` writer - TCC2"] +pub struct TCC2__W<'a> { + w: &'a mut W, +} +impl<'a> TCC2__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); + self.w + } +} +#[doc = "Field `TC0_` reader - TC0"] +pub struct TC0__R(crate::FieldReader<bool, bool>); +impl TC0__R { + pub(crate) fn new(bits: bool) -> Self { + TC0__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TC0__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TC0_` writer - TC0"] +pub struct TC0__W<'a> { + w: &'a mut W, +} +impl<'a> TC0__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); + self.w + } +} +#[doc = "Field `TC1_` reader - TC1"] +pub struct TC1__R(crate::FieldReader<bool, bool>); +impl TC1__R { + pub(crate) fn new(bits: bool) -> Self { + TC1__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TC1__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TC1_` writer - TC1"] +pub struct TC1__W<'a> { + w: &'a mut W, +} +impl<'a> TC1__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); + self.w + } +} +#[doc = "Field `TC2_` reader - TC2"] +pub struct TC2__R(crate::FieldReader<bool, bool>); +impl TC2__R { + pub(crate) fn new(bits: bool) -> Self { + TC2__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TC2__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TC2_` writer - TC2"] +pub struct TC2__W<'a> { + w: &'a mut W, +} +impl<'a> TC2__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); + self.w + } +} +#[doc = "Field `TC3_` reader - TC3"] +pub struct TC3__R(crate::FieldReader<bool, bool>); +impl TC3__R { + pub(crate) fn new(bits: bool) -> Self { + TC3__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TC3__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TC3_` writer - TC3"] +pub struct TC3__W<'a> { + w: &'a mut W, +} +impl<'a> TC3__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); + self.w + } +} +#[doc = "Field `TC4_` reader - TC4"] +pub struct TC4__R(crate::FieldReader<bool, bool>); +impl TC4__R { + pub(crate) fn new(bits: bool) -> Self { + TC4__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TC4__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TC4_` writer - TC4"] +pub struct TC4__W<'a> { + w: &'a mut W, +} +impl<'a> TC4__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); + self.w + } +} +#[doc = "Field `ADC0_` reader - ADC0"] +pub struct ADC0__R(crate::FieldReader<bool, bool>); +impl ADC0__R { + pub(crate) fn new(bits: bool) -> Self { + ADC0__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for ADC0__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `ADC0_` writer - ADC0"] +pub struct ADC0__W<'a> { + w: &'a mut W, +} +impl<'a> ADC0__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); + self.w + } +} +#[doc = "Field `ADC1_` reader - ADC1"] +pub struct ADC1__R(crate::FieldReader<bool, bool>); +impl ADC1__R { + pub(crate) fn new(bits: bool) -> Self { + ADC1__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for ADC1__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `ADC1_` writer - ADC1"] +pub struct ADC1__W<'a> { + w: &'a mut W, +} +impl<'a> ADC1__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); + self.w + } +} +#[doc = "Field `SDADC_` reader - SDADC"] +pub struct SDADC__R(crate::FieldReader<bool, bool>); +impl SDADC__R { + pub(crate) fn new(bits: bool) -> Self { + SDADC__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for SDADC__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `SDADC_` writer - SDADC"] +pub struct SDADC__W<'a> { + w: &'a mut W, +} +impl<'a> SDADC__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); + self.w + } +} +#[doc = "Field `AC_` reader - AC"] +pub struct AC__R(crate::FieldReader<bool, bool>); +impl AC__R { + pub(crate) fn new(bits: bool) -> Self { + AC__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for AC__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `AC_` writer - AC"] +pub struct AC__W<'a> { + w: &'a mut W, +} +impl<'a> AC__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); + self.w + } +} +#[doc = "Field `DAC_` reader - DAC"] +pub struct DAC__R(crate::FieldReader<bool, bool>); +impl DAC__R { + pub(crate) fn new(bits: bool) -> Self { + DAC__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for DAC__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `DAC_` writer - DAC"] +pub struct DAC__W<'a> { + w: &'a mut W, +} +impl<'a> DAC__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); + self.w + } +} +#[doc = "Field `PTC_` reader - PTC"] +pub struct PTC__R(crate::FieldReader<bool, bool>); +impl PTC__R { + pub(crate) fn new(bits: bool) -> Self { + PTC__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for PTC__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `PTC_` writer - PTC"] +pub struct PTC__W<'a> { + w: &'a mut W, +} +impl<'a> PTC__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22); + self.w + } +} +#[doc = "Field `CCL_` reader - CCL"] +pub struct CCL__R(crate::FieldReader<bool, bool>); +impl CCL__R { + pub(crate) fn new(bits: bool) -> Self { + CCL__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for CCL__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `CCL_` writer - CCL"] +pub struct CCL__W<'a> { + w: &'a mut W, +} +impl<'a> CCL__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); + self.w + } +} +impl R { + #[doc = "Bit 0 - EVSYS"] + #[inline(always)] + pub fn evsys_(&self) -> EVSYS__R { + EVSYS__R::new((self.bits & 0x01) != 0) + } + #[doc = "Bit 1 - SERCOM0"] + #[inline(always)] + pub fn sercom0_(&self) -> SERCOM0__R { + SERCOM0__R::new(((self.bits >> 1) & 0x01) != 0) + } + #[doc = "Bit 2 - SERCOM1"] + #[inline(always)] + pub fn sercom1_(&self) -> SERCOM1__R { + SERCOM1__R::new(((self.bits >> 2) & 0x01) != 0) + } + #[doc = "Bit 3 - SERCOM2"] + #[inline(always)] + pub fn sercom2_(&self) -> SERCOM2__R { + SERCOM2__R::new(((self.bits >> 3) & 0x01) != 0) + } + #[doc = "Bit 4 - SERCOM3"] + #[inline(always)] + pub fn sercom3_(&self) -> SERCOM3__R { + SERCOM3__R::new(((self.bits >> 4) & 0x01) != 0) + } + #[doc = "Bit 5 - SERCOM4"] + #[inline(always)] + pub fn sercom4_(&self) -> SERCOM4__R { + SERCOM4__R::new(((self.bits >> 5) & 0x01) != 0) + } + #[doc = "Bit 6 - SERCOM5"] + #[inline(always)] + pub fn sercom5_(&self) -> SERCOM5__R { + SERCOM5__R::new(((self.bits >> 6) & 0x01) != 0) + } + #[doc = "Bit 7 - CAN0"] + #[inline(always)] + pub fn can0_(&self) -> CAN0__R { + CAN0__R::new(((self.bits >> 7) & 0x01) != 0) + } + #[doc = "Bit 8 - CAN1"] + #[inline(always)] + pub fn can1_(&self) -> CAN1__R { + CAN1__R::new(((self.bits >> 8) & 0x01) != 0) + } + #[doc = "Bit 9 - TCC0"] + #[inline(always)] + pub fn tcc0_(&self) -> TCC0__R { + TCC0__R::new(((self.bits >> 9) & 0x01) != 0) + } + #[doc = "Bit 10 - TCC1"] + #[inline(always)] + pub fn tcc1_(&self) -> TCC1__R { + TCC1__R::new(((self.bits >> 10) & 0x01) != 0) + } + #[doc = "Bit 11 - TCC2"] + #[inline(always)] + pub fn tcc2_(&self) -> TCC2__R { + TCC2__R::new(((self.bits >> 11) & 0x01) != 0) + } + #[doc = "Bit 12 - TC0"] + #[inline(always)] + pub fn tc0_(&self) -> TC0__R { + TC0__R::new(((self.bits >> 12) & 0x01) != 0) + } + #[doc = "Bit 13 - TC1"] + #[inline(always)] + pub fn tc1_(&self) -> TC1__R { + TC1__R::new(((self.bits >> 13) & 0x01) != 0) + } + #[doc = "Bit 14 - TC2"] + #[inline(always)] + pub fn tc2_(&self) -> TC2__R { + TC2__R::new(((self.bits >> 14) & 0x01) != 0) + } + #[doc = "Bit 15 - TC3"] + #[inline(always)] + pub fn tc3_(&self) -> TC3__R { + TC3__R::new(((self.bits >> 15) & 0x01) != 0) + } + #[doc = "Bit 16 - TC4"] + #[inline(always)] + pub fn tc4_(&self) -> TC4__R { + TC4__R::new(((self.bits >> 16) & 0x01) != 0) + } + #[doc = "Bit 17 - ADC0"] + #[inline(always)] + pub fn adc0_(&self) -> ADC0__R { + ADC0__R::new(((self.bits >> 17) & 0x01) != 0) + } + #[doc = "Bit 18 - ADC1"] + #[inline(always)] + pub fn adc1_(&self) -> ADC1__R { + ADC1__R::new(((self.bits >> 18) & 0x01) != 0) + } + #[doc = "Bit 19 - SDADC"] + #[inline(always)] + pub fn sdadc_(&self) -> SDADC__R { + SDADC__R::new(((self.bits >> 19) & 0x01) != 0) + } + #[doc = "Bit 20 - AC"] + #[inline(always)] + pub fn ac_(&self) -> AC__R { + AC__R::new(((self.bits >> 20) & 0x01) != 0) + } + #[doc = "Bit 21 - DAC"] + #[inline(always)] + pub fn dac_(&self) -> DAC__R { + DAC__R::new(((self.bits >> 21) & 0x01) != 0) + } + #[doc = "Bit 22 - PTC"] + #[inline(always)] + pub fn ptc_(&self) -> PTC__R { + PTC__R::new(((self.bits >> 22) & 0x01) != 0) + } + #[doc = "Bit 23 - CCL"] + #[inline(always)] + pub fn ccl_(&self) -> CCL__R { + CCL__R::new(((self.bits >> 23) & 0x01) != 0) + } +} +impl W { + #[doc = "Bit 0 - EVSYS"] + #[inline(always)] + pub fn evsys_(&mut self) -> EVSYS__W { + EVSYS__W { w: self } + } + #[doc = "Bit 1 - SERCOM0"] + #[inline(always)] + pub fn sercom0_(&mut self) -> SERCOM0__W { + SERCOM0__W { w: self } + } + #[doc = "Bit 2 - SERCOM1"] + #[inline(always)] + pub fn sercom1_(&mut self) -> SERCOM1__W { + SERCOM1__W { w: self } + } + #[doc = "Bit 3 - SERCOM2"] + #[inline(always)] + pub fn sercom2_(&mut self) -> SERCOM2__W { + SERCOM2__W { w: self } + } + #[doc = "Bit 4 - SERCOM3"] + #[inline(always)] + pub fn sercom3_(&mut self) -> SERCOM3__W { + SERCOM3__W { w: self } + } + #[doc = "Bit 5 - SERCOM4"] + #[inline(always)] + pub fn sercom4_(&mut self) -> SERCOM4__W { + SERCOM4__W { w: self } + } + #[doc = "Bit 6 - SERCOM5"] + #[inline(always)] + pub fn sercom5_(&mut self) -> SERCOM5__W { + SERCOM5__W { w: self } + } + #[doc = "Bit 7 - CAN0"] + #[inline(always)] + pub fn can0_(&mut self) -> CAN0__W { + CAN0__W { w: self } + } + #[doc = "Bit 8 - CAN1"] + #[inline(always)] + pub fn can1_(&mut self) -> CAN1__W { + CAN1__W { w: self } + } + #[doc = "Bit 9 - TCC0"] + #[inline(always)] + pub fn tcc0_(&mut self) -> TCC0__W { + TCC0__W { w: self } + } + #[doc = "Bit 10 - TCC1"] + #[inline(always)] + pub fn tcc1_(&mut self) -> TCC1__W { + TCC1__W { w: self } + } + #[doc = "Bit 11 - TCC2"] + #[inline(always)] + pub fn tcc2_(&mut self) -> TCC2__W { + TCC2__W { w: self } + } + #[doc = "Bit 12 - TC0"] + #[inline(always)] + pub fn tc0_(&mut self) -> TC0__W { + TC0__W { w: self } + } + #[doc = "Bit 13 - TC1"] + #[inline(always)] + pub fn tc1_(&mut self) -> TC1__W { + TC1__W { w: self } + } + #[doc = "Bit 14 - TC2"] + #[inline(always)] + pub fn tc2_(&mut self) -> TC2__W { + TC2__W { w: self } + } + #[doc = "Bit 15 - TC3"] + #[inline(always)] + pub fn tc3_(&mut self) -> TC3__W { + TC3__W { w: self } + } + #[doc = "Bit 16 - TC4"] + #[inline(always)] + pub fn tc4_(&mut self) -> TC4__W { + TC4__W { w: self } + } + #[doc = "Bit 17 - ADC0"] + #[inline(always)] + pub fn adc0_(&mut self) -> ADC0__W { + ADC0__W { w: self } + } + #[doc = "Bit 18 - ADC1"] + #[inline(always)] + pub fn adc1_(&mut self) -> ADC1__W { + ADC1__W { w: self } + } + #[doc = "Bit 19 - SDADC"] + #[inline(always)] + pub fn sdadc_(&mut self) -> SDADC__W { + SDADC__W { w: self } + } + #[doc = "Bit 20 - AC"] + #[inline(always)] + pub fn ac_(&mut self) -> AC__W { + AC__W { w: self } + } + #[doc = "Bit 21 - DAC"] + #[inline(always)] + pub fn dac_(&mut self) -> DAC__W { + DAC__W { w: self } + } + #[doc = "Bit 22 - PTC"] + #[inline(always)] + pub fn ptc_(&mut self) -> PTC__W { + PTC__W { w: self } + } + #[doc = "Bit 23 - CCL"] + #[inline(always)] + pub fn ccl_(&mut self) -> CCL__W { + CCL__W { w: 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 = "Peripheral interrupt flag status - Bridge C\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 [intflagc](index.html) module"] +pub struct INTFLAGC_SPEC; +impl crate::RegisterSpec for INTFLAGC_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intflagc::R](R) reader structure"] +impl crate::Readable for INTFLAGC_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intflagc::W](W) writer structure"] +impl crate::Writable for INTFLAGC_SPEC { + type Writer = W; +} +#[doc = "`reset()` method sets INTFLAGC to value 0"] +impl crate::Resettable for INTFLAGC_SPEC { + #[inline(always)] + fn reset_value() -> Self::Ux { + 0 + } +} diff --git a/src/pac/intflagd.rs b/src/pac/intflagd.rs new file mode 100644 index 0000000..afe02ac --- /dev/null +++ b/src/pac/intflagd.rs @@ -0,0 +1,296 @@ +#[doc = "Register `INTFLAGD` reader"] +pub struct R(crate::R<INTFLAGD_SPEC>); +impl core::ops::Deref for R { + type Target = crate::R<INTFLAGD_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl From<crate::R<INTFLAGD_SPEC>> for R { + #[inline(always)] + fn from(reader: crate::R<INTFLAGD_SPEC>) -> Self { + R(reader) + } +} +#[doc = "Register `INTFLAGD` writer"] +pub struct W(crate::W<INTFLAGD_SPEC>); +impl core::ops::Deref for W { + type Target = crate::W<INTFLAGD_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<INTFLAGD_SPEC>> for W { + #[inline(always)] + fn from(writer: crate::W<INTFLAGD_SPEC>) -> Self { + W(writer) + } +} +#[doc = "Field `SERCOM6_` reader - SERCOM6"] +pub struct SERCOM6__R(crate::FieldReader<bool, bool>); +impl SERCOM6__R { + pub(crate) fn new(bits: bool) -> Self { + SERCOM6__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for SERCOM6__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `SERCOM6_` writer - SERCOM6"] +pub struct SERCOM6__W<'a> { + w: &'a mut W, +} +impl<'a> SERCOM6__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); + self.w + } +} +#[doc = "Field `SERCOM7_` reader - SERCOM7"] +pub struct SERCOM7__R(crate::FieldReader<bool, bool>); +impl SERCOM7__R { + pub(crate) fn new(bits: bool) -> Self { + SERCOM7__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for SERCOM7__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `SERCOM7_` writer - SERCOM7"] +pub struct SERCOM7__W<'a> { + w: &'a mut W, +} +impl<'a> SERCOM7__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); + self.w + } +} +#[doc = "Field `TC5_` reader - TC5"] +pub struct TC5__R(crate::FieldReader<bool, bool>); +impl TC5__R { + pub(crate) fn new(bits: bool) -> Self { + TC5__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TC5__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TC5_` writer - TC5"] +pub struct TC5__W<'a> { + w: &'a mut W, +} +impl<'a> TC5__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); + self.w + } +} +#[doc = "Field `TC6_` reader - TC6"] +pub struct TC6__R(crate::FieldReader<bool, bool>); +impl TC6__R { + pub(crate) fn new(bits: bool) -> Self { + TC6__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TC6__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TC6_` writer - TC6"] +pub struct TC6__W<'a> { + w: &'a mut W, +} +impl<'a> TC6__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); + self.w + } +} +#[doc = "Field `TC7_` reader - TC7"] +pub struct TC7__R(crate::FieldReader<bool, bool>); +impl TC7__R { + pub(crate) fn new(bits: bool) -> Self { + TC7__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TC7__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TC7_` writer - TC7"] +pub struct TC7__W<'a> { + w: &'a mut W, +} +impl<'a> TC7__W<'a> { + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); + self.w + } +} +impl R { + #[doc = "Bit 0 - SERCOM6"] + #[inline(always)] + pub fn sercom6_(&self) -> SERCOM6__R { + SERCOM6__R::new((self.bits & 0x01) != 0) + } + #[doc = "Bit 1 - SERCOM7"] + #[inline(always)] + pub fn sercom7_(&self) -> SERCOM7__R { + SERCOM7__R::new(((self.bits >> 1) & 0x01) != 0) + } + #[doc = "Bit 2 - TC5"] + #[inline(always)] + pub fn tc5_(&self) -> TC5__R { + TC5__R::new(((self.bits >> 2) & 0x01) != 0) + } + #[doc = "Bit 3 - TC6"] + #[inline(always)] + pub fn tc6_(&self) -> TC6__R { + TC6__R::new(((self.bits >> 3) & 0x01) != 0) + } + #[doc = "Bit 4 - TC7"] + #[inline(always)] + pub fn tc7_(&self) -> TC7__R { + TC7__R::new(((self.bits >> 4) & 0x01) != 0) + } +} +impl W { + #[doc = "Bit 0 - SERCOM6"] + #[inline(always)] + pub fn sercom6_(&mut self) -> SERCOM6__W { + SERCOM6__W { w: self } + } + #[doc = "Bit 1 - SERCOM7"] + #[inline(always)] + pub fn sercom7_(&mut self) -> SERCOM7__W { + SERCOM7__W { w: self } + } + #[doc = "Bit 2 - TC5"] + #[inline(always)] + pub fn tc5_(&mut self) -> TC5__W { + TC5__W { w: self } + } + #[doc = "Bit 3 - TC6"] + #[inline(always)] + pub fn tc6_(&mut self) -> TC6__W { + TC6__W { w: self } + } + #[doc = "Bit 4 - TC7"] + #[inline(always)] + pub fn tc7_(&mut self) -> TC7__W { + TC7__W { w: 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 = "Peripheral interrupt flag status - Bridge D\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 [intflagd](index.html) module"] +pub struct INTFLAGD_SPEC; +impl crate::RegisterSpec for INTFLAGD_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intflagd::R](R) reader structure"] +impl crate::Readable for INTFLAGD_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intflagd::W](W) writer structure"] +impl crate::Writable for INTFLAGD_SPEC { + type Writer = W; +} +#[doc = "`reset()` method sets INTFLAGD to value 0"] +impl crate::Resettable for INTFLAGD_SPEC { + #[inline(always)] + fn reset_value() -> Self::Ux { + 0 + } +} diff --git a/src/pac/statusa.rs b/src/pac/statusa.rs new file mode 100644 index 0000000..508c41f --- /dev/null +++ b/src/pac/statusa.rs @@ -0,0 +1,280 @@ +#[doc = "Register `STATUSA` reader"] +pub struct R(crate::R<STATUSA_SPEC>); +impl core::ops::Deref for R { + type Target = crate::R<STATUSA_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl From<crate::R<STATUSA_SPEC>> for R { + #[inline(always)] + fn from(reader: crate::R<STATUSA_SPEC>) -> Self { + R(reader) + } +} +#[doc = "Field `PAC_` reader - PAC APB Protect Enable"] +pub struct PAC__R(crate::FieldReader<bool, bool>); +impl PAC__R { + pub(crate) fn new(bits: bool) -> Self { + PAC__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for PAC__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `PM_` reader - PM APB Protect Enable"] +pub struct PM__R(crate::FieldReader<bool, bool>); +impl PM__R { + pub(crate) fn new(bits: bool) -> Self { + PM__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for PM__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `MCLK_` reader - MCLK APB Protect Enable"] +pub struct MCLK__R(crate::FieldReader<bool, bool>); +impl MCLK__R { + pub(crate) fn new(bits: bool) -> Self { + MCLK__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for MCLK__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `RSTC_` reader - RSTC APB Protect Enable"] +pub struct RSTC__R(crate::FieldReader<bool, bool>); +impl RSTC__R { + pub(crate) fn new(bits: bool) -> Self { + RSTC__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for RSTC__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `OSCCTRL_` reader - OSCCTRL APB Protect Enable"] +pub struct OSCCTRL__R(crate::FieldReader<bool, bool>); +impl OSCCTRL__R { + pub(crate) fn new(bits: bool) -> Self { + OSCCTRL__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for OSCCTRL__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `OSC32KCTRL_` reader - OSC32KCTRL APB Protect Enable"] +pub struct OSC32KCTRL__R(crate::FieldReader<bool, bool>); +impl OSC32KCTRL__R { + pub(crate) fn new(bits: bool) -> Self { + OSC32KCTRL__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for OSC32KCTRL__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `SUPC_` reader - SUPC APB Protect Enable"] +pub struct SUPC__R(crate::FieldReader<bool, bool>); +impl SUPC__R { + pub(crate) fn new(bits: bool) -> Self { + SUPC__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for SUPC__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `GCLK_` reader - GCLK APB Protect Enable"] +pub struct GCLK__R(crate::FieldReader<bool, bool>); +impl GCLK__R { + pub(crate) fn new(bits: bool) -> Self { + GCLK__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for GCLK__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `WDT_` reader - WDT APB Protect Enable"] +pub struct WDT__R(crate::FieldReader<bool, bool>); +impl WDT__R { + pub(crate) fn new(bits: bool) -> Self { + WDT__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for WDT__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `RTC_` reader - RTC APB Protect Enable"] +pub struct RTC__R(crate::FieldReader<bool, bool>); +impl RTC__R { + pub(crate) fn new(bits: bool) -> Self { + RTC__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for RTC__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `EIC_` reader - EIC APB Protect Enable"] +pub struct EIC__R(crate::FieldReader<bool, bool>); +impl EIC__R { + pub(crate) fn new(bits: bool) -> Self { + EIC__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for EIC__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `FREQM_` reader - FREQM APB Protect Enable"] +pub struct FREQM__R(crate::FieldReader<bool, bool>); +impl FREQM__R { + pub(crate) fn new(bits: bool) -> Self { + FREQM__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for FREQM__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TSENS_` reader - TSENS APB Protect Enable"] +pub struct TSENS__R(crate::FieldReader<bool, bool>); +impl TSENS__R { + pub(crate) fn new(bits: bool) -> Self { + TSENS__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TSENS__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl R { + #[doc = "Bit 0 - PAC APB Protect Enable"] + #[inline(always)] + pub fn pac_(&self) -> PAC__R { + PAC__R::new((self.bits & 0x01) != 0) + } + #[doc = "Bit 1 - PM APB Protect Enable"] + #[inline(always)] + pub fn pm_(&self) -> PM__R { + PM__R::new(((self.bits >> 1) & 0x01) != 0) + } + #[doc = "Bit 2 - MCLK APB Protect Enable"] + #[inline(always)] + pub fn mclk_(&self) -> MCLK__R { + MCLK__R::new(((self.bits >> 2) & 0x01) != 0) + } + #[doc = "Bit 3 - RSTC APB Protect Enable"] + #[inline(always)] + pub fn rstc_(&self) -> RSTC__R { + RSTC__R::new(((self.bits >> 3) & 0x01) != 0) + } + #[doc = "Bit 4 - OSCCTRL APB Protect Enable"] + #[inline(always)] + pub fn oscctrl_(&self) -> OSCCTRL__R { + OSCCTRL__R::new(((self.bits >> 4) & 0x01) != 0) + } + #[doc = "Bit 5 - OSC32KCTRL APB Protect Enable"] + #[inline(always)] + pub fn osc32kctrl_(&self) -> OSC32KCTRL__R { + OSC32KCTRL__R::new(((self.bits >> 5) & 0x01) != 0) + } + #[doc = "Bit 6 - SUPC APB Protect Enable"] + #[inline(always)] + pub fn supc_(&self) -> SUPC__R { + SUPC__R::new(((self.bits >> 6) & 0x01) != 0) + } + #[doc = "Bit 7 - GCLK APB Protect Enable"] + #[inline(always)] + pub fn gclk_(&self) -> GCLK__R { + GCLK__R::new(((self.bits >> 7) & 0x01) != 0) + } + #[doc = "Bit 8 - WDT APB Protect Enable"] + #[inline(always)] + pub fn wdt_(&self) -> WDT__R { + WDT__R::new(((self.bits >> 8) & 0x01) != 0) + } + #[doc = "Bit 9 - RTC APB Protect Enable"] + #[inline(always)] + pub fn rtc_(&self) -> RTC__R { + RTC__R::new(((self.bits >> 9) & 0x01) != 0) + } + #[doc = "Bit 10 - EIC APB Protect Enable"] + #[inline(always)] + pub fn eic_(&self) -> EIC__R { + EIC__R::new(((self.bits >> 10) & 0x01) != 0) + } + #[doc = "Bit 11 - FREQM APB Protect Enable"] + #[inline(always)] + pub fn freqm_(&self) -> FREQM__R { + FREQM__R::new(((self.bits >> 11) & 0x01) != 0) + } + #[doc = "Bit 12 - TSENS APB Protect Enable"] + #[inline(always)] + pub fn tsens_(&self) -> TSENS__R { + TSENS__R::new(((self.bits >> 12) & 0x01) != 0) + } +} +#[doc = "Peripheral write protection status - Bridge A\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 [statusa](index.html) module"] +pub struct STATUSA_SPEC; +impl crate::RegisterSpec for STATUSA_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [statusa::R](R) reader structure"] +impl crate::Readable for STATUSA_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets STATUSA to value 0"] +impl crate::Resettable for STATUSA_SPEC { + #[inline(always)] + fn reset_value() -> Self::Ux { + 0 + } +} diff --git a/src/pac/statusb.rs b/src/pac/statusb.rs new file mode 100644 index 0000000..b1d33a3 --- /dev/null +++ b/src/pac/statusb.rs @@ -0,0 +1,147 @@ +#[doc = "Register `STATUSB` reader"] +pub struct R(crate::R<STATUSB_SPEC>); +impl core::ops::Deref for R { + type Target = crate::R<STATUSB_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl From<crate::R<STATUSB_SPEC>> for R { + #[inline(always)] + fn from(reader: crate::R<STATUSB_SPEC>) -> Self { + R(reader) + } +} +#[doc = "Field `PORT_` reader - PORT APB Protect Enable"] +pub struct PORT__R(crate::FieldReader<bool, bool>); +impl PORT__R { + pub(crate) fn new(bits: bool) -> Self { + PORT__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for PORT__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `DSU_` reader - DSU APB Protect Enable"] +pub struct DSU__R(crate::FieldReader<bool, bool>); +impl DSU__R { + pub(crate) fn new(bits: bool) -> Self { + DSU__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for DSU__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `NVMCTRL_` reader - NVMCTRL APB Protect Enable"] +pub struct NVMCTRL__R(crate::FieldReader<bool, bool>); +impl NVMCTRL__R { + pub(crate) fn new(bits: bool) -> Self { + NVMCTRL__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for NVMCTRL__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `DMAC_` reader - DMAC APB Protect Enable"] +pub struct DMAC__R(crate::FieldReader<bool, bool>); +impl DMAC__R { + pub(crate) fn new(bits: bool) -> Self { + DMAC__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for DMAC__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `MTB_` reader - MTB APB Protect Enable"] +pub struct MTB__R(crate::FieldReader<bool, bool>); +impl MTB__R { + pub(crate) fn new(bits: bool) -> Self { + MTB__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for MTB__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `HMATRIXHS_` reader - HMATRIXHS APB Protect Enable"] +pub struct HMATRIXHS__R(crate::FieldReader<bool, bool>); +impl HMATRIXHS__R { + pub(crate) fn new(bits: bool) -> Self { + HMATRIXHS__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for HMATRIXHS__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl R { + #[doc = "Bit 0 - PORT APB Protect Enable"] + #[inline(always)] + pub fn port_(&self) -> PORT__R { + PORT__R::new((self.bits & 0x01) != 0) + } + #[doc = "Bit 1 - DSU APB Protect Enable"] + #[inline(always)] + pub fn dsu_(&self) -> DSU__R { + DSU__R::new(((self.bits >> 1) & 0x01) != 0) + } + #[doc = "Bit 2 - NVMCTRL APB Protect Enable"] + #[inline(always)] + pub fn nvmctrl_(&self) -> NVMCTRL__R { + NVMCTRL__R::new(((self.bits >> 2) & 0x01) != 0) + } + #[doc = "Bit 3 - DMAC APB Protect Enable"] + #[inline(always)] + pub fn dmac_(&self) -> DMAC__R { + DMAC__R::new(((self.bits >> 3) & 0x01) != 0) + } + #[doc = "Bit 4 - MTB APB Protect Enable"] + #[inline(always)] + pub fn mtb_(&self) -> MTB__R { + MTB__R::new(((self.bits >> 4) & 0x01) != 0) + } + #[doc = "Bit 5 - HMATRIXHS APB Protect Enable"] + #[inline(always)] + pub fn hmatrixhs_(&self) -> HMATRIXHS__R { + HMATRIXHS__R::new(((self.bits >> 5) & 0x01) != 0) + } +} +#[doc = "Peripheral write protection status - Bridge B\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 [statusb](index.html) module"] +pub struct STATUSB_SPEC; +impl crate::RegisterSpec for STATUSB_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [statusb::R](R) reader structure"] +impl crate::Readable for STATUSB_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets STATUSB to value 0x02"] +impl crate::Resettable for STATUSB_SPEC { + #[inline(always)] + fn reset_value() -> Self::Ux { + 0x02 + } +} diff --git a/src/pac/statusc.rs b/src/pac/statusc.rs new file mode 100644 index 0000000..1cd140e --- /dev/null +++ b/src/pac/statusc.rs @@ -0,0 +1,489 @@ +#[doc = "Register `STATUSC` reader"] +pub struct R(crate::R<STATUSC_SPEC>); +impl core::ops::Deref for R { + type Target = crate::R<STATUSC_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl From<crate::R<STATUSC_SPEC>> for R { + #[inline(always)] + fn from(reader: crate::R<STATUSC_SPEC>) -> Self { + R(reader) + } +} +#[doc = "Field `EVSYS_` reader - EVSYS APB Protect Enable"] +pub struct EVSYS__R(crate::FieldReader<bool, bool>); +impl EVSYS__R { + pub(crate) fn new(bits: bool) -> Self { + EVSYS__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for EVSYS__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `SERCOM0_` reader - SERCOM0 APB Protect Enable"] +pub struct SERCOM0__R(crate::FieldReader<bool, bool>); +impl SERCOM0__R { + pub(crate) fn new(bits: bool) -> Self { + SERCOM0__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for SERCOM0__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `SERCOM1_` reader - SERCOM1 APB Protect Enable"] +pub struct SERCOM1__R(crate::FieldReader<bool, bool>); +impl SERCOM1__R { + pub(crate) fn new(bits: bool) -> Self { + SERCOM1__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for SERCOM1__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `SERCOM2_` reader - SERCOM2 APB Protect Enable"] +pub struct SERCOM2__R(crate::FieldReader<bool, bool>); +impl SERCOM2__R { + pub(crate) fn new(bits: bool) -> Self { + SERCOM2__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for SERCOM2__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `SERCOM3_` reader - SERCOM3 APB Protect Enable"] +pub struct SERCOM3__R(crate::FieldReader<bool, bool>); +impl SERCOM3__R { + pub(crate) fn new(bits: bool) -> Self { + SERCOM3__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for SERCOM3__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `SERCOM4_` reader - SERCOM4 APB Protect Enable"] +pub struct SERCOM4__R(crate::FieldReader<bool, bool>); +impl SERCOM4__R { + pub(crate) fn new(bits: bool) -> Self { + SERCOM4__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for SERCOM4__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `SERCOM5_` reader - SERCOM5 APB Protect Enable"] +pub struct SERCOM5__R(crate::FieldReader<bool, bool>); +impl SERCOM5__R { + pub(crate) fn new(bits: bool) -> Self { + SERCOM5__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for SERCOM5__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `CAN0_` reader - CAN0 APB Protect Enable"] +pub struct CAN0__R(crate::FieldReader<bool, bool>); +impl CAN0__R { + pub(crate) fn new(bits: bool) -> Self { + CAN0__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for CAN0__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `CAN1_` reader - CAN1 APB Protect Enable"] +pub struct CAN1__R(crate::FieldReader<bool, bool>); +impl CAN1__R { + pub(crate) fn new(bits: bool) -> Self { + CAN1__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for CAN1__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TCC0_` reader - TCC0 APB Protect Enable"] +pub struct TCC0__R(crate::FieldReader<bool, bool>); +impl TCC0__R { + pub(crate) fn new(bits: bool) -> Self { + TCC0__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TCC0__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TCC1_` reader - TCC1 APB Protect Enable"] +pub struct TCC1__R(crate::FieldReader<bool, bool>); +impl TCC1__R { + pub(crate) fn new(bits: bool) -> Self { + TCC1__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TCC1__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TCC2_` reader - TCC2 APB Protect Enable"] +pub struct TCC2__R(crate::FieldReader<bool, bool>); +impl TCC2__R { + pub(crate) fn new(bits: bool) -> Self { + TCC2__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TCC2__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TC0_` reader - TC0 APB Protect Enable"] +pub struct TC0__R(crate::FieldReader<bool, bool>); +impl TC0__R { + pub(crate) fn new(bits: bool) -> Self { + TC0__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TC0__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TC1_` reader - TC1 APB Protect Enable"] +pub struct TC1__R(crate::FieldReader<bool, bool>); +impl TC1__R { + pub(crate) fn new(bits: bool) -> Self { + TC1__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TC1__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TC2_` reader - TC2 APB Protect Enable"] +pub struct TC2__R(crate::FieldReader<bool, bool>); +impl TC2__R { + pub(crate) fn new(bits: bool) -> Self { + TC2__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TC2__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TC3_` reader - TC3 APB Protect Enable"] +pub struct TC3__R(crate::FieldReader<bool, bool>); +impl TC3__R { + pub(crate) fn new(bits: bool) -> Self { + TC3__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TC3__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TC4_` reader - TC4 APB Protect Enable"] +pub struct TC4__R(crate::FieldReader<bool, bool>); +impl TC4__R { + pub(crate) fn new(bits: bool) -> Self { + TC4__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TC4__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `ADC0_` reader - ADC0 APB Protect Enable"] +pub struct ADC0__R(crate::FieldReader<bool, bool>); +impl ADC0__R { + pub(crate) fn new(bits: bool) -> Self { + ADC0__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for ADC0__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `ADC1_` reader - ADC1 APB Protect Enable"] +pub struct ADC1__R(crate::FieldReader<bool, bool>); +impl ADC1__R { + pub(crate) fn new(bits: bool) -> Self { + ADC1__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for ADC1__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `SDADC_` reader - SDADC APB Protect Enable"] +pub struct SDADC__R(crate::FieldReader<bool, bool>); +impl SDADC__R { + pub(crate) fn new(bits: bool) -> Self { + SDADC__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for SDADC__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `AC_` reader - AC APB Protect Enable"] +pub struct AC__R(crate::FieldReader<bool, bool>); +impl AC__R { + pub(crate) fn new(bits: bool) -> Self { + AC__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for AC__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `DAC_` reader - DAC APB Protect Enable"] +pub struct DAC__R(crate::FieldReader<bool, bool>); +impl DAC__R { + pub(crate) fn new(bits: bool) -> Self { + DAC__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for DAC__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `PTC_` reader - PTC APB Protect Enable"] +pub struct PTC__R(crate::FieldReader<bool, bool>); +impl PTC__R { + pub(crate) fn new(bits: bool) -> Self { + PTC__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for PTC__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `CCL_` reader - CCL APB Protect Enable"] +pub struct CCL__R(crate::FieldReader<bool, bool>); +impl CCL__R { + pub(crate) fn new(bits: bool) -> Self { + CCL__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for CCL__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl R { + #[doc = "Bit 0 - EVSYS APB Protect Enable"] + #[inline(always)] + pub fn evsys_(&self) -> EVSYS__R { + EVSYS__R::new((self.bits & 0x01) != 0) + } + #[doc = "Bit 1 - SERCOM0 APB Protect Enable"] + #[inline(always)] + pub fn sercom0_(&self) -> SERCOM0__R { + SERCOM0__R::new(((self.bits >> 1) & 0x01) != 0) + } + #[doc = "Bit 2 - SERCOM1 APB Protect Enable"] + #[inline(always)] + pub fn sercom1_(&self) -> SERCOM1__R { + SERCOM1__R::new(((self.bits >> 2) & 0x01) != 0) + } + #[doc = "Bit 3 - SERCOM2 APB Protect Enable"] + #[inline(always)] + pub fn sercom2_(&self) -> SERCOM2__R { + SERCOM2__R::new(((self.bits >> 3) & 0x01) != 0) + } + #[doc = "Bit 4 - SERCOM3 APB Protect Enable"] + #[inline(always)] + pub fn sercom3_(&self) -> SERCOM3__R { + SERCOM3__R::new(((self.bits >> 4) & 0x01) != 0) + } + #[doc = "Bit 5 - SERCOM4 APB Protect Enable"] + #[inline(always)] + pub fn sercom4_(&self) -> SERCOM4__R { + SERCOM4__R::new(((self.bits >> 5) & 0x01) != 0) + } + #[doc = "Bit 6 - SERCOM5 APB Protect Enable"] + #[inline(always)] + pub fn sercom5_(&self) -> SERCOM5__R { + SERCOM5__R::new(((self.bits >> 6) & 0x01) != 0) + } + #[doc = "Bit 7 - CAN0 APB Protect Enable"] + #[inline(always)] + pub fn can0_(&self) -> CAN0__R { + CAN0__R::new(((self.bits >> 7) & 0x01) != 0) + } + #[doc = "Bit 8 - CAN1 APB Protect Enable"] + #[inline(always)] + pub fn can1_(&self) -> CAN1__R { + CAN1__R::new(((self.bits >> 8) & 0x01) != 0) + } + #[doc = "Bit 9 - TCC0 APB Protect Enable"] + #[inline(always)] + pub fn tcc0_(&self) -> TCC0__R { + TCC0__R::new(((self.bits >> 9) & 0x01) != 0) + } + #[doc = "Bit 10 - TCC1 APB Protect Enable"] + #[inline(always)] + pub fn tcc1_(&self) -> TCC1__R { + TCC1__R::new(((self.bits >> 10) & 0x01) != 0) + } + #[doc = "Bit 11 - TCC2 APB Protect Enable"] + #[inline(always)] + pub fn tcc2_(&self) -> TCC2__R { + TCC2__R::new(((self.bits >> 11) & 0x01) != 0) + } + #[doc = "Bit 12 - TC0 APB Protect Enable"] + #[inline(always)] + pub fn tc0_(&self) -> TC0__R { + TC0__R::new(((self.bits >> 12) & 0x01) != 0) + } + #[doc = "Bit 13 - TC1 APB Protect Enable"] + #[inline(always)] + pub fn tc1_(&self) -> TC1__R { + TC1__R::new(((self.bits >> 13) & 0x01) != 0) + } + #[doc = "Bit 14 - TC2 APB Protect Enable"] + #[inline(always)] + pub fn tc2_(&self) -> TC2__R { + TC2__R::new(((self.bits >> 14) & 0x01) != 0) + } + #[doc = "Bit 15 - TC3 APB Protect Enable"] + #[inline(always)] + pub fn tc3_(&self) -> TC3__R { + TC3__R::new(((self.bits >> 15) & 0x01) != 0) + } + #[doc = "Bit 16 - TC4 APB Protect Enable"] + #[inline(always)] + pub fn tc4_(&self) -> TC4__R { + TC4__R::new(((self.bits >> 16) & 0x01) != 0) + } + #[doc = "Bit 17 - ADC0 APB Protect Enable"] + #[inline(always)] + pub fn adc0_(&self) -> ADC0__R { + ADC0__R::new(((self.bits >> 17) & 0x01) != 0) + } + #[doc = "Bit 18 - ADC1 APB Protect Enable"] + #[inline(always)] + pub fn adc1_(&self) -> ADC1__R { + ADC1__R::new(((self.bits >> 18) & 0x01) != 0) + } + #[doc = "Bit 19 - SDADC APB Protect Enable"] + #[inline(always)] + pub fn sdadc_(&self) -> SDADC__R { + SDADC__R::new(((self.bits >> 19) & 0x01) != 0) + } + #[doc = "Bit 20 - AC APB Protect Enable"] + #[inline(always)] + pub fn ac_(&self) -> AC__R { + AC__R::new(((self.bits >> 20) & 0x01) != 0) + } + #[doc = "Bit 21 - DAC APB Protect Enable"] + #[inline(always)] + pub fn dac_(&self) -> DAC__R { + DAC__R::new(((self.bits >> 21) & 0x01) != 0) + } + #[doc = "Bit 22 - PTC APB Protect Enable"] + #[inline(always)] + pub fn ptc_(&self) -> PTC__R { + PTC__R::new(((self.bits >> 22) & 0x01) != 0) + } + #[doc = "Bit 23 - CCL APB Protect Enable"] + #[inline(always)] + pub fn ccl_(&self) -> CCL__R { + CCL__R::new(((self.bits >> 23) & 0x01) != 0) + } +} +#[doc = "Peripheral write protection status - Bridge C\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 [statusc](index.html) module"] +pub struct STATUSC_SPEC; +impl crate::RegisterSpec for STATUSC_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [statusc::R](R) reader structure"] +impl crate::Readable for STATUSC_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets STATUSC to value 0x0200_0000"] +impl crate::Resettable for STATUSC_SPEC { + #[inline(always)] + fn reset_value() -> Self::Ux { + 0x0200_0000 + } +} diff --git a/src/pac/statusd.rs b/src/pac/statusd.rs new file mode 100644 index 0000000..6d70322 --- /dev/null +++ b/src/pac/statusd.rs @@ -0,0 +1,128 @@ +#[doc = "Register `STATUSD` reader"] +pub struct R(crate::R<STATUSD_SPEC>); +impl core::ops::Deref for R { + type Target = crate::R<STATUSD_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl From<crate::R<STATUSD_SPEC>> for R { + #[inline(always)] + fn from(reader: crate::R<STATUSD_SPEC>) -> Self { + R(reader) + } +} +#[doc = "Field `SERCOM6_` reader - SERCOM6 APB Protect Enable"] +pub struct SERCOM6__R(crate::FieldReader<bool, bool>); +impl SERCOM6__R { + pub(crate) fn new(bits: bool) -> Self { + SERCOM6__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for SERCOM6__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `SERCOM7_` reader - SERCOM7 APB Protect Enable"] +pub struct SERCOM7__R(crate::FieldReader<bool, bool>); +impl SERCOM7__R { + pub(crate) fn new(bits: bool) -> Self { + SERCOM7__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for SERCOM7__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TC5_` reader - TC5 APB Protect Enable"] +pub struct TC5__R(crate::FieldReader<bool, bool>); +impl TC5__R { + pub(crate) fn new(bits: bool) -> Self { + TC5__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TC5__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TC6_` reader - TC6 APB Protect Enable"] +pub struct TC6__R(crate::FieldReader<bool, bool>); +impl TC6__R { + pub(crate) fn new(bits: bool) -> Self { + TC6__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TC6__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TC7_` reader - TC7 APB Protect Enable"] +pub struct TC7__R(crate::FieldReader<bool, bool>); +impl TC7__R { + pub(crate) fn new(bits: bool) -> Self { + TC7__R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TC7__R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl R { + #[doc = "Bit 0 - SERCOM6 APB Protect Enable"] + #[inline(always)] + pub fn sercom6_(&self) -> SERCOM6__R { + SERCOM6__R::new((self.bits & 0x01) != 0) + } + #[doc = "Bit 1 - SERCOM7 APB Protect Enable"] + #[inline(always)] + pub fn sercom7_(&self) -> SERCOM7__R { + SERCOM7__R::new(((self.bits >> 1) & 0x01) != 0) + } + #[doc = "Bit 2 - TC5 APB Protect Enable"] + #[inline(always)] + pub fn tc5_(&self) -> TC5__R { + TC5__R::new(((self.bits >> 2) & 0x01) != 0) + } + #[doc = "Bit 3 - TC6 APB Protect Enable"] + #[inline(always)] + pub fn tc6_(&self) -> TC6__R { + TC6__R::new(((self.bits >> 3) & 0x01) != 0) + } + #[doc = "Bit 4 - TC7 APB Protect Enable"] + #[inline(always)] + pub fn tc7_(&self) -> TC7__R { + TC7__R::new(((self.bits >> 4) & 0x01) != 0) + } +} +#[doc = "Peripheral write protection status - Bridge D\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 [statusd](index.html) module"] +pub struct STATUSD_SPEC; +impl crate::RegisterSpec for STATUSD_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [statusd::R](R) reader structure"] +impl crate::Readable for STATUSD_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets STATUSD to value 0"] +impl crate::Resettable for STATUSD_SPEC { + #[inline(always)] + fn reset_value() -> Self::Ux { + 0 + } +} diff --git a/src/pac/wrctrl.rs b/src/pac/wrctrl.rs new file mode 100644 index 0000000..eeb5b64 --- /dev/null +++ b/src/pac/wrctrl.rs @@ -0,0 +1,213 @@ +#[doc = "Register `WRCTRL` reader"] +pub struct R(crate::R<WRCTRL_SPEC>); +impl core::ops::Deref for R { + type Target = crate::R<WRCTRL_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl From<crate::R<WRCTRL_SPEC>> for R { + #[inline(always)] + fn from(reader: crate::R<WRCTRL_SPEC>) -> Self { + R(reader) + } +} +#[doc = "Register `WRCTRL` writer"] +pub struct W(crate::W<WRCTRL_SPEC>); +impl core::ops::Deref for W { + type Target = crate::W<WRCTRL_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<WRCTRL_SPEC>> for W { + #[inline(always)] + fn from(writer: crate::W<WRCTRL_SPEC>) -> Self { + W(writer) + } +} +#[doc = "Field `PERID` reader - Peripheral identifier"] +pub struct PERID_R(crate::FieldReader<u16, u16>); +impl PERID_R { + pub(crate) fn new(bits: u16) -> Self { + PERID_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for PERID_R { + type Target = crate::FieldReader<u16, u16>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `PERID` writer - Peripheral identifier"] +pub struct PERID_W<'a> { + w: &'a mut W, +} +impl<'a> PERID_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub unsafe fn bits(self, value: u16) -> &'a mut W { + self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); + self.w + } +} +#[doc = "Peripheral access control key\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq)] +#[repr(u8)] +pub enum KEY_A { + #[doc = "0: No action"] + OFF = 0, + #[doc = "1: Clear protection"] + CLR = 1, + #[doc = "2: Set protection"] + SET = 2, + #[doc = "3: Set and lock protection"] + SETLCK = 3, +} +impl From<KEY_A> for u8 { + #[inline(always)] + fn from(variant: KEY_A) -> Self { + variant as _ + } +} +#[doc = "Field `KEY` reader - Peripheral access control key"] +pub struct KEY_R(crate::FieldReader<u8, KEY_A>); +impl KEY_R { + pub(crate) fn new(bits: u8) -> Self { + KEY_R(crate::FieldReader::new(bits)) + } + #[doc = r"Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option<KEY_A> { + match self.bits { + 0 => Some(KEY_A::OFF), + 1 => Some(KEY_A::CLR), + 2 => Some(KEY_A::SET), + 3 => Some(KEY_A::SETLCK), + _ => None, + } + } + #[doc = "Checks if the value of the field is `OFF`"] + #[inline(always)] + pub fn is_off(&self) -> bool { + **self == KEY_A::OFF + } + #[doc = "Checks if the value of the field is `CLR`"] + #[inline(always)] + pub fn is_clr(&self) -> bool { + **self == KEY_A::CLR + } + #[doc = "Checks if the value of the field is `SET`"] + #[inline(always)] + pub fn is_set(&self) -> bool { + **self == KEY_A::SET + } + #[doc = "Checks if the value of the field is `SETLCK`"] + #[inline(always)] + pub fn is_setlck(&self) -> bool { + **self == KEY_A::SETLCK + } +} +impl core::ops::Deref for KEY_R { + type Target = crate::FieldReader<u8, KEY_A>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `KEY` writer - Peripheral access control key"] +pub struct KEY_W<'a> { + w: &'a mut W, +} +impl<'a> KEY_W<'a> { + #[doc = r"Writes `variant` to the field"] + #[inline(always)] + pub fn variant(self, variant: KEY_A) -> &'a mut W { + unsafe { self.bits(variant.into()) } + } + #[doc = "No action"] + #[inline(always)] + pub fn off(self) -> &'a mut W { + self.variant(KEY_A::OFF) + } + #[doc = "Clear protection"] + #[inline(always)] + pub fn clr(self) -> &'a mut W { + self.variant(KEY_A::CLR) + } + #[doc = "Set protection"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(KEY_A::SET) + } + #[doc = "Set and lock protection"] + #[inline(always)] + pub fn setlck(self) -> &'a mut W { + self.variant(KEY_A::SETLCK) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub unsafe fn bits(self, value: u8) -> &'a mut W { + self.w.bits = (self.w.bits & !(0xff << 16)) | ((value as u32 & 0xff) << 16); + self.w + } +} +impl R { + #[doc = "Bits 0:15 - Peripheral identifier"] + #[inline(always)] + pub fn perid(&self) -> PERID_R { + PERID_R::new((self.bits & 0xffff) as u16) + } + #[doc = "Bits 16:23 - Peripheral access control key"] + #[inline(always)] + pub fn key(&self) -> KEY_R { + KEY_R::new(((self.bits >> 16) & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:15 - Peripheral identifier"] + #[inline(always)] + pub fn perid(&mut self) -> PERID_W { + PERID_W { w: self } + } + #[doc = "Bits 16:23 - Peripheral access control key"] + #[inline(always)] + pub fn key(&mut self) -> KEY_W { + KEY_W { w: 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 = "Write control\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 [wrctrl](index.html) module"] +pub struct WRCTRL_SPEC; +impl crate::RegisterSpec for WRCTRL_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [wrctrl::R](R) reader structure"] +impl crate::Readable for WRCTRL_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [wrctrl::W](W) writer structure"] +impl crate::Writable for WRCTRL_SPEC { + type Writer = W; +} +#[doc = "`reset()` method sets WRCTRL to value 0"] +impl crate::Resettable for WRCTRL_SPEC { + #[inline(always)] + fn reset_value() -> Self::Ux { + 0 + } +} |
