summaryrefslogtreecommitdiff
path: root/src/rtc/mode1
diff options
context:
space:
mode:
Diffstat (limited to 'src/rtc/mode1')
-rw-r--r--src/rtc/mode1/comp.rs103
-rw-r--r--src/rtc/mode1/count.rs102
-rw-r--r--src/rtc/mode1/ctrla.rs517
-rw-r--r--src/rtc/mode1/dbgctrl.rs112
-rw-r--r--src/rtc/mode1/evctrl.rs572
-rw-r--r--src/rtc/mode1/freqcorr.rs148
-rw-r--r--src/rtc/mode1/intenclr.rs572
-rw-r--r--src/rtc/mode1/intenset.rs572
-rw-r--r--src/rtc/mode1/intflag.rs572
-rw-r--r--src/rtc/mode1/per.rs102
-rw-r--r--src/rtc/mode1/syncbusy.rs185
11 files changed, 3557 insertions, 0 deletions
diff --git a/src/rtc/mode1/comp.rs b/src/rtc/mode1/comp.rs
new file mode 100644
index 0000000..4db385d
--- /dev/null
+++ b/src/rtc/mode1/comp.rs
@@ -0,0 +1,103 @@
+#[doc = "Register `COMP[%s]` reader"]
+pub struct R(crate::R<COMP_SPEC>);
+impl core::ops::Deref for R {
+ type Target = crate::R<COMP_SPEC>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+impl From<crate::R<COMP_SPEC>> for R {
+ #[inline(always)]
+ fn from(reader: crate::R<COMP_SPEC>) -> Self {
+ R(reader)
+ }
+}
+#[doc = "Register `COMP[%s]` writer"]
+pub struct W(crate::W<COMP_SPEC>);
+impl core::ops::Deref for W {
+ type Target = crate::W<COMP_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<COMP_SPEC>> for W {
+ #[inline(always)]
+ fn from(writer: crate::W<COMP_SPEC>) -> Self {
+ W(writer)
+ }
+}
+#[doc = "Field `COMP` reader - Compare Value"]
+pub struct COMP_R(crate::FieldReader<u16, u16>);
+impl COMP_R {
+ pub(crate) fn new(bits: u16) -> Self {
+ COMP_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for COMP_R {
+ type Target = crate::FieldReader<u16, u16>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `COMP` writer - Compare Value"]
+pub struct COMP_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> COMP_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 u16 & 0xffff);
+ self.w
+ }
+}
+impl R {
+ #[doc = "Bits 0:15 - Compare Value"]
+ #[inline(always)]
+ pub fn comp(&self) -> COMP_R {
+ COMP_R::new((self.bits & 0xffff) as u16)
+ }
+}
+impl W {
+ #[doc = "Bits 0:15 - Compare Value"]
+ #[inline(always)]
+ pub fn comp(&mut self) -> COMP_W {
+ COMP_W { w: self }
+ }
+ #[doc = "Writes raw bits to the register."]
+ #[inline(always)]
+ pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
+ self.0.bits(bits);
+ self
+ }
+}
+#[doc = "MODE1 Compare n Value\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 [comp](index.html) module"]
+pub struct COMP_SPEC;
+impl crate::RegisterSpec for COMP_SPEC {
+ type Ux = u16;
+}
+#[doc = "`read()` method returns [comp::R](R) reader structure"]
+impl crate::Readable for COMP_SPEC {
+ type Reader = R;
+}
+#[doc = "`write(|w| ..)` method takes [comp::W](W) writer structure"]
+impl crate::Writable for COMP_SPEC {
+ type Writer = W;
+}
+#[doc = "`reset()` method sets COMP[%s]
+to value 0"]
+impl crate::Resettable for COMP_SPEC {
+ #[inline(always)]
+ fn reset_value() -> Self::Ux {
+ 0
+ }
+}
diff --git a/src/rtc/mode1/count.rs b/src/rtc/mode1/count.rs
new file mode 100644
index 0000000..6c9a35d
--- /dev/null
+++ b/src/rtc/mode1/count.rs
@@ -0,0 +1,102 @@
+#[doc = "Register `COUNT` reader"]
+pub struct R(crate::R<COUNT_SPEC>);
+impl core::ops::Deref for R {
+ type Target = crate::R<COUNT_SPEC>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+impl From<crate::R<COUNT_SPEC>> for R {
+ #[inline(always)]
+ fn from(reader: crate::R<COUNT_SPEC>) -> Self {
+ R(reader)
+ }
+}
+#[doc = "Register `COUNT` writer"]
+pub struct W(crate::W<COUNT_SPEC>);
+impl core::ops::Deref for W {
+ type Target = crate::W<COUNT_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<COUNT_SPEC>> for W {
+ #[inline(always)]
+ fn from(writer: crate::W<COUNT_SPEC>) -> Self {
+ W(writer)
+ }
+}
+#[doc = "Field `COUNT` reader - Counter Value"]
+pub struct COUNT_R(crate::FieldReader<u16, u16>);
+impl COUNT_R {
+ pub(crate) fn new(bits: u16) -> Self {
+ COUNT_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for COUNT_R {
+ type Target = crate::FieldReader<u16, u16>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `COUNT` writer - Counter Value"]
+pub struct COUNT_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> COUNT_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 u16 & 0xffff);
+ self.w
+ }
+}
+impl R {
+ #[doc = "Bits 0:15 - Counter Value"]
+ #[inline(always)]
+ pub fn count(&self) -> COUNT_R {
+ COUNT_R::new((self.bits & 0xffff) as u16)
+ }
+}
+impl W {
+ #[doc = "Bits 0:15 - Counter Value"]
+ #[inline(always)]
+ pub fn count(&mut self) -> COUNT_W {
+ COUNT_W { w: self }
+ }
+ #[doc = "Writes raw bits to the register."]
+ #[inline(always)]
+ pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
+ self.0.bits(bits);
+ self
+ }
+}
+#[doc = "MODE1 Counter Value\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 [count](index.html) module"]
+pub struct COUNT_SPEC;
+impl crate::RegisterSpec for COUNT_SPEC {
+ type Ux = u16;
+}
+#[doc = "`read()` method returns [count::R](R) reader structure"]
+impl crate::Readable for COUNT_SPEC {
+ type Reader = R;
+}
+#[doc = "`write(|w| ..)` method takes [count::W](W) writer structure"]
+impl crate::Writable for COUNT_SPEC {
+ type Writer = W;
+}
+#[doc = "`reset()` method sets COUNT to value 0"]
+impl crate::Resettable for COUNT_SPEC {
+ #[inline(always)]
+ fn reset_value() -> Self::Ux {
+ 0
+ }
+}
diff --git a/src/rtc/mode1/ctrla.rs b/src/rtc/mode1/ctrla.rs
new file mode 100644
index 0000000..3e37a61
--- /dev/null
+++ b/src/rtc/mode1/ctrla.rs
@@ -0,0 +1,517 @@
+#[doc = "Register `CTRLA` reader"]
+pub struct R(crate::R<CTRLA_SPEC>);
+impl core::ops::Deref for R {
+ type Target = crate::R<CTRLA_SPEC>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+impl From<crate::R<CTRLA_SPEC>> for R {
+ #[inline(always)]
+ fn from(reader: crate::R<CTRLA_SPEC>) -> Self {
+ R(reader)
+ }
+}
+#[doc = "Register `CTRLA` writer"]
+pub struct W(crate::W<CTRLA_SPEC>);
+impl core::ops::Deref for W {
+ type Target = crate::W<CTRLA_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<CTRLA_SPEC>> for W {
+ #[inline(always)]
+ fn from(writer: crate::W<CTRLA_SPEC>) -> Self {
+ W(writer)
+ }
+}
+#[doc = "Field `SWRST` reader - Software Reset"]
+pub struct SWRST_R(crate::FieldReader<bool, bool>);
+impl SWRST_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ SWRST_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for SWRST_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `SWRST` writer - Software Reset"]
+pub struct SWRST_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> SWRST_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 u16 & 0x01);
+ self.w
+ }
+}
+#[doc = "Field `ENABLE` reader - Enable"]
+pub struct ENABLE_R(crate::FieldReader<bool, bool>);
+impl ENABLE_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ ENABLE_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for ENABLE_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `ENABLE` writer - Enable"]
+pub struct ENABLE_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> ENABLE_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 u16 & 0x01) << 1);
+ self.w
+ }
+}
+#[doc = "Operating Mode\n\nValue on reset: 0"]
+#[derive(Clone, Copy, Debug, PartialEq)]
+#[repr(u8)]
+pub enum MODE_A {
+ #[doc = "0: Mode 0: 32-bit Counter"]
+ COUNT32 = 0,
+ #[doc = "1: Mode 1: 16-bit Counter"]
+ COUNT16 = 1,
+ #[doc = "2: Mode 2: Clock/Calendar"]
+ CLOCK = 2,
+}
+impl From<MODE_A> for u8 {
+ #[inline(always)]
+ fn from(variant: MODE_A) -> Self {
+ variant as _
+ }
+}
+#[doc = "Field `MODE` reader - Operating Mode"]
+pub struct MODE_R(crate::FieldReader<u8, MODE_A>);
+impl MODE_R {
+ pub(crate) fn new(bits: u8) -> Self {
+ MODE_R(crate::FieldReader::new(bits))
+ }
+ #[doc = r"Get enumerated values variant"]
+ #[inline(always)]
+ pub fn variant(&self) -> Option<MODE_A> {
+ match self.bits {
+ 0 => Some(MODE_A::COUNT32),
+ 1 => Some(MODE_A::COUNT16),
+ 2 => Some(MODE_A::CLOCK),
+ _ => None,
+ }
+ }
+ #[doc = "Checks if the value of the field is `COUNT32`"]
+ #[inline(always)]
+ pub fn is_count32(&self) -> bool {
+ **self == MODE_A::COUNT32
+ }
+ #[doc = "Checks if the value of the field is `COUNT16`"]
+ #[inline(always)]
+ pub fn is_count16(&self) -> bool {
+ **self == MODE_A::COUNT16
+ }
+ #[doc = "Checks if the value of the field is `CLOCK`"]
+ #[inline(always)]
+ pub fn is_clock(&self) -> bool {
+ **self == MODE_A::CLOCK
+ }
+}
+impl core::ops::Deref for MODE_R {
+ type Target = crate::FieldReader<u8, MODE_A>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `MODE` writer - Operating Mode"]
+pub struct MODE_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> MODE_W<'a> {
+ #[doc = r"Writes `variant` to the field"]
+ #[inline(always)]
+ pub fn variant(self, variant: MODE_A) -> &'a mut W {
+ unsafe { self.bits(variant.into()) }
+ }
+ #[doc = "Mode 0: 32-bit Counter"]
+ #[inline(always)]
+ pub fn count32(self) -> &'a mut W {
+ self.variant(MODE_A::COUNT32)
+ }
+ #[doc = "Mode 1: 16-bit Counter"]
+ #[inline(always)]
+ pub fn count16(self) -> &'a mut W {
+ self.variant(MODE_A::COUNT16)
+ }
+ #[doc = "Mode 2: Clock/Calendar"]
+ #[inline(always)]
+ pub fn clock(self) -> &'a mut W {
+ self.variant(MODE_A::CLOCK)
+ }
+ #[doc = r"Writes raw bits to the field"]
+ #[inline(always)]
+ pub unsafe fn bits(self, value: u8) -> &'a mut W {
+ self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u16 & 0x03) << 2);
+ self.w
+ }
+}
+#[doc = "Prescaler\n\nValue on reset: 0"]
+#[derive(Clone, Copy, Debug, PartialEq)]
+#[repr(u8)]
+pub enum PRESCALER_A {
+ #[doc = "0: CLK_RTC_CNT = GCLK_RTC/1"]
+ OFF = 0,
+ #[doc = "1: CLK_RTC_CNT = GCLK_RTC/1"]
+ DIV1 = 1,
+ #[doc = "2: CLK_RTC_CNT = GCLK_RTC/2"]
+ DIV2 = 2,
+ #[doc = "3: CLK_RTC_CNT = GCLK_RTC/4"]
+ DIV4 = 3,
+ #[doc = "4: CLK_RTC_CNT = GCLK_RTC/8"]
+ DIV8 = 4,
+ #[doc = "5: CLK_RTC_CNT = GCLK_RTC/16"]
+ DIV16 = 5,
+ #[doc = "6: CLK_RTC_CNT = GCLK_RTC/32"]
+ DIV32 = 6,
+ #[doc = "7: CLK_RTC_CNT = GCLK_RTC/64"]
+ DIV64 = 7,
+ #[doc = "8: CLK_RTC_CNT = GCLK_RTC/128"]
+ DIV128 = 8,
+ #[doc = "9: CLK_RTC_CNT = GCLK_RTC/256"]
+ DIV256 = 9,
+ #[doc = "10: CLK_RTC_CNT = GCLK_RTC/512"]
+ DIV512 = 10,
+ #[doc = "11: CLK_RTC_CNT = GCLK_RTC/1024"]
+ DIV1024 = 11,
+}
+impl From<PRESCALER_A> for u8 {
+ #[inline(always)]
+ fn from(variant: PRESCALER_A) -> Self {
+ variant as _
+ }
+}
+#[doc = "Field `PRESCALER` reader - Prescaler"]
+pub struct PRESCALER_R(crate::FieldReader<u8, PRESCALER_A>);
+impl PRESCALER_R {
+ pub(crate) fn new(bits: u8) -> Self {
+ PRESCALER_R(crate::FieldReader::new(bits))
+ }
+ #[doc = r"Get enumerated values variant"]
+ #[inline(always)]
+ pub fn variant(&self) -> Option<PRESCALER_A> {
+ match self.bits {
+ 0 => Some(PRESCALER_A::OFF),
+ 1 => Some(PRESCALER_A::DIV1),
+ 2 => Some(PRESCALER_A::DIV2),
+ 3 => Some(PRESCALER_A::DIV4),
+ 4 => Some(PRESCALER_A::DIV8),
+ 5 => Some(PRESCALER_A::DIV16),
+ 6 => Some(PRESCALER_A::DIV32),
+ 7 => Some(PRESCALER_A::DIV64),
+ 8 => Some(PRESCALER_A::DIV128),
+ 9 => Some(PRESCALER_A::DIV256),
+ 10 => Some(PRESCALER_A::DIV512),
+ 11 => Some(PRESCALER_A::DIV1024),
+ _ => None,
+ }
+ }
+ #[doc = "Checks if the value of the field is `OFF`"]
+ #[inline(always)]
+ pub fn is_off(&self) -> bool {
+ **self == PRESCALER_A::OFF
+ }
+ #[doc = "Checks if the value of the field is `DIV1`"]
+ #[inline(always)]
+ pub fn is_div1(&self) -> bool {
+ **self == PRESCALER_A::DIV1
+ }
+ #[doc = "Checks if the value of the field is `DIV2`"]
+ #[inline(always)]
+ pub fn is_div2(&self) -> bool {
+ **self == PRESCALER_A::DIV2
+ }
+ #[doc = "Checks if the value of the field is `DIV4`"]
+ #[inline(always)]
+ pub fn is_div4(&self) -> bool {
+ **self == PRESCALER_A::DIV4
+ }
+ #[doc = "Checks if the value of the field is `DIV8`"]
+ #[inline(always)]
+ pub fn is_div8(&self) -> bool {
+ **self == PRESCALER_A::DIV8
+ }
+ #[doc = "Checks if the value of the field is `DIV16`"]
+ #[inline(always)]
+ pub fn is_div16(&self) -> bool {
+ **self == PRESCALER_A::DIV16
+ }
+ #[doc = "Checks if the value of the field is `DIV32`"]
+ #[inline(always)]
+ pub fn is_div32(&self) -> bool {
+ **self == PRESCALER_A::DIV32
+ }
+ #[doc = "Checks if the value of the field is `DIV64`"]
+ #[inline(always)]
+ pub fn is_div64(&self) -> bool {
+ **self == PRESCALER_A::DIV64
+ }
+ #[doc = "Checks if the value of the field is `DIV128`"]
+ #[inline(always)]
+ pub fn is_div128(&self) -> bool {
+ **self == PRESCALER_A::DIV128
+ }
+ #[doc = "Checks if the value of the field is `DIV256`"]
+ #[inline(always)]
+ pub fn is_div256(&self) -> bool {
+ **self == PRESCALER_A::DIV256
+ }
+ #[doc = "Checks if the value of the field is `DIV512`"]
+ #[inline(always)]
+ pub fn is_div512(&self) -> bool {
+ **self == PRESCALER_A::DIV512
+ }
+ #[doc = "Checks if the value of the field is `DIV1024`"]
+ #[inline(always)]
+ pub fn is_div1024(&self) -> bool {
+ **self == PRESCALER_A::DIV1024
+ }
+}
+impl core::ops::Deref for PRESCALER_R {
+ type Target = crate::FieldReader<u8, PRESCALER_A>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PRESCALER` writer - Prescaler"]
+pub struct PRESCALER_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PRESCALER_W<'a> {
+ #[doc = r"Writes `variant` to the field"]
+ #[inline(always)]
+ pub fn variant(self, variant: PRESCALER_A) -> &'a mut W {
+ unsafe { self.bits(variant.into()) }
+ }
+ #[doc = "CLK_RTC_CNT = GCLK_RTC/1"]
+ #[inline(always)]
+ pub fn off(self) -> &'a mut W {
+ self.variant(PRESCALER_A::OFF)
+ }
+ #[doc = "CLK_RTC_CNT = GCLK_RTC/1"]
+ #[inline(always)]
+ pub fn div1(self) -> &'a mut W {
+ self.variant(PRESCALER_A::DIV1)
+ }
+ #[doc = "CLK_RTC_CNT = GCLK_RTC/2"]
+ #[inline(always)]
+ pub fn div2(self) -> &'a mut W {
+ self.variant(PRESCALER_A::DIV2)
+ }
+ #[doc = "CLK_RTC_CNT = GCLK_RTC/4"]
+ #[inline(always)]
+ pub fn div4(self) -> &'a mut W {
+ self.variant(PRESCALER_A::DIV4)
+ }
+ #[doc = "CLK_RTC_CNT = GCLK_RTC/8"]
+ #[inline(always)]
+ pub fn div8(self) -> &'a mut W {
+ self.variant(PRESCALER_A::DIV8)
+ }
+ #[doc = "CLK_RTC_CNT = GCLK_RTC/16"]
+ #[inline(always)]
+ pub fn div16(self) -> &'a mut W {
+ self.variant(PRESCALER_A::DIV16)
+ }
+ #[doc = "CLK_RTC_CNT = GCLK_RTC/32"]
+ #[inline(always)]
+ pub fn div32(self) -> &'a mut W {
+ self.variant(PRESCALER_A::DIV32)
+ }
+ #[doc = "CLK_RTC_CNT = GCLK_RTC/64"]
+ #[inline(always)]
+ pub fn div64(self) -> &'a mut W {
+ self.variant(PRESCALER_A::DIV64)
+ }
+ #[doc = "CLK_RTC_CNT = GCLK_RTC/128"]
+ #[inline(always)]
+ pub fn div128(self) -> &'a mut W {
+ self.variant(PRESCALER_A::DIV128)
+ }
+ #[doc = "CLK_RTC_CNT = GCLK_RTC/256"]
+ #[inline(always)]
+ pub fn div256(self) -> &'a mut W {
+ self.variant(PRESCALER_A::DIV256)
+ }
+ #[doc = "CLK_RTC_CNT = GCLK_RTC/512"]
+ #[inline(always)]
+ pub fn div512(self) -> &'a mut W {
+ self.variant(PRESCALER_A::DIV512)
+ }
+ #[doc = "CLK_RTC_CNT = GCLK_RTC/1024"]
+ #[inline(always)]
+ pub fn div1024(self) -> &'a mut W {
+ self.variant(PRESCALER_A::DIV1024)
+ }
+ #[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 & !(0x0f << 8)) | ((value as u16 & 0x0f) << 8);
+ self.w
+ }
+}
+#[doc = "Field `COUNTSYNC` reader - Count Read Synchronization Enable"]
+pub struct COUNTSYNC_R(crate::FieldReader<bool, bool>);
+impl COUNTSYNC_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ COUNTSYNC_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for COUNTSYNC_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `COUNTSYNC` writer - Count Read Synchronization Enable"]
+pub struct COUNTSYNC_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> COUNTSYNC_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 u16 & 0x01) << 15);
+ self.w
+ }
+}
+impl R {
+ #[doc = "Bit 0 - Software Reset"]
+ #[inline(always)]
+ pub fn swrst(&self) -> SWRST_R {
+ SWRST_R::new((self.bits & 0x01) != 0)
+ }
+ #[doc = "Bit 1 - Enable"]
+ #[inline(always)]
+ pub fn enable(&self) -> ENABLE_R {
+ ENABLE_R::new(((self.bits >> 1) & 0x01) != 0)
+ }
+ #[doc = "Bits 2:3 - Operating Mode"]
+ #[inline(always)]
+ pub fn mode(&self) -> MODE_R {
+ MODE_R::new(((self.bits >> 2) & 0x03) as u8)
+ }
+ #[doc = "Bits 8:11 - Prescaler"]
+ #[inline(always)]
+ pub fn prescaler(&self) -> PRESCALER_R {
+ PRESCALER_R::new(((self.bits >> 8) & 0x0f) as u8)
+ }
+ #[doc = "Bit 15 - Count Read Synchronization Enable"]
+ #[inline(always)]
+ pub fn countsync(&self) -> COUNTSYNC_R {
+ COUNTSYNC_R::new(((self.bits >> 15) & 0x01) != 0)
+ }
+}
+impl W {
+ #[doc = "Bit 0 - Software Reset"]
+ #[inline(always)]
+ pub fn swrst(&mut self) -> SWRST_W {
+ SWRST_W { w: self }
+ }
+ #[doc = "Bit 1 - Enable"]
+ #[inline(always)]
+ pub fn enable(&mut self) -> ENABLE_W {
+ ENABLE_W { w: self }
+ }
+ #[doc = "Bits 2:3 - Operating Mode"]
+ #[inline(always)]
+ pub fn mode(&mut self) -> MODE_W {
+ MODE_W { w: self }
+ }
+ #[doc = "Bits 8:11 - Prescaler"]
+ #[inline(always)]
+ pub fn prescaler(&mut self) -> PRESCALER_W {
+ PRESCALER_W { w: self }
+ }
+ #[doc = "Bit 15 - Count Read Synchronization Enable"]
+ #[inline(always)]
+ pub fn countsync(&mut self) -> COUNTSYNC_W {
+ COUNTSYNC_W { w: self }
+ }
+ #[doc = "Writes raw bits to the register."]
+ #[inline(always)]
+ pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
+ self.0.bits(bits);
+ self
+ }
+}
+#[doc = "MODE1 Control 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 [ctrla](index.html) module"]
+pub struct CTRLA_SPEC;
+impl crate::RegisterSpec for CTRLA_SPEC {
+ type Ux = u16;
+}
+#[doc = "`read()` method returns [ctrla::R](R) reader structure"]
+impl crate::Readable for CTRLA_SPEC {
+ type Reader = R;
+}
+#[doc = "`write(|w| ..)` method takes [ctrla::W](W) writer structure"]
+impl crate::Writable for CTRLA_SPEC {
+ type Writer = W;
+}
+#[doc = "`reset()` method sets CTRLA to value 0"]
+impl crate::Resettable for CTRLA_SPEC {
+ #[inline(always)]
+ fn reset_value() -> Self::Ux {
+ 0
+ }
+}
diff --git a/src/rtc/mode1/dbgctrl.rs b/src/rtc/mode1/dbgctrl.rs
new file mode 100644
index 0000000..950156c
--- /dev/null
+++ b/src/rtc/mode1/dbgctrl.rs
@@ -0,0 +1,112 @@
+#[doc = "Register `DBGCTRL` reader"]
+pub struct R(crate::R<DBGCTRL_SPEC>);
+impl core::ops::Deref for R {
+ type Target = crate::R<DBGCTRL_SPEC>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+impl From<crate::R<DBGCTRL_SPEC>> for R {
+ #[inline(always)]
+ fn from(reader: crate::R<DBGCTRL_SPEC>) -> Self {
+ R(reader)
+ }
+}
+#[doc = "Register `DBGCTRL` writer"]
+pub struct W(crate::W<DBGCTRL_SPEC>);
+impl core::ops::Deref for W {
+ type Target = crate::W<DBGCTRL_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<DBGCTRL_SPEC>> for W {
+ #[inline(always)]
+ fn from(writer: crate::W<DBGCTRL_SPEC>) -> Self {
+ W(writer)
+ }
+}
+#[doc = "Field `DBGRUN` reader - Run During Debug"]
+pub struct DBGRUN_R(crate::FieldReader<bool, bool>);
+impl DBGRUN_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ DBGRUN_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for DBGRUN_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `DBGRUN` writer - Run During Debug"]
+pub struct DBGRUN_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> DBGRUN_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 - Run During Debug"]
+ #[inline(always)]
+ pub fn dbgrun(&self) -> DBGRUN_R {
+ DBGRUN_R::new((self.bits & 0x01) != 0)
+ }
+}
+impl W {
+ #[doc = "Bit 0 - Run During Debug"]
+ #[inline(always)]
+ pub fn dbgrun(&mut self) -> DBGRUN_W {
+ DBGRUN_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 = "Debug 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 [dbgctrl](index.html) module"]
+pub struct DBGCTRL_SPEC;
+impl crate::RegisterSpec for DBGCTRL_SPEC {
+ type Ux = u8;
+}
+#[doc = "`read()` method returns [dbgctrl::R](R) reader structure"]
+impl crate::Readable for DBGCTRL_SPEC {
+ type Reader = R;
+}
+#[doc = "`write(|w| ..)` method takes [dbgctrl::W](W) writer structure"]
+impl crate::Writable for DBGCTRL_SPEC {
+ type Writer = W;
+}
+#[doc = "`reset()` method sets DBGCTRL to value 0"]
+impl crate::Resettable for DBGCTRL_SPEC {
+ #[inline(always)]
+ fn reset_value() -> Self::Ux {
+ 0
+ }
+}
diff --git a/src/rtc/mode1/evctrl.rs b/src/rtc/mode1/evctrl.rs
new file mode 100644
index 0000000..d739abe
--- /dev/null
+++ b/src/rtc/mode1/evctrl.rs
@@ -0,0 +1,572 @@
+#[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 `PEREO0` reader - Periodic Interval 0 Event Output Enable"]
+pub struct PEREO0_R(crate::FieldReader<bool, bool>);
+impl PEREO0_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PEREO0_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PEREO0_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PEREO0` writer - Periodic Interval 0 Event Output Enable"]
+pub struct PEREO0_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PEREO0_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 `PEREO1` reader - Periodic Interval 1 Event Output Enable"]
+pub struct PEREO1_R(crate::FieldReader<bool, bool>);
+impl PEREO1_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PEREO1_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PEREO1_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PEREO1` writer - Periodic Interval 1 Event Output Enable"]
+pub struct PEREO1_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PEREO1_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 `PEREO2` reader - Periodic Interval 2 Event Output Enable"]
+pub struct PEREO2_R(crate::FieldReader<bool, bool>);
+impl PEREO2_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PEREO2_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PEREO2_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PEREO2` writer - Periodic Interval 2 Event Output Enable"]
+pub struct PEREO2_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PEREO2_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 `PEREO3` reader - Periodic Interval 3 Event Output Enable"]
+pub struct PEREO3_R(crate::FieldReader<bool, bool>);
+impl PEREO3_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PEREO3_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PEREO3_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PEREO3` writer - Periodic Interval 3 Event Output Enable"]
+pub struct PEREO3_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PEREO3_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 `PEREO4` reader - Periodic Interval 4 Event Output Enable"]
+pub struct PEREO4_R(crate::FieldReader<bool, bool>);
+impl PEREO4_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PEREO4_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PEREO4_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PEREO4` writer - Periodic Interval 4 Event Output Enable"]
+pub struct PEREO4_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PEREO4_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 `PEREO5` reader - Periodic Interval 5 Event Output Enable"]
+pub struct PEREO5_R(crate::FieldReader<bool, bool>);
+impl PEREO5_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PEREO5_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PEREO5_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PEREO5` writer - Periodic Interval 5 Event Output Enable"]
+pub struct PEREO5_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PEREO5_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 `PEREO6` reader - Periodic Interval 6 Event Output Enable"]
+pub struct PEREO6_R(crate::FieldReader<bool, bool>);
+impl PEREO6_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PEREO6_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PEREO6_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PEREO6` writer - Periodic Interval 6 Event Output Enable"]
+pub struct PEREO6_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PEREO6_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 `PEREO7` reader - Periodic Interval 7 Event Output Enable"]
+pub struct PEREO7_R(crate::FieldReader<bool, bool>);
+impl PEREO7_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PEREO7_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PEREO7_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PEREO7` writer - Periodic Interval 7 Event Output Enable"]
+pub struct PEREO7_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PEREO7_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 `CMPEO0` reader - Compare 0 Event Output Enable"]
+pub struct CMPEO0_R(crate::FieldReader<bool, bool>);
+impl CMPEO0_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ CMPEO0_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for CMPEO0_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `CMPEO0` writer - Compare 0 Event Output Enable"]
+pub struct CMPEO0_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> CMPEO0_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 `CMPEO1` reader - Compare 1 Event Output Enable"]
+pub struct CMPEO1_R(crate::FieldReader<bool, bool>);
+impl CMPEO1_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ CMPEO1_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for CMPEO1_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `CMPEO1` writer - Compare 1 Event Output Enable"]
+pub struct CMPEO1_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> CMPEO1_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 `OVFEO` reader - Overflow Event Output Enable"]
+pub struct OVFEO_R(crate::FieldReader<bool, bool>);
+impl OVFEO_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ OVFEO_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for OVFEO_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `OVFEO` writer - Overflow Event Output Enable"]
+pub struct OVFEO_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> OVFEO_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
+ }
+}
+impl R {
+ #[doc = "Bit 0 - Periodic Interval 0 Event Output Enable"]
+ #[inline(always)]
+ pub fn pereo0(&self) -> PEREO0_R {
+ PEREO0_R::new((self.bits & 0x01) != 0)
+ }
+ #[doc = "Bit 1 - Periodic Interval 1 Event Output Enable"]
+ #[inline(always)]
+ pub fn pereo1(&self) -> PEREO1_R {
+ PEREO1_R::new(((self.bits >> 1) & 0x01) != 0)
+ }
+ #[doc = "Bit 2 - Periodic Interval 2 Event Output Enable"]
+ #[inline(always)]
+ pub fn pereo2(&self) -> PEREO2_R {
+ PEREO2_R::new(((self.bits >> 2) & 0x01) != 0)
+ }
+ #[doc = "Bit 3 - Periodic Interval 3 Event Output Enable"]
+ #[inline(always)]
+ pub fn pereo3(&self) -> PEREO3_R {
+ PEREO3_R::new(((self.bits >> 3) & 0x01) != 0)
+ }
+ #[doc = "Bit 4 - Periodic Interval 4 Event Output Enable"]
+ #[inline(always)]
+ pub fn pereo4(&self) -> PEREO4_R {
+ PEREO4_R::new(((self.bits >> 4) & 0x01) != 0)
+ }
+ #[doc = "Bit 5 - Periodic Interval 5 Event Output Enable"]
+ #[inline(always)]
+ pub fn pereo5(&self) -> PEREO5_R {
+ PEREO5_R::new(((self.bits >> 5) & 0x01) != 0)
+ }
+ #[doc = "Bit 6 - Periodic Interval 6 Event Output Enable"]
+ #[inline(always)]
+ pub fn pereo6(&self) -> PEREO6_R {
+ PEREO6_R::new(((self.bits >> 6) & 0x01) != 0)
+ }
+ #[doc = "Bit 7 - Periodic Interval 7 Event Output Enable"]
+ #[inline(always)]
+ pub fn pereo7(&self) -> PEREO7_R {
+ PEREO7_R::new(((self.bits >> 7) & 0x01) != 0)
+ }
+ #[doc = "Bit 8 - Compare 0 Event Output Enable"]
+ #[inline(always)]
+ pub fn cmpeo0(&self) -> CMPEO0_R {
+ CMPEO0_R::new(((self.bits >> 8) & 0x01) != 0)
+ }
+ #[doc = "Bit 9 - Compare 1 Event Output Enable"]
+ #[inline(always)]
+ pub fn cmpeo1(&self) -> CMPEO1_R {
+ CMPEO1_R::new(((self.bits >> 9) & 0x01) != 0)
+ }
+ #[doc = "Bit 15 - Overflow Event Output Enable"]
+ #[inline(always)]
+ pub fn ovfeo(&self) -> OVFEO_R {
+ OVFEO_R::new(((self.bits >> 15) & 0x01) != 0)
+ }
+}
+impl W {
+ #[doc = "Bit 0 - Periodic Interval 0 Event Output Enable"]
+ #[inline(always)]
+ pub fn pereo0(&mut self) -> PEREO0_W {
+ PEREO0_W { w: self }
+ }
+ #[doc = "Bit 1 - Periodic Interval 1 Event Output Enable"]
+ #[inline(always)]
+ pub fn pereo1(&mut self) -> PEREO1_W {
+ PEREO1_W { w: self }
+ }
+ #[doc = "Bit 2 - Periodic Interval 2 Event Output Enable"]
+ #[inline(always)]
+ pub fn pereo2(&mut self) -> PEREO2_W {
+ PEREO2_W { w: self }
+ }
+ #[doc = "Bit 3 - Periodic Interval 3 Event Output Enable"]
+ #[inline(always)]
+ pub fn pereo3(&mut self) -> PEREO3_W {
+ PEREO3_W { w: self }
+ }
+ #[doc = "Bit 4 - Periodic Interval 4 Event Output Enable"]
+ #[inline(always)]
+ pub fn pereo4(&mut self) -> PEREO4_W {
+ PEREO4_W { w: self }
+ }
+ #[doc = "Bit 5 - Periodic Interval 5 Event Output Enable"]
+ #[inline(always)]
+ pub fn pereo5(&mut self) -> PEREO5_W {
+ PEREO5_W { w: self }
+ }
+ #[doc = "Bit 6 - Periodic Interval 6 Event Output Enable"]
+ #[inline(always)]
+ pub fn pereo6(&mut self) -> PEREO6_W {
+ PEREO6_W { w: self }
+ }
+ #[doc = "Bit 7 - Periodic Interval 7 Event Output Enable"]
+ #[inline(always)]
+ pub fn pereo7(&mut self) -> PEREO7_W {
+ PEREO7_W { w: self }
+ }
+ #[doc = "Bit 8 - Compare 0 Event Output Enable"]
+ #[inline(always)]
+ pub fn cmpeo0(&mut self) -> CMPEO0_W {
+ CMPEO0_W { w: self }
+ }
+ #[doc = "Bit 9 - Compare 1 Event Output Enable"]
+ #[inline(always)]
+ pub fn cmpeo1(&mut self) -> CMPEO1_W {
+ CMPEO1_W { w: self }
+ }
+ #[doc = "Bit 15 - Overflow Event Output Enable"]
+ #[inline(always)]
+ pub fn ovfeo(&mut self) -> OVFEO_W {
+ OVFEO_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 = "MODE1 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 = u32;
+}
+#[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/rtc/mode1/freqcorr.rs b/src/rtc/mode1/freqcorr.rs
new file mode 100644
index 0000000..595f68c
--- /dev/null
+++ b/src/rtc/mode1/freqcorr.rs
@@ -0,0 +1,148 @@
+#[doc = "Register `FREQCORR` reader"]
+pub struct R(crate::R<FREQCORR_SPEC>);
+impl core::ops::Deref for R {
+ type Target = crate::R<FREQCORR_SPEC>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+impl From<crate::R<FREQCORR_SPEC>> for R {
+ #[inline(always)]
+ fn from(reader: crate::R<FREQCORR_SPEC>) -> Self {
+ R(reader)
+ }
+}
+#[doc = "Register `FREQCORR` writer"]
+pub struct W(crate::W<FREQCORR_SPEC>);
+impl core::ops::Deref for W {
+ type Target = crate::W<FREQCORR_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<FREQCORR_SPEC>> for W {
+ #[inline(always)]
+ fn from(writer: crate::W<FREQCORR_SPEC>) -> Self {
+ W(writer)
+ }
+}
+#[doc = "Field `VALUE` reader - Correction Value"]
+pub struct VALUE_R(crate::FieldReader<u8, u8>);
+impl VALUE_R {
+ pub(crate) fn new(bits: u8) -> Self {
+ VALUE_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for VALUE_R {
+ type Target = crate::FieldReader<u8, u8>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `VALUE` writer - Correction Value"]
+pub struct VALUE_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> VALUE_W<'a> {
+ #[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 & !0x7f) | (value as u8 & 0x7f);
+ self.w
+ }
+}
+#[doc = "Field `SIGN` reader - Correction Sign"]
+pub struct SIGN_R(crate::FieldReader<bool, bool>);
+impl SIGN_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ SIGN_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for SIGN_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `SIGN` writer - Correction Sign"]
+pub struct SIGN_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> SIGN_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 u8 & 0x01) << 7);
+ self.w
+ }
+}
+impl R {
+ #[doc = "Bits 0:6 - Correction Value"]
+ #[inline(always)]
+ pub fn value(&self) -> VALUE_R {
+ VALUE_R::new((self.bits & 0x7f) as u8)
+ }
+ #[doc = "Bit 7 - Correction Sign"]
+ #[inline(always)]
+ pub fn sign(&self) -> SIGN_R {
+ SIGN_R::new(((self.bits >> 7) & 0x01) != 0)
+ }
+}
+impl W {
+ #[doc = "Bits 0:6 - Correction Value"]
+ #[inline(always)]
+ pub fn value(&mut self) -> VALUE_W {
+ VALUE_W { w: self }
+ }
+ #[doc = "Bit 7 - Correction Sign"]
+ #[inline(always)]
+ pub fn sign(&mut self) -> SIGN_W {
+ SIGN_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 = "Frequency Correction\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 [freqcorr](index.html) module"]
+pub struct FREQCORR_SPEC;
+impl crate::RegisterSpec for FREQCORR_SPEC {
+ type Ux = u8;
+}
+#[doc = "`read()` method returns [freqcorr::R](R) reader structure"]
+impl crate::Readable for FREQCORR_SPEC {
+ type Reader = R;
+}
+#[doc = "`write(|w| ..)` method takes [freqcorr::W](W) writer structure"]
+impl crate::Writable for FREQCORR_SPEC {
+ type Writer = W;
+}
+#[doc = "`reset()` method sets FREQCORR to value 0"]
+impl crate::Resettable for FREQCORR_SPEC {
+ #[inline(always)]
+ fn reset_value() -> Self::Ux {
+ 0
+ }
+}
diff --git a/src/rtc/mode1/intenclr.rs b/src/rtc/mode1/intenclr.rs
new file mode 100644
index 0000000..1e1affb
--- /dev/null
+++ b/src/rtc/mode1/intenclr.rs
@@ -0,0 +1,572 @@
+#[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 `PER0` reader - Periodic Interval 0 Interrupt Enable"]
+pub struct PER0_R(crate::FieldReader<bool, bool>);
+impl PER0_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER0_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER0_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER0` writer - Periodic Interval 0 Interrupt Enable"]
+pub struct PER0_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER0_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 u16 & 0x01);
+ self.w
+ }
+}
+#[doc = "Field `PER1` reader - Periodic Interval 1 Interrupt Enable"]
+pub struct PER1_R(crate::FieldReader<bool, bool>);
+impl PER1_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER1_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER1_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER1` writer - Periodic Interval 1 Interrupt Enable"]
+pub struct PER1_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER1_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 u16 & 0x01) << 1);
+ self.w
+ }
+}
+#[doc = "Field `PER2` reader - Periodic Interval 2 Interrupt Enable"]
+pub struct PER2_R(crate::FieldReader<bool, bool>);
+impl PER2_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER2_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER2_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER2` writer - Periodic Interval 2 Interrupt Enable"]
+pub struct PER2_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER2_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 u16 & 0x01) << 2);
+ self.w
+ }
+}
+#[doc = "Field `PER3` reader - Periodic Interval 3 Interrupt Enable"]
+pub struct PER3_R(crate::FieldReader<bool, bool>);
+impl PER3_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER3_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER3_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER3` writer - Periodic Interval 3 Interrupt Enable"]
+pub struct PER3_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER3_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 u16 & 0x01) << 3);
+ self.w
+ }
+}
+#[doc = "Field `PER4` reader - Periodic Interval 4 Interrupt Enable"]
+pub struct PER4_R(crate::FieldReader<bool, bool>);
+impl PER4_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER4_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER4_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER4` writer - Periodic Interval 4 Interrupt Enable"]
+pub struct PER4_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER4_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 u16 & 0x01) << 4);
+ self.w
+ }
+}
+#[doc = "Field `PER5` reader - Periodic Interval 5 Interrupt Enable"]
+pub struct PER5_R(crate::FieldReader<bool, bool>);
+impl PER5_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER5_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER5_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER5` writer - Periodic Interval 5 Interrupt Enable"]
+pub struct PER5_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER5_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 u16 & 0x01) << 5);
+ self.w
+ }
+}
+#[doc = "Field `PER6` reader - Periodic Interval 6 Interrupt Enable"]
+pub struct PER6_R(crate::FieldReader<bool, bool>);
+impl PER6_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER6_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER6_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER6` writer - Periodic Interval 6 Interrupt Enable"]
+pub struct PER6_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER6_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 u16 & 0x01) << 6);
+ self.w
+ }
+}
+#[doc = "Field `PER7` reader - Periodic Interval 7 Interrupt Enable"]
+pub struct PER7_R(crate::FieldReader<bool, bool>);
+impl PER7_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER7_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER7_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER7` writer - Periodic Interval 7 Interrupt Enable"]
+pub struct PER7_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER7_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 u16 & 0x01) << 7);
+ self.w
+ }
+}
+#[doc = "Field `CMP0` reader - Compare 0 Interrupt Enable"]
+pub struct CMP0_R(crate::FieldReader<bool, bool>);
+impl CMP0_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ CMP0_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for CMP0_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `CMP0` writer - Compare 0 Interrupt Enable"]
+pub struct CMP0_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> CMP0_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 u16 & 0x01) << 8);
+ self.w
+ }
+}
+#[doc = "Field `CMP1` reader - Compare 1 Interrupt Enable"]
+pub struct CMP1_R(crate::FieldReader<bool, bool>);
+impl CMP1_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ CMP1_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for CMP1_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `CMP1` writer - Compare 1 Interrupt Enable"]
+pub struct CMP1_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> CMP1_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 u16 & 0x01) << 9);
+ self.w
+ }
+}
+#[doc = "Field `OVF` reader - Overflow Interrupt Enable"]
+pub struct OVF_R(crate::FieldReader<bool, bool>);
+impl OVF_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ OVF_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for OVF_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `OVF` writer - Overflow Interrupt Enable"]
+pub struct OVF_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> OVF_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 u16 & 0x01) << 15);
+ self.w
+ }
+}
+impl R {
+ #[doc = "Bit 0 - Periodic Interval 0 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per0(&self) -> PER0_R {
+ PER0_R::new((self.bits & 0x01) != 0)
+ }
+ #[doc = "Bit 1 - Periodic Interval 1 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per1(&self) -> PER1_R {
+ PER1_R::new(((self.bits >> 1) & 0x01) != 0)
+ }
+ #[doc = "Bit 2 - Periodic Interval 2 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per2(&self) -> PER2_R {
+ PER2_R::new(((self.bits >> 2) & 0x01) != 0)
+ }
+ #[doc = "Bit 3 - Periodic Interval 3 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per3(&self) -> PER3_R {
+ PER3_R::new(((self.bits >> 3) & 0x01) != 0)
+ }
+ #[doc = "Bit 4 - Periodic Interval 4 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per4(&self) -> PER4_R {
+ PER4_R::new(((self.bits >> 4) & 0x01) != 0)
+ }
+ #[doc = "Bit 5 - Periodic Interval 5 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per5(&self) -> PER5_R {
+ PER5_R::new(((self.bits >> 5) & 0x01) != 0)
+ }
+ #[doc = "Bit 6 - Periodic Interval 6 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per6(&self) -> PER6_R {
+ PER6_R::new(((self.bits >> 6) & 0x01) != 0)
+ }
+ #[doc = "Bit 7 - Periodic Interval 7 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per7(&self) -> PER7_R {
+ PER7_R::new(((self.bits >> 7) & 0x01) != 0)
+ }
+ #[doc = "Bit 8 - Compare 0 Interrupt Enable"]
+ #[inline(always)]
+ pub fn cmp0(&self) -> CMP0_R {
+ CMP0_R::new(((self.bits >> 8) & 0x01) != 0)
+ }
+ #[doc = "Bit 9 - Compare 1 Interrupt Enable"]
+ #[inline(always)]
+ pub fn cmp1(&self) -> CMP1_R {
+ CMP1_R::new(((self.bits >> 9) & 0x01) != 0)
+ }
+ #[doc = "Bit 15 - Overflow Interrupt Enable"]
+ #[inline(always)]
+ pub fn ovf(&self) -> OVF_R {
+ OVF_R::new(((self.bits >> 15) & 0x01) != 0)
+ }
+}
+impl W {
+ #[doc = "Bit 0 - Periodic Interval 0 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per0(&mut self) -> PER0_W {
+ PER0_W { w: self }
+ }
+ #[doc = "Bit 1 - Periodic Interval 1 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per1(&mut self) -> PER1_W {
+ PER1_W { w: self }
+ }
+ #[doc = "Bit 2 - Periodic Interval 2 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per2(&mut self) -> PER2_W {
+ PER2_W { w: self }
+ }
+ #[doc = "Bit 3 - Periodic Interval 3 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per3(&mut self) -> PER3_W {
+ PER3_W { w: self }
+ }
+ #[doc = "Bit 4 - Periodic Interval 4 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per4(&mut self) -> PER4_W {
+ PER4_W { w: self }
+ }
+ #[doc = "Bit 5 - Periodic Interval 5 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per5(&mut self) -> PER5_W {
+ PER5_W { w: self }
+ }
+ #[doc = "Bit 6 - Periodic Interval 6 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per6(&mut self) -> PER6_W {
+ PER6_W { w: self }
+ }
+ #[doc = "Bit 7 - Periodic Interval 7 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per7(&mut self) -> PER7_W {
+ PER7_W { w: self }
+ }
+ #[doc = "Bit 8 - Compare 0 Interrupt Enable"]
+ #[inline(always)]
+ pub fn cmp0(&mut self) -> CMP0_W {
+ CMP0_W { w: self }
+ }
+ #[doc = "Bit 9 - Compare 1 Interrupt Enable"]
+ #[inline(always)]
+ pub fn cmp1(&mut self) -> CMP1_W {
+ CMP1_W { w: self }
+ }
+ #[doc = "Bit 15 - Overflow Interrupt Enable"]
+ #[inline(always)]
+ pub fn ovf(&mut self) -> OVF_W {
+ OVF_W { w: self }
+ }
+ #[doc = "Writes raw bits to the register."]
+ #[inline(always)]
+ pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
+ self.0.bits(bits);
+ self
+ }
+}
+#[doc = "MODE1 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 = u16;
+}
+#[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/rtc/mode1/intenset.rs b/src/rtc/mode1/intenset.rs
new file mode 100644
index 0000000..8955110
--- /dev/null
+++ b/src/rtc/mode1/intenset.rs
@@ -0,0 +1,572 @@
+#[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 `PER0` reader - Periodic Interval 0 Interrupt Enable"]
+pub struct PER0_R(crate::FieldReader<bool, bool>);
+impl PER0_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER0_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER0_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER0` writer - Periodic Interval 0 Interrupt Enable"]
+pub struct PER0_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER0_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 u16 & 0x01);
+ self.w
+ }
+}
+#[doc = "Field `PER1` reader - Periodic Interval 1 Interrupt Enable"]
+pub struct PER1_R(crate::FieldReader<bool, bool>);
+impl PER1_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER1_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER1_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER1` writer - Periodic Interval 1 Interrupt Enable"]
+pub struct PER1_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER1_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 u16 & 0x01) << 1);
+ self.w
+ }
+}
+#[doc = "Field `PER2` reader - Periodic Interval 2 Interrupt Enable"]
+pub struct PER2_R(crate::FieldReader<bool, bool>);
+impl PER2_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER2_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER2_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER2` writer - Periodic Interval 2 Interrupt Enable"]
+pub struct PER2_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER2_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 u16 & 0x01) << 2);
+ self.w
+ }
+}
+#[doc = "Field `PER3` reader - Periodic Interval 3 Interrupt Enable"]
+pub struct PER3_R(crate::FieldReader<bool, bool>);
+impl PER3_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER3_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER3_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER3` writer - Periodic Interval 3 Interrupt Enable"]
+pub struct PER3_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER3_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 u16 & 0x01) << 3);
+ self.w
+ }
+}
+#[doc = "Field `PER4` reader - Periodic Interval 4 Interrupt Enable"]
+pub struct PER4_R(crate::FieldReader<bool, bool>);
+impl PER4_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER4_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER4_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER4` writer - Periodic Interval 4 Interrupt Enable"]
+pub struct PER4_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER4_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 u16 & 0x01) << 4);
+ self.w
+ }
+}
+#[doc = "Field `PER5` reader - Periodic Interval 5 Interrupt Enable"]
+pub struct PER5_R(crate::FieldReader<bool, bool>);
+impl PER5_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER5_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER5_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER5` writer - Periodic Interval 5 Interrupt Enable"]
+pub struct PER5_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER5_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 u16 & 0x01) << 5);
+ self.w
+ }
+}
+#[doc = "Field `PER6` reader - Periodic Interval 6 Interrupt Enable"]
+pub struct PER6_R(crate::FieldReader<bool, bool>);
+impl PER6_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER6_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER6_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER6` writer - Periodic Interval 6 Interrupt Enable"]
+pub struct PER6_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER6_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 u16 & 0x01) << 6);
+ self.w
+ }
+}
+#[doc = "Field `PER7` reader - Periodic Interval 7 Interrupt Enable"]
+pub struct PER7_R(crate::FieldReader<bool, bool>);
+impl PER7_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER7_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER7_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER7` writer - Periodic Interval 7 Interrupt Enable"]
+pub struct PER7_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER7_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 u16 & 0x01) << 7);
+ self.w
+ }
+}
+#[doc = "Field `CMP0` reader - Compare 0 Interrupt Enable"]
+pub struct CMP0_R(crate::FieldReader<bool, bool>);
+impl CMP0_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ CMP0_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for CMP0_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `CMP0` writer - Compare 0 Interrupt Enable"]
+pub struct CMP0_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> CMP0_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 u16 & 0x01) << 8);
+ self.w
+ }
+}
+#[doc = "Field `CMP1` reader - Compare 1 Interrupt Enable"]
+pub struct CMP1_R(crate::FieldReader<bool, bool>);
+impl CMP1_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ CMP1_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for CMP1_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `CMP1` writer - Compare 1 Interrupt Enable"]
+pub struct CMP1_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> CMP1_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 u16 & 0x01) << 9);
+ self.w
+ }
+}
+#[doc = "Field `OVF` reader - Overflow Interrupt Enable"]
+pub struct OVF_R(crate::FieldReader<bool, bool>);
+impl OVF_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ OVF_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for OVF_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `OVF` writer - Overflow Interrupt Enable"]
+pub struct OVF_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> OVF_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 u16 & 0x01) << 15);
+ self.w
+ }
+}
+impl R {
+ #[doc = "Bit 0 - Periodic Interval 0 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per0(&self) -> PER0_R {
+ PER0_R::new((self.bits & 0x01) != 0)
+ }
+ #[doc = "Bit 1 - Periodic Interval 1 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per1(&self) -> PER1_R {
+ PER1_R::new(((self.bits >> 1) & 0x01) != 0)
+ }
+ #[doc = "Bit 2 - Periodic Interval 2 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per2(&self) -> PER2_R {
+ PER2_R::new(((self.bits >> 2) & 0x01) != 0)
+ }
+ #[doc = "Bit 3 - Periodic Interval 3 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per3(&self) -> PER3_R {
+ PER3_R::new(((self.bits >> 3) & 0x01) != 0)
+ }
+ #[doc = "Bit 4 - Periodic Interval 4 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per4(&self) -> PER4_R {
+ PER4_R::new(((self.bits >> 4) & 0x01) != 0)
+ }
+ #[doc = "Bit 5 - Periodic Interval 5 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per5(&self) -> PER5_R {
+ PER5_R::new(((self.bits >> 5) & 0x01) != 0)
+ }
+ #[doc = "Bit 6 - Periodic Interval 6 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per6(&self) -> PER6_R {
+ PER6_R::new(((self.bits >> 6) & 0x01) != 0)
+ }
+ #[doc = "Bit 7 - Periodic Interval 7 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per7(&self) -> PER7_R {
+ PER7_R::new(((self.bits >> 7) & 0x01) != 0)
+ }
+ #[doc = "Bit 8 - Compare 0 Interrupt Enable"]
+ #[inline(always)]
+ pub fn cmp0(&self) -> CMP0_R {
+ CMP0_R::new(((self.bits >> 8) & 0x01) != 0)
+ }
+ #[doc = "Bit 9 - Compare 1 Interrupt Enable"]
+ #[inline(always)]
+ pub fn cmp1(&self) -> CMP1_R {
+ CMP1_R::new(((self.bits >> 9) & 0x01) != 0)
+ }
+ #[doc = "Bit 15 - Overflow Interrupt Enable"]
+ #[inline(always)]
+ pub fn ovf(&self) -> OVF_R {
+ OVF_R::new(((self.bits >> 15) & 0x01) != 0)
+ }
+}
+impl W {
+ #[doc = "Bit 0 - Periodic Interval 0 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per0(&mut self) -> PER0_W {
+ PER0_W { w: self }
+ }
+ #[doc = "Bit 1 - Periodic Interval 1 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per1(&mut self) -> PER1_W {
+ PER1_W { w: self }
+ }
+ #[doc = "Bit 2 - Periodic Interval 2 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per2(&mut self) -> PER2_W {
+ PER2_W { w: self }
+ }
+ #[doc = "Bit 3 - Periodic Interval 3 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per3(&mut self) -> PER3_W {
+ PER3_W { w: self }
+ }
+ #[doc = "Bit 4 - Periodic Interval 4 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per4(&mut self) -> PER4_W {
+ PER4_W { w: self }
+ }
+ #[doc = "Bit 5 - Periodic Interval 5 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per5(&mut self) -> PER5_W {
+ PER5_W { w: self }
+ }
+ #[doc = "Bit 6 - Periodic Interval 6 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per6(&mut self) -> PER6_W {
+ PER6_W { w: self }
+ }
+ #[doc = "Bit 7 - Periodic Interval 7 Interrupt Enable"]
+ #[inline(always)]
+ pub fn per7(&mut self) -> PER7_W {
+ PER7_W { w: self }
+ }
+ #[doc = "Bit 8 - Compare 0 Interrupt Enable"]
+ #[inline(always)]
+ pub fn cmp0(&mut self) -> CMP0_W {
+ CMP0_W { w: self }
+ }
+ #[doc = "Bit 9 - Compare 1 Interrupt Enable"]
+ #[inline(always)]
+ pub fn cmp1(&mut self) -> CMP1_W {
+ CMP1_W { w: self }
+ }
+ #[doc = "Bit 15 - Overflow Interrupt Enable"]
+ #[inline(always)]
+ pub fn ovf(&mut self) -> OVF_W {
+ OVF_W { w: self }
+ }
+ #[doc = "Writes raw bits to the register."]
+ #[inline(always)]
+ pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
+ self.0.bits(bits);
+ self
+ }
+}
+#[doc = "MODE1 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 = u16;
+}
+#[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/rtc/mode1/intflag.rs b/src/rtc/mode1/intflag.rs
new file mode 100644
index 0000000..bb11175
--- /dev/null
+++ b/src/rtc/mode1/intflag.rs
@@ -0,0 +1,572 @@
+#[doc = "Register `INTFLAG` reader"]
+pub struct R(crate::R<INTFLAG_SPEC>);
+impl core::ops::Deref for R {
+ type Target = crate::R<INTFLAG_SPEC>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+impl From<crate::R<INTFLAG_SPEC>> for R {
+ #[inline(always)]
+ fn from(reader: crate::R<INTFLAG_SPEC>) -> Self {
+ R(reader)
+ }
+}
+#[doc = "Register `INTFLAG` writer"]
+pub struct W(crate::W<INTFLAG_SPEC>);
+impl core::ops::Deref for W {
+ type Target = crate::W<INTFLAG_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<INTFLAG_SPEC>> for W {
+ #[inline(always)]
+ fn from(writer: crate::W<INTFLAG_SPEC>) -> Self {
+ W(writer)
+ }
+}
+#[doc = "Field `PER0` reader - Periodic Interval 0"]
+pub struct PER0_R(crate::FieldReader<bool, bool>);
+impl PER0_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER0_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER0_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER0` writer - Periodic Interval 0"]
+pub struct PER0_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER0_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 u16 & 0x01);
+ self.w
+ }
+}
+#[doc = "Field `PER1` reader - Periodic Interval 1"]
+pub struct PER1_R(crate::FieldReader<bool, bool>);
+impl PER1_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER1_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER1_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER1` writer - Periodic Interval 1"]
+pub struct PER1_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER1_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 u16 & 0x01) << 1);
+ self.w
+ }
+}
+#[doc = "Field `PER2` reader - Periodic Interval 2"]
+pub struct PER2_R(crate::FieldReader<bool, bool>);
+impl PER2_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER2_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER2_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER2` writer - Periodic Interval 2"]
+pub struct PER2_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER2_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 u16 & 0x01) << 2);
+ self.w
+ }
+}
+#[doc = "Field `PER3` reader - Periodic Interval 3"]
+pub struct PER3_R(crate::FieldReader<bool, bool>);
+impl PER3_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER3_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER3_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER3` writer - Periodic Interval 3"]
+pub struct PER3_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER3_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 u16 & 0x01) << 3);
+ self.w
+ }
+}
+#[doc = "Field `PER4` reader - Periodic Interval 4"]
+pub struct PER4_R(crate::FieldReader<bool, bool>);
+impl PER4_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER4_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER4_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER4` writer - Periodic Interval 4"]
+pub struct PER4_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER4_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 u16 & 0x01) << 4);
+ self.w
+ }
+}
+#[doc = "Field `PER5` reader - Periodic Interval 5"]
+pub struct PER5_R(crate::FieldReader<bool, bool>);
+impl PER5_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER5_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER5_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER5` writer - Periodic Interval 5"]
+pub struct PER5_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER5_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 u16 & 0x01) << 5);
+ self.w
+ }
+}
+#[doc = "Field `PER6` reader - Periodic Interval 6"]
+pub struct PER6_R(crate::FieldReader<bool, bool>);
+impl PER6_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER6_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER6_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER6` writer - Periodic Interval 6"]
+pub struct PER6_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER6_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 u16 & 0x01) << 6);
+ self.w
+ }
+}
+#[doc = "Field `PER7` reader - Periodic Interval 7"]
+pub struct PER7_R(crate::FieldReader<bool, bool>);
+impl PER7_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER7_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER7_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER7` writer - Periodic Interval 7"]
+pub struct PER7_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER7_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 u16 & 0x01) << 7);
+ self.w
+ }
+}
+#[doc = "Field `CMP0` reader - Compare 0"]
+pub struct CMP0_R(crate::FieldReader<bool, bool>);
+impl CMP0_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ CMP0_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for CMP0_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `CMP0` writer - Compare 0"]
+pub struct CMP0_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> CMP0_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 u16 & 0x01) << 8);
+ self.w
+ }
+}
+#[doc = "Field `CMP1` reader - Compare 1"]
+pub struct CMP1_R(crate::FieldReader<bool, bool>);
+impl CMP1_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ CMP1_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for CMP1_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `CMP1` writer - Compare 1"]
+pub struct CMP1_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> CMP1_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 u16 & 0x01) << 9);
+ self.w
+ }
+}
+#[doc = "Field `OVF` reader - Overflow"]
+pub struct OVF_R(crate::FieldReader<bool, bool>);
+impl OVF_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ OVF_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for OVF_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `OVF` writer - Overflow"]
+pub struct OVF_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> OVF_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 u16 & 0x01) << 15);
+ self.w
+ }
+}
+impl R {
+ #[doc = "Bit 0 - Periodic Interval 0"]
+ #[inline(always)]
+ pub fn per0(&self) -> PER0_R {
+ PER0_R::new((self.bits & 0x01) != 0)
+ }
+ #[doc = "Bit 1 - Periodic Interval 1"]
+ #[inline(always)]
+ pub fn per1(&self) -> PER1_R {
+ PER1_R::new(((self.bits >> 1) & 0x01) != 0)
+ }
+ #[doc = "Bit 2 - Periodic Interval 2"]
+ #[inline(always)]
+ pub fn per2(&self) -> PER2_R {
+ PER2_R::new(((self.bits >> 2) & 0x01) != 0)
+ }
+ #[doc = "Bit 3 - Periodic Interval 3"]
+ #[inline(always)]
+ pub fn per3(&self) -> PER3_R {
+ PER3_R::new(((self.bits >> 3) & 0x01) != 0)
+ }
+ #[doc = "Bit 4 - Periodic Interval 4"]
+ #[inline(always)]
+ pub fn per4(&self) -> PER4_R {
+ PER4_R::new(((self.bits >> 4) & 0x01) != 0)
+ }
+ #[doc = "Bit 5 - Periodic Interval 5"]
+ #[inline(always)]
+ pub fn per5(&self) -> PER5_R {
+ PER5_R::new(((self.bits >> 5) & 0x01) != 0)
+ }
+ #[doc = "Bit 6 - Periodic Interval 6"]
+ #[inline(always)]
+ pub fn per6(&self) -> PER6_R {
+ PER6_R::new(((self.bits >> 6) & 0x01) != 0)
+ }
+ #[doc = "Bit 7 - Periodic Interval 7"]
+ #[inline(always)]
+ pub fn per7(&self) -> PER7_R {
+ PER7_R::new(((self.bits >> 7) & 0x01) != 0)
+ }
+ #[doc = "Bit 8 - Compare 0"]
+ #[inline(always)]
+ pub fn cmp0(&self) -> CMP0_R {
+ CMP0_R::new(((self.bits >> 8) & 0x01) != 0)
+ }
+ #[doc = "Bit 9 - Compare 1"]
+ #[inline(always)]
+ pub fn cmp1(&self) -> CMP1_R {
+ CMP1_R::new(((self.bits >> 9) & 0x01) != 0)
+ }
+ #[doc = "Bit 15 - Overflow"]
+ #[inline(always)]
+ pub fn ovf(&self) -> OVF_R {
+ OVF_R::new(((self.bits >> 15) & 0x01) != 0)
+ }
+}
+impl W {
+ #[doc = "Bit 0 - Periodic Interval 0"]
+ #[inline(always)]
+ pub fn per0(&mut self) -> PER0_W {
+ PER0_W { w: self }
+ }
+ #[doc = "Bit 1 - Periodic Interval 1"]
+ #[inline(always)]
+ pub fn per1(&mut self) -> PER1_W {
+ PER1_W { w: self }
+ }
+ #[doc = "Bit 2 - Periodic Interval 2"]
+ #[inline(always)]
+ pub fn per2(&mut self) -> PER2_W {
+ PER2_W { w: self }
+ }
+ #[doc = "Bit 3 - Periodic Interval 3"]
+ #[inline(always)]
+ pub fn per3(&mut self) -> PER3_W {
+ PER3_W { w: self }
+ }
+ #[doc = "Bit 4 - Periodic Interval 4"]
+ #[inline(always)]
+ pub fn per4(&mut self) -> PER4_W {
+ PER4_W { w: self }
+ }
+ #[doc = "Bit 5 - Periodic Interval 5"]
+ #[inline(always)]
+ pub fn per5(&mut self) -> PER5_W {
+ PER5_W { w: self }
+ }
+ #[doc = "Bit 6 - Periodic Interval 6"]
+ #[inline(always)]
+ pub fn per6(&mut self) -> PER6_W {
+ PER6_W { w: self }
+ }
+ #[doc = "Bit 7 - Periodic Interval 7"]
+ #[inline(always)]
+ pub fn per7(&mut self) -> PER7_W {
+ PER7_W { w: self }
+ }
+ #[doc = "Bit 8 - Compare 0"]
+ #[inline(always)]
+ pub fn cmp0(&mut self) -> CMP0_W {
+ CMP0_W { w: self }
+ }
+ #[doc = "Bit 9 - Compare 1"]
+ #[inline(always)]
+ pub fn cmp1(&mut self) -> CMP1_W {
+ CMP1_W { w: self }
+ }
+ #[doc = "Bit 15 - Overflow"]
+ #[inline(always)]
+ pub fn ovf(&mut self) -> OVF_W {
+ OVF_W { w: self }
+ }
+ #[doc = "Writes raw bits to the register."]
+ #[inline(always)]
+ pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
+ self.0.bits(bits);
+ self
+ }
+}
+#[doc = "MODE1 Interrupt Flag Status and 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 [intflag](index.html) module"]
+pub struct INTFLAG_SPEC;
+impl crate::RegisterSpec for INTFLAG_SPEC {
+ type Ux = u16;
+}
+#[doc = "`read()` method returns [intflag::R](R) reader structure"]
+impl crate::Readable for INTFLAG_SPEC {
+ type Reader = R;
+}
+#[doc = "`write(|w| ..)` method takes [intflag::W](W) writer structure"]
+impl crate::Writable for INTFLAG_SPEC {
+ type Writer = W;
+}
+#[doc = "`reset()` method sets INTFLAG to value 0"]
+impl crate::Resettable for INTFLAG_SPEC {
+ #[inline(always)]
+ fn reset_value() -> Self::Ux {
+ 0
+ }
+}
diff --git a/src/rtc/mode1/per.rs b/src/rtc/mode1/per.rs
new file mode 100644
index 0000000..a83b4d8
--- /dev/null
+++ b/src/rtc/mode1/per.rs
@@ -0,0 +1,102 @@
+#[doc = "Register `PER` reader"]
+pub struct R(crate::R<PER_SPEC>);
+impl core::ops::Deref for R {
+ type Target = crate::R<PER_SPEC>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+impl From<crate::R<PER_SPEC>> for R {
+ #[inline(always)]
+ fn from(reader: crate::R<PER_SPEC>) -> Self {
+ R(reader)
+ }
+}
+#[doc = "Register `PER` writer"]
+pub struct W(crate::W<PER_SPEC>);
+impl core::ops::Deref for W {
+ type Target = crate::W<PER_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<PER_SPEC>> for W {
+ #[inline(always)]
+ fn from(writer: crate::W<PER_SPEC>) -> Self {
+ W(writer)
+ }
+}
+#[doc = "Field `PER` reader - Counter Period"]
+pub struct PER_R(crate::FieldReader<u16, u16>);
+impl PER_R {
+ pub(crate) fn new(bits: u16) -> Self {
+ PER_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER_R {
+ type Target = crate::FieldReader<u16, u16>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER` writer - Counter Period"]
+pub struct PER_W<'a> {
+ w: &'a mut W,
+}
+impl<'a> PER_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 u16 & 0xffff);
+ self.w
+ }
+}
+impl R {
+ #[doc = "Bits 0:15 - Counter Period"]
+ #[inline(always)]
+ pub fn per(&self) -> PER_R {
+ PER_R::new((self.bits & 0xffff) as u16)
+ }
+}
+impl W {
+ #[doc = "Bits 0:15 - Counter Period"]
+ #[inline(always)]
+ pub fn per(&mut self) -> PER_W {
+ PER_W { w: self }
+ }
+ #[doc = "Writes raw bits to the register."]
+ #[inline(always)]
+ pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
+ self.0.bits(bits);
+ self
+ }
+}
+#[doc = "MODE1 Counter Period\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 [per](index.html) module"]
+pub struct PER_SPEC;
+impl crate::RegisterSpec for PER_SPEC {
+ type Ux = u16;
+}
+#[doc = "`read()` method returns [per::R](R) reader structure"]
+impl crate::Readable for PER_SPEC {
+ type Reader = R;
+}
+#[doc = "`write(|w| ..)` method takes [per::W](W) writer structure"]
+impl crate::Writable for PER_SPEC {
+ type Writer = W;
+}
+#[doc = "`reset()` method sets PER to value 0"]
+impl crate::Resettable for PER_SPEC {
+ #[inline(always)]
+ fn reset_value() -> Self::Ux {
+ 0
+ }
+}
diff --git a/src/rtc/mode1/syncbusy.rs b/src/rtc/mode1/syncbusy.rs
new file mode 100644
index 0000000..ec786fb
--- /dev/null
+++ b/src/rtc/mode1/syncbusy.rs
@@ -0,0 +1,185 @@
+#[doc = "Register `SYNCBUSY` reader"]
+pub struct R(crate::R<SYNCBUSY_SPEC>);
+impl core::ops::Deref for R {
+ type Target = crate::R<SYNCBUSY_SPEC>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+impl From<crate::R<SYNCBUSY_SPEC>> for R {
+ #[inline(always)]
+ fn from(reader: crate::R<SYNCBUSY_SPEC>) -> Self {
+ R(reader)
+ }
+}
+#[doc = "Field `SWRST` reader - Software Reset Bit Busy"]
+pub struct SWRST_R(crate::FieldReader<bool, bool>);
+impl SWRST_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ SWRST_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for SWRST_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `ENABLE` reader - Enable Bit Busy"]
+pub struct ENABLE_R(crate::FieldReader<bool, bool>);
+impl ENABLE_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ ENABLE_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for ENABLE_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `FREQCORR` reader - FREQCORR Register Busy"]
+pub struct FREQCORR_R(crate::FieldReader<bool, bool>);
+impl FREQCORR_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ FREQCORR_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for FREQCORR_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `COUNT` reader - COUNT Register Busy"]
+pub struct COUNT_R(crate::FieldReader<bool, bool>);
+impl COUNT_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ COUNT_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for COUNT_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `PER` reader - PER Register Busy"]
+pub struct PER_R(crate::FieldReader<bool, bool>);
+impl PER_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ PER_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for PER_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `COMP0` reader - COMP 0 Register Busy"]
+pub struct COMP0_R(crate::FieldReader<bool, bool>);
+impl COMP0_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ COMP0_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for COMP0_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `COMP1` reader - COMP 1 Register Busy"]
+pub struct COMP1_R(crate::FieldReader<bool, bool>);
+impl COMP1_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ COMP1_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for COMP1_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+#[doc = "Field `COUNTSYNC` reader - Count Read Synchronization Enable Bit Busy"]
+pub struct COUNTSYNC_R(crate::FieldReader<bool, bool>);
+impl COUNTSYNC_R {
+ pub(crate) fn new(bits: bool) -> Self {
+ COUNTSYNC_R(crate::FieldReader::new(bits))
+ }
+}
+impl core::ops::Deref for COUNTSYNC_R {
+ type Target = crate::FieldReader<bool, bool>;
+ #[inline(always)]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+impl R {
+ #[doc = "Bit 0 - Software Reset Bit Busy"]
+ #[inline(always)]
+ pub fn swrst(&self) -> SWRST_R {
+ SWRST_R::new((self.bits & 0x01) != 0)
+ }
+ #[doc = "Bit 1 - Enable Bit Busy"]
+ #[inline(always)]
+ pub fn enable(&self) -> ENABLE_R {
+ ENABLE_R::new(((self.bits >> 1) & 0x01) != 0)
+ }
+ #[doc = "Bit 2 - FREQCORR Register Busy"]
+ #[inline(always)]
+ pub fn freqcorr(&self) -> FREQCORR_R {
+ FREQCORR_R::new(((self.bits >> 2) & 0x01) != 0)
+ }
+ #[doc = "Bit 3 - COUNT Register Busy"]
+ #[inline(always)]
+ pub fn count(&self) -> COUNT_R {
+ COUNT_R::new(((self.bits >> 3) & 0x01) != 0)
+ }
+ #[doc = "Bit 4 - PER Register Busy"]
+ #[inline(always)]
+ pub fn per(&self) -> PER_R {
+ PER_R::new(((self.bits >> 4) & 0x01) != 0)
+ }
+ #[doc = "Bit 5 - COMP 0 Register Busy"]
+ #[inline(always)]
+ pub fn comp0(&self) -> COMP0_R {
+ COMP0_R::new(((self.bits >> 5) & 0x01) != 0)
+ }
+ #[doc = "Bit 6 - COMP 1 Register Busy"]
+ #[inline(always)]
+ pub fn comp1(&self) -> COMP1_R {
+ COMP1_R::new(((self.bits >> 6) & 0x01) != 0)
+ }
+ #[doc = "Bit 15 - Count Read Synchronization Enable Bit Busy"]
+ #[inline(always)]
+ pub fn countsync(&self) -> COUNTSYNC_R {
+ COUNTSYNC_R::new(((self.bits >> 15) & 0x01) != 0)
+ }
+}
+#[doc = "MODE1 Synchronization Busy Status\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 [syncbusy](index.html) module"]
+pub struct SYNCBUSY_SPEC;
+impl crate::RegisterSpec for SYNCBUSY_SPEC {
+ type Ux = u32;
+}
+#[doc = "`read()` method returns [syncbusy::R](R) reader structure"]
+impl crate::Readable for SYNCBUSY_SPEC {
+ type Reader = R;
+}
+#[doc = "`reset()` method sets SYNCBUSY to value 0"]
+impl crate::Resettable for SYNCBUSY_SPEC {
+ #[inline(always)]
+ fn reset_value() -> Self::Ux {
+ 0
+ }
+}