Initial commit

This commit is contained in:
Thomas Klaehn
2021-06-04 07:58:05 +02:00
commit 060cfea264
805 changed files with 204833 additions and 0 deletions

252
src/wdt/config.rs Normal file
View File

@@ -0,0 +1,252 @@
#[doc = "Register `CONFIG` reader"]
pub struct R(crate::R<CONFIG_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CONFIG_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CONFIG_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CONFIG_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CONFIG` writer"]
pub struct W(crate::W<CONFIG_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CONFIG_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<CONFIG_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CONFIG_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Configure the watchdog to either be paused, or kept running, while the CPU is sleeping\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SLEEP_A {
#[doc = "0: Pause watchdog while the CPU is sleeping"]
PAUSE = 0,
#[doc = "1: Keep the watchdog running while the CPU is sleeping"]
RUN = 1,
}
impl From<SLEEP_A> for bool {
#[inline(always)]
fn from(variant: SLEEP_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `SLEEP` reader - Configure the watchdog to either be paused, or kept running, while the CPU is sleeping"]
pub struct SLEEP_R(crate::FieldReader<bool, SLEEP_A>);
impl SLEEP_R {
pub(crate) fn new(bits: bool) -> Self {
SLEEP_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SLEEP_A {
match self.bits {
false => SLEEP_A::PAUSE,
true => SLEEP_A::RUN,
}
}
#[doc = "Checks if the value of the field is `PAUSE`"]
#[inline(always)]
pub fn is_pause(&self) -> bool {
**self == SLEEP_A::PAUSE
}
#[doc = "Checks if the value of the field is `RUN`"]
#[inline(always)]
pub fn is_run(&self) -> bool {
**self == SLEEP_A::RUN
}
}
impl core::ops::Deref for SLEEP_R {
type Target = crate::FieldReader<bool, SLEEP_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `SLEEP` writer - Configure the watchdog to either be paused, or kept running, while the CPU is sleeping"]
pub struct SLEEP_W<'a> {
w: &'a mut W,
}
impl<'a> SLEEP_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: SLEEP_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Pause watchdog while the CPU is sleeping"]
#[inline(always)]
pub fn pause(self) -> &'a mut W {
self.variant(SLEEP_A::PAUSE)
}
#[doc = "Keep the watchdog running while the CPU is sleeping"]
#[inline(always)]
pub fn run(self) -> &'a mut W {
self.variant(SLEEP_A::RUN)
}
#[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 = "Configure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum HALT_A {
#[doc = "0: Pause watchdog while the CPU is halted by the debugger"]
PAUSE = 0,
#[doc = "1: Keep the watchdog running while the CPU is halted by the debugger"]
RUN = 1,
}
impl From<HALT_A> for bool {
#[inline(always)]
fn from(variant: HALT_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `HALT` reader - Configure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger"]
pub struct HALT_R(crate::FieldReader<bool, HALT_A>);
impl HALT_R {
pub(crate) fn new(bits: bool) -> Self {
HALT_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> HALT_A {
match self.bits {
false => HALT_A::PAUSE,
true => HALT_A::RUN,
}
}
#[doc = "Checks if the value of the field is `PAUSE`"]
#[inline(always)]
pub fn is_pause(&self) -> bool {
**self == HALT_A::PAUSE
}
#[doc = "Checks if the value of the field is `RUN`"]
#[inline(always)]
pub fn is_run(&self) -> bool {
**self == HALT_A::RUN
}
}
impl core::ops::Deref for HALT_R {
type Target = crate::FieldReader<bool, HALT_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `HALT` writer - Configure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger"]
pub struct HALT_W<'a> {
w: &'a mut W,
}
impl<'a> HALT_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: HALT_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Pause watchdog while the CPU is halted by the debugger"]
#[inline(always)]
pub fn pause(self) -> &'a mut W {
self.variant(HALT_A::PAUSE)
}
#[doc = "Keep the watchdog running while the CPU is halted by the debugger"]
#[inline(always)]
pub fn run(self) -> &'a mut W {
self.variant(HALT_A::RUN)
}
#[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
}
}
impl R {
#[doc = "Bit 0 - Configure the watchdog to either be paused, or kept running, while the CPU is sleeping"]
#[inline(always)]
pub fn sleep(&self) -> SLEEP_R {
SLEEP_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 3 - Configure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger"]
#[inline(always)]
pub fn halt(&self) -> HALT_R {
HALT_R::new(((self.bits >> 3) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - Configure the watchdog to either be paused, or kept running, while the CPU is sleeping"]
#[inline(always)]
pub fn sleep(&mut self) -> SLEEP_W {
SLEEP_W { w: self }
}
#[doc = "Bit 3 - Configure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger"]
#[inline(always)]
pub fn halt(&mut self) -> HALT_W {
HALT_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 = "Configuration register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [config](index.html) module"]
pub struct CONFIG_SPEC;
impl crate::RegisterSpec for CONFIG_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [config::R](R) reader structure"]
impl crate::Readable for CONFIG_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"]
impl crate::Writable for CONFIG_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CONFIG to value 0x01"]
impl crate::Resettable for CONFIG_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x01
}
}

102
src/wdt/crv.rs Normal file
View File

@@ -0,0 +1,102 @@
#[doc = "Register `CRV` reader"]
pub struct R(crate::R<CRV_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CRV_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CRV_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CRV_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CRV` writer"]
pub struct W(crate::W<CRV_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CRV_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<CRV_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CRV_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CRV` reader - Counter reload value in number of cycles of the 32.768 kHz clock"]
pub struct CRV_R(crate::FieldReader<u32, u32>);
impl CRV_R {
pub(crate) fn new(bits: u32) -> Self {
CRV_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for CRV_R {
type Target = crate::FieldReader<u32, u32>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `CRV` writer - Counter reload value in number of cycles of the 32.768 kHz clock"]
pub struct CRV_W<'a> {
w: &'a mut W,
}
impl<'a> CRV_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u32) -> &'a mut W {
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
self.w
}
}
impl R {
#[doc = "Bits 0:31 - Counter reload value in number of cycles of the 32.768 kHz clock"]
#[inline(always)]
pub fn crv(&self) -> CRV_R {
CRV_R::new((self.bits & 0xffff_ffff) as u32)
}
}
impl W {
#[doc = "Bits 0:31 - Counter reload value in number of cycles of the 32.768 kHz clock"]
#[inline(always)]
pub fn crv(&mut self) -> CRV_W {
CRV_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 = "Counter reload 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 [crv](index.html) module"]
pub struct CRV_SPEC;
impl crate::RegisterSpec for CRV_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [crv::R](R) reader structure"]
impl crate::Readable for CRV_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [crv::W](W) writer structure"]
impl crate::Writable for CRV_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CRV to value 0xffff_ffff"]
impl crate::Resettable for CRV_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}

64
src/wdt/events_timeout.rs Normal file
View File

@@ -0,0 +1,64 @@
#[doc = "Register `EVENTS_TIMEOUT` reader"]
pub struct R(crate::R<EVENTS_TIMEOUT_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_TIMEOUT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_TIMEOUT_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_TIMEOUT_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_TIMEOUT` writer"]
pub struct W(crate::W<EVENTS_TIMEOUT_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_TIMEOUT_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<EVENTS_TIMEOUT_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_TIMEOUT_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[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 = "Watchdog timeout\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 [events_timeout](index.html) module"]
pub struct EVENTS_TIMEOUT_SPEC;
impl crate::RegisterSpec for EVENTS_TIMEOUT_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_timeout::R](R) reader structure"]
impl crate::Readable for EVENTS_TIMEOUT_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_timeout::W](W) writer structure"]
impl crate::Writable for EVENTS_TIMEOUT_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_TIMEOUT to value 0"]
impl crate::Resettable for EVENTS_TIMEOUT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

166
src/wdt/intenclr.rs Normal file
View File

@@ -0,0 +1,166 @@
#[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 = "Write '1' to Disable interrupt for TIMEOUT event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIMEOUT_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<TIMEOUT_A> for bool {
#[inline(always)]
fn from(variant: TIMEOUT_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TIMEOUT` reader - Write '1' to Disable interrupt for TIMEOUT event"]
pub struct TIMEOUT_R(crate::FieldReader<bool, TIMEOUT_A>);
impl TIMEOUT_R {
pub(crate) fn new(bits: bool) -> Self {
TIMEOUT_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TIMEOUT_A {
match self.bits {
false => TIMEOUT_A::DISABLED,
true => TIMEOUT_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
**self == TIMEOUT_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
**self == TIMEOUT_A::ENABLED
}
}
impl core::ops::Deref for TIMEOUT_R {
type Target = crate::FieldReader<bool, TIMEOUT_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Write '1' to Disable interrupt for TIMEOUT event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIMEOUT_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<TIMEOUT_AW> for bool {
#[inline(always)]
fn from(variant: TIMEOUT_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TIMEOUT` writer - Write '1' to Disable interrupt for TIMEOUT event"]
pub struct TIMEOUT_W<'a> {
w: &'a mut W,
}
impl<'a> TIMEOUT_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: TIMEOUT_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(TIMEOUT_AW::CLEAR)
}
#[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
}
}
impl R {
#[doc = "Bit 0 - Write '1' to Disable interrupt for TIMEOUT event"]
#[inline(always)]
pub fn timeout(&self) -> TIMEOUT_R {
TIMEOUT_R::new((self.bits & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - Write '1' to Disable interrupt for TIMEOUT event"]
#[inline(always)]
pub fn timeout(&mut self) -> TIMEOUT_W {
TIMEOUT_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 = "Disable interrupt\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 = u32;
}
#[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
}
}

166
src/wdt/intenset.rs Normal file
View File

@@ -0,0 +1,166 @@
#[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 = "Write '1' to Enable interrupt for TIMEOUT event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIMEOUT_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<TIMEOUT_A> for bool {
#[inline(always)]
fn from(variant: TIMEOUT_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TIMEOUT` reader - Write '1' to Enable interrupt for TIMEOUT event"]
pub struct TIMEOUT_R(crate::FieldReader<bool, TIMEOUT_A>);
impl TIMEOUT_R {
pub(crate) fn new(bits: bool) -> Self {
TIMEOUT_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TIMEOUT_A {
match self.bits {
false => TIMEOUT_A::DISABLED,
true => TIMEOUT_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
**self == TIMEOUT_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
**self == TIMEOUT_A::ENABLED
}
}
impl core::ops::Deref for TIMEOUT_R {
type Target = crate::FieldReader<bool, TIMEOUT_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Write '1' to Enable interrupt for TIMEOUT event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIMEOUT_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<TIMEOUT_AW> for bool {
#[inline(always)]
fn from(variant: TIMEOUT_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TIMEOUT` writer - Write '1' to Enable interrupt for TIMEOUT event"]
pub struct TIMEOUT_W<'a> {
w: &'a mut W,
}
impl<'a> TIMEOUT_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: TIMEOUT_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(TIMEOUT_AW::SET)
}
#[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
}
}
impl R {
#[doc = "Bit 0 - Write '1' to Enable interrupt for TIMEOUT event"]
#[inline(always)]
pub fn timeout(&self) -> TIMEOUT_R {
TIMEOUT_R::new((self.bits & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - Write '1' to Enable interrupt for TIMEOUT event"]
#[inline(always)]
pub fn timeout(&mut self) -> TIMEOUT_W {
TIMEOUT_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 = "Enable interrupt\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 = u32;
}
#[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
}
}

481
src/wdt/reqstatus.rs Normal file
View File

@@ -0,0 +1,481 @@
#[doc = "Register `REQSTATUS` reader"]
pub struct R(crate::R<REQSTATUS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<REQSTATUS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<REQSTATUS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<REQSTATUS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Request status for RR\\[0\\]
register\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR0_A {
#[doc = "0: RR\\[0\\]
register is not enabled, or are already requesting reload"]
DISABLEDORREQUESTED = 0,
#[doc = "1: RR\\[0\\]
register is enabled, and are not yet requesting reload"]
ENABLEDANDUNREQUESTED = 1,
}
impl From<RR0_A> for bool {
#[inline(always)]
fn from(variant: RR0_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RR0` reader - Request status for RR\\[0\\]
register"]
pub struct RR0_R(crate::FieldReader<bool, RR0_A>);
impl RR0_R {
pub(crate) fn new(bits: bool) -> Self {
RR0_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR0_A {
match self.bits {
false => RR0_A::DISABLEDORREQUESTED,
true => RR0_A::ENABLEDANDUNREQUESTED,
}
}
#[doc = "Checks if the value of the field is `DISABLEDORREQUESTED`"]
#[inline(always)]
pub fn is_disabled_or_requested(&self) -> bool {
**self == RR0_A::DISABLEDORREQUESTED
}
#[doc = "Checks if the value of the field is `ENABLEDANDUNREQUESTED`"]
#[inline(always)]
pub fn is_enabled_and_unrequested(&self) -> bool {
**self == RR0_A::ENABLEDANDUNREQUESTED
}
}
impl core::ops::Deref for RR0_R {
type Target = crate::FieldReader<bool, RR0_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Request status for RR\\[1\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR1_A {
#[doc = "0: RR\\[1\\]
register is not enabled, or are already requesting reload"]
DISABLEDORREQUESTED = 0,
#[doc = "1: RR\\[1\\]
register is enabled, and are not yet requesting reload"]
ENABLEDANDUNREQUESTED = 1,
}
impl From<RR1_A> for bool {
#[inline(always)]
fn from(variant: RR1_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RR1` reader - Request status for RR\\[1\\]
register"]
pub struct RR1_R(crate::FieldReader<bool, RR1_A>);
impl RR1_R {
pub(crate) fn new(bits: bool) -> Self {
RR1_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR1_A {
match self.bits {
false => RR1_A::DISABLEDORREQUESTED,
true => RR1_A::ENABLEDANDUNREQUESTED,
}
}
#[doc = "Checks if the value of the field is `DISABLEDORREQUESTED`"]
#[inline(always)]
pub fn is_disabled_or_requested(&self) -> bool {
**self == RR1_A::DISABLEDORREQUESTED
}
#[doc = "Checks if the value of the field is `ENABLEDANDUNREQUESTED`"]
#[inline(always)]
pub fn is_enabled_and_unrequested(&self) -> bool {
**self == RR1_A::ENABLEDANDUNREQUESTED
}
}
impl core::ops::Deref for RR1_R {
type Target = crate::FieldReader<bool, RR1_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Request status for RR\\[2\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR2_A {
#[doc = "0: RR\\[2\\]
register is not enabled, or are already requesting reload"]
DISABLEDORREQUESTED = 0,
#[doc = "1: RR\\[2\\]
register is enabled, and are not yet requesting reload"]
ENABLEDANDUNREQUESTED = 1,
}
impl From<RR2_A> for bool {
#[inline(always)]
fn from(variant: RR2_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RR2` reader - Request status for RR\\[2\\]
register"]
pub struct RR2_R(crate::FieldReader<bool, RR2_A>);
impl RR2_R {
pub(crate) fn new(bits: bool) -> Self {
RR2_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR2_A {
match self.bits {
false => RR2_A::DISABLEDORREQUESTED,
true => RR2_A::ENABLEDANDUNREQUESTED,
}
}
#[doc = "Checks if the value of the field is `DISABLEDORREQUESTED`"]
#[inline(always)]
pub fn is_disabled_or_requested(&self) -> bool {
**self == RR2_A::DISABLEDORREQUESTED
}
#[doc = "Checks if the value of the field is `ENABLEDANDUNREQUESTED`"]
#[inline(always)]
pub fn is_enabled_and_unrequested(&self) -> bool {
**self == RR2_A::ENABLEDANDUNREQUESTED
}
}
impl core::ops::Deref for RR2_R {
type Target = crate::FieldReader<bool, RR2_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Request status for RR\\[3\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR3_A {
#[doc = "0: RR\\[3\\]
register is not enabled, or are already requesting reload"]
DISABLEDORREQUESTED = 0,
#[doc = "1: RR\\[3\\]
register is enabled, and are not yet requesting reload"]
ENABLEDANDUNREQUESTED = 1,
}
impl From<RR3_A> for bool {
#[inline(always)]
fn from(variant: RR3_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RR3` reader - Request status for RR\\[3\\]
register"]
pub struct RR3_R(crate::FieldReader<bool, RR3_A>);
impl RR3_R {
pub(crate) fn new(bits: bool) -> Self {
RR3_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR3_A {
match self.bits {
false => RR3_A::DISABLEDORREQUESTED,
true => RR3_A::ENABLEDANDUNREQUESTED,
}
}
#[doc = "Checks if the value of the field is `DISABLEDORREQUESTED`"]
#[inline(always)]
pub fn is_disabled_or_requested(&self) -> bool {
**self == RR3_A::DISABLEDORREQUESTED
}
#[doc = "Checks if the value of the field is `ENABLEDANDUNREQUESTED`"]
#[inline(always)]
pub fn is_enabled_and_unrequested(&self) -> bool {
**self == RR3_A::ENABLEDANDUNREQUESTED
}
}
impl core::ops::Deref for RR3_R {
type Target = crate::FieldReader<bool, RR3_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Request status for RR\\[4\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR4_A {
#[doc = "0: RR\\[4\\]
register is not enabled, or are already requesting reload"]
DISABLEDORREQUESTED = 0,
#[doc = "1: RR\\[4\\]
register is enabled, and are not yet requesting reload"]
ENABLEDANDUNREQUESTED = 1,
}
impl From<RR4_A> for bool {
#[inline(always)]
fn from(variant: RR4_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RR4` reader - Request status for RR\\[4\\]
register"]
pub struct RR4_R(crate::FieldReader<bool, RR4_A>);
impl RR4_R {
pub(crate) fn new(bits: bool) -> Self {
RR4_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR4_A {
match self.bits {
false => RR4_A::DISABLEDORREQUESTED,
true => RR4_A::ENABLEDANDUNREQUESTED,
}
}
#[doc = "Checks if the value of the field is `DISABLEDORREQUESTED`"]
#[inline(always)]
pub fn is_disabled_or_requested(&self) -> bool {
**self == RR4_A::DISABLEDORREQUESTED
}
#[doc = "Checks if the value of the field is `ENABLEDANDUNREQUESTED`"]
#[inline(always)]
pub fn is_enabled_and_unrequested(&self) -> bool {
**self == RR4_A::ENABLEDANDUNREQUESTED
}
}
impl core::ops::Deref for RR4_R {
type Target = crate::FieldReader<bool, RR4_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Request status for RR\\[5\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR5_A {
#[doc = "0: RR\\[5\\]
register is not enabled, or are already requesting reload"]
DISABLEDORREQUESTED = 0,
#[doc = "1: RR\\[5\\]
register is enabled, and are not yet requesting reload"]
ENABLEDANDUNREQUESTED = 1,
}
impl From<RR5_A> for bool {
#[inline(always)]
fn from(variant: RR5_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RR5` reader - Request status for RR\\[5\\]
register"]
pub struct RR5_R(crate::FieldReader<bool, RR5_A>);
impl RR5_R {
pub(crate) fn new(bits: bool) -> Self {
RR5_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR5_A {
match self.bits {
false => RR5_A::DISABLEDORREQUESTED,
true => RR5_A::ENABLEDANDUNREQUESTED,
}
}
#[doc = "Checks if the value of the field is `DISABLEDORREQUESTED`"]
#[inline(always)]
pub fn is_disabled_or_requested(&self) -> bool {
**self == RR5_A::DISABLEDORREQUESTED
}
#[doc = "Checks if the value of the field is `ENABLEDANDUNREQUESTED`"]
#[inline(always)]
pub fn is_enabled_and_unrequested(&self) -> bool {
**self == RR5_A::ENABLEDANDUNREQUESTED
}
}
impl core::ops::Deref for RR5_R {
type Target = crate::FieldReader<bool, RR5_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Request status for RR\\[6\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR6_A {
#[doc = "0: RR\\[6\\]
register is not enabled, or are already requesting reload"]
DISABLEDORREQUESTED = 0,
#[doc = "1: RR\\[6\\]
register is enabled, and are not yet requesting reload"]
ENABLEDANDUNREQUESTED = 1,
}
impl From<RR6_A> for bool {
#[inline(always)]
fn from(variant: RR6_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RR6` reader - Request status for RR\\[6\\]
register"]
pub struct RR6_R(crate::FieldReader<bool, RR6_A>);
impl RR6_R {
pub(crate) fn new(bits: bool) -> Self {
RR6_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR6_A {
match self.bits {
false => RR6_A::DISABLEDORREQUESTED,
true => RR6_A::ENABLEDANDUNREQUESTED,
}
}
#[doc = "Checks if the value of the field is `DISABLEDORREQUESTED`"]
#[inline(always)]
pub fn is_disabled_or_requested(&self) -> bool {
**self == RR6_A::DISABLEDORREQUESTED
}
#[doc = "Checks if the value of the field is `ENABLEDANDUNREQUESTED`"]
#[inline(always)]
pub fn is_enabled_and_unrequested(&self) -> bool {
**self == RR6_A::ENABLEDANDUNREQUESTED
}
}
impl core::ops::Deref for RR6_R {
type Target = crate::FieldReader<bool, RR6_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Request status for RR\\[7\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR7_A {
#[doc = "0: RR\\[7\\]
register is not enabled, or are already requesting reload"]
DISABLEDORREQUESTED = 0,
#[doc = "1: RR\\[7\\]
register is enabled, and are not yet requesting reload"]
ENABLEDANDUNREQUESTED = 1,
}
impl From<RR7_A> for bool {
#[inline(always)]
fn from(variant: RR7_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RR7` reader - Request status for RR\\[7\\]
register"]
pub struct RR7_R(crate::FieldReader<bool, RR7_A>);
impl RR7_R {
pub(crate) fn new(bits: bool) -> Self {
RR7_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR7_A {
match self.bits {
false => RR7_A::DISABLEDORREQUESTED,
true => RR7_A::ENABLEDANDUNREQUESTED,
}
}
#[doc = "Checks if the value of the field is `DISABLEDORREQUESTED`"]
#[inline(always)]
pub fn is_disabled_or_requested(&self) -> bool {
**self == RR7_A::DISABLEDORREQUESTED
}
#[doc = "Checks if the value of the field is `ENABLEDANDUNREQUESTED`"]
#[inline(always)]
pub fn is_enabled_and_unrequested(&self) -> bool {
**self == RR7_A::ENABLEDANDUNREQUESTED
}
}
impl core::ops::Deref for RR7_R {
type Target = crate::FieldReader<bool, RR7_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl R {
#[doc = "Bit 0 - Request status for RR\\[0\\]
register"]
#[inline(always)]
pub fn rr0(&self) -> RR0_R {
RR0_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - Request status for RR\\[1\\]
register"]
#[inline(always)]
pub fn rr1(&self) -> RR1_R {
RR1_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - Request status for RR\\[2\\]
register"]
#[inline(always)]
pub fn rr2(&self) -> RR2_R {
RR2_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3 - Request status for RR\\[3\\]
register"]
#[inline(always)]
pub fn rr3(&self) -> RR3_R {
RR3_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4 - Request status for RR\\[4\\]
register"]
#[inline(always)]
pub fn rr4(&self) -> RR4_R {
RR4_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5 - Request status for RR\\[5\\]
register"]
#[inline(always)]
pub fn rr5(&self) -> RR5_R {
RR5_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6 - Request status for RR\\[6\\]
register"]
#[inline(always)]
pub fn rr6(&self) -> RR6_R {
RR6_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7 - Request status for RR\\[7\\]
register"]
#[inline(always)]
pub fn rr7(&self) -> RR7_R {
RR7_R::new(((self.bits >> 7) & 0x01) != 0)
}
}
#[doc = "Request 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 [reqstatus](index.html) module"]
pub struct REQSTATUS_SPEC;
impl crate::RegisterSpec for REQSTATUS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [reqstatus::R](R) reader structure"]
impl crate::Readable for REQSTATUS_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets REQSTATUS to value 0x01"]
impl crate::Resettable for REQSTATUS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x01
}
}

86
src/wdt/rr.rs Normal file
View File

@@ -0,0 +1,86 @@
#[doc = "Register `RR[%s]` writer"]
pub struct W(crate::W<RR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<RR_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<RR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<RR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Reload request register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u32)]
pub enum RR_AW {
#[doc = "1850885685: Value to request a reload of the watchdog timer"]
RELOAD = 1850885685,
}
impl From<RR_AW> for u32 {
#[inline(always)]
fn from(variant: RR_AW) -> Self {
variant as _
}
}
#[doc = "Field `RR` writer - Reload request register"]
pub struct RR_W<'a> {
w: &'a mut W,
}
impl<'a> RR_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RR_AW) -> &'a mut W {
unsafe { self.bits(variant.into()) }
}
#[doc = "Value to request a reload of the watchdog timer"]
#[inline(always)]
pub fn reload(self) -> &'a mut W {
self.variant(RR_AW::RELOAD)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u32) -> &'a mut W {
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
self.w
}
}
impl W {
#[doc = "Bits 0:31 - Reload request register"]
#[inline(always)]
pub fn rr(&mut self) -> RR_W {
RR_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 = "Description collection\\[0\\]: Reload request 0\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rr](index.html) module"]
pub struct RR_SPEC;
impl crate::RegisterSpec for RR_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [rr::W](W) writer structure"]
impl crate::Writable for RR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets RR[%s]
to value 0"]
impl crate::Resettable for RR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

882
src/wdt/rren.rs Normal file
View File

@@ -0,0 +1,882 @@
#[doc = "Register `RREN` reader"]
pub struct R(crate::R<RREN_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<RREN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<RREN_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<RREN_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `RREN` writer"]
pub struct W(crate::W<RREN_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<RREN_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<RREN_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<RREN_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Enable or disable RR\\[0\\]
register\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR0_A {
#[doc = "0: Disable RR\\[0\\]
register"]
DISABLED = 0,
#[doc = "1: Enable RR\\[0\\]
register"]
ENABLED = 1,
}
impl From<RR0_A> for bool {
#[inline(always)]
fn from(variant: RR0_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RR0` reader - Enable or disable RR\\[0\\]
register"]
pub struct RR0_R(crate::FieldReader<bool, RR0_A>);
impl RR0_R {
pub(crate) fn new(bits: bool) -> Self {
RR0_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR0_A {
match self.bits {
false => RR0_A::DISABLED,
true => RR0_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
**self == RR0_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
**self == RR0_A::ENABLED
}
}
impl core::ops::Deref for RR0_R {
type Target = crate::FieldReader<bool, RR0_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `RR0` writer - Enable or disable RR\\[0\\]
register"]
pub struct RR0_W<'a> {
w: &'a mut W,
}
impl<'a> RR0_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RR0_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Disable RR\\[0\\]
register"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RR0_A::DISABLED)
}
#[doc = "Enable RR\\[0\\]
register"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RR0_A::ENABLED)
}
#[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 = "Enable or disable RR\\[1\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR1_A {
#[doc = "0: Disable RR\\[1\\]
register"]
DISABLED = 0,
#[doc = "1: Enable RR\\[1\\]
register"]
ENABLED = 1,
}
impl From<RR1_A> for bool {
#[inline(always)]
fn from(variant: RR1_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RR1` reader - Enable or disable RR\\[1\\]
register"]
pub struct RR1_R(crate::FieldReader<bool, RR1_A>);
impl RR1_R {
pub(crate) fn new(bits: bool) -> Self {
RR1_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR1_A {
match self.bits {
false => RR1_A::DISABLED,
true => RR1_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
**self == RR1_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
**self == RR1_A::ENABLED
}
}
impl core::ops::Deref for RR1_R {
type Target = crate::FieldReader<bool, RR1_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `RR1` writer - Enable or disable RR\\[1\\]
register"]
pub struct RR1_W<'a> {
w: &'a mut W,
}
impl<'a> RR1_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RR1_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Disable RR\\[1\\]
register"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RR1_A::DISABLED)
}
#[doc = "Enable RR\\[1\\]
register"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RR1_A::ENABLED)
}
#[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 = "Enable or disable RR\\[2\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR2_A {
#[doc = "0: Disable RR\\[2\\]
register"]
DISABLED = 0,
#[doc = "1: Enable RR\\[2\\]
register"]
ENABLED = 1,
}
impl From<RR2_A> for bool {
#[inline(always)]
fn from(variant: RR2_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RR2` reader - Enable or disable RR\\[2\\]
register"]
pub struct RR2_R(crate::FieldReader<bool, RR2_A>);
impl RR2_R {
pub(crate) fn new(bits: bool) -> Self {
RR2_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR2_A {
match self.bits {
false => RR2_A::DISABLED,
true => RR2_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
**self == RR2_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
**self == RR2_A::ENABLED
}
}
impl core::ops::Deref for RR2_R {
type Target = crate::FieldReader<bool, RR2_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `RR2` writer - Enable or disable RR\\[2\\]
register"]
pub struct RR2_W<'a> {
w: &'a mut W,
}
impl<'a> RR2_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RR2_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Disable RR\\[2\\]
register"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RR2_A::DISABLED)
}
#[doc = "Enable RR\\[2\\]
register"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RR2_A::ENABLED)
}
#[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 = "Enable or disable RR\\[3\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR3_A {
#[doc = "0: Disable RR\\[3\\]
register"]
DISABLED = 0,
#[doc = "1: Enable RR\\[3\\]
register"]
ENABLED = 1,
}
impl From<RR3_A> for bool {
#[inline(always)]
fn from(variant: RR3_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RR3` reader - Enable or disable RR\\[3\\]
register"]
pub struct RR3_R(crate::FieldReader<bool, RR3_A>);
impl RR3_R {
pub(crate) fn new(bits: bool) -> Self {
RR3_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR3_A {
match self.bits {
false => RR3_A::DISABLED,
true => RR3_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
**self == RR3_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
**self == RR3_A::ENABLED
}
}
impl core::ops::Deref for RR3_R {
type Target = crate::FieldReader<bool, RR3_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `RR3` writer - Enable or disable RR\\[3\\]
register"]
pub struct RR3_W<'a> {
w: &'a mut W,
}
impl<'a> RR3_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RR3_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Disable RR\\[3\\]
register"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RR3_A::DISABLED)
}
#[doc = "Enable RR\\[3\\]
register"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RR3_A::ENABLED)
}
#[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 = "Enable or disable RR\\[4\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR4_A {
#[doc = "0: Disable RR\\[4\\]
register"]
DISABLED = 0,
#[doc = "1: Enable RR\\[4\\]
register"]
ENABLED = 1,
}
impl From<RR4_A> for bool {
#[inline(always)]
fn from(variant: RR4_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RR4` reader - Enable or disable RR\\[4\\]
register"]
pub struct RR4_R(crate::FieldReader<bool, RR4_A>);
impl RR4_R {
pub(crate) fn new(bits: bool) -> Self {
RR4_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR4_A {
match self.bits {
false => RR4_A::DISABLED,
true => RR4_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
**self == RR4_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
**self == RR4_A::ENABLED
}
}
impl core::ops::Deref for RR4_R {
type Target = crate::FieldReader<bool, RR4_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `RR4` writer - Enable or disable RR\\[4\\]
register"]
pub struct RR4_W<'a> {
w: &'a mut W,
}
impl<'a> RR4_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RR4_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Disable RR\\[4\\]
register"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RR4_A::DISABLED)
}
#[doc = "Enable RR\\[4\\]
register"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RR4_A::ENABLED)
}
#[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 = "Enable or disable RR\\[5\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR5_A {
#[doc = "0: Disable RR\\[5\\]
register"]
DISABLED = 0,
#[doc = "1: Enable RR\\[5\\]
register"]
ENABLED = 1,
}
impl From<RR5_A> for bool {
#[inline(always)]
fn from(variant: RR5_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RR5` reader - Enable or disable RR\\[5\\]
register"]
pub struct RR5_R(crate::FieldReader<bool, RR5_A>);
impl RR5_R {
pub(crate) fn new(bits: bool) -> Self {
RR5_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR5_A {
match self.bits {
false => RR5_A::DISABLED,
true => RR5_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
**self == RR5_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
**self == RR5_A::ENABLED
}
}
impl core::ops::Deref for RR5_R {
type Target = crate::FieldReader<bool, RR5_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `RR5` writer - Enable or disable RR\\[5\\]
register"]
pub struct RR5_W<'a> {
w: &'a mut W,
}
impl<'a> RR5_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RR5_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Disable RR\\[5\\]
register"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RR5_A::DISABLED)
}
#[doc = "Enable RR\\[5\\]
register"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RR5_A::ENABLED)
}
#[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 = "Enable or disable RR\\[6\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR6_A {
#[doc = "0: Disable RR\\[6\\]
register"]
DISABLED = 0,
#[doc = "1: Enable RR\\[6\\]
register"]
ENABLED = 1,
}
impl From<RR6_A> for bool {
#[inline(always)]
fn from(variant: RR6_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RR6` reader - Enable or disable RR\\[6\\]
register"]
pub struct RR6_R(crate::FieldReader<bool, RR6_A>);
impl RR6_R {
pub(crate) fn new(bits: bool) -> Self {
RR6_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR6_A {
match self.bits {
false => RR6_A::DISABLED,
true => RR6_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
**self == RR6_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
**self == RR6_A::ENABLED
}
}
impl core::ops::Deref for RR6_R {
type Target = crate::FieldReader<bool, RR6_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `RR6` writer - Enable or disable RR\\[6\\]
register"]
pub struct RR6_W<'a> {
w: &'a mut W,
}
impl<'a> RR6_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RR6_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Disable RR\\[6\\]
register"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RR6_A::DISABLED)
}
#[doc = "Enable RR\\[6\\]
register"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RR6_A::ENABLED)
}
#[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 = "Enable or disable RR\\[7\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR7_A {
#[doc = "0: Disable RR\\[7\\]
register"]
DISABLED = 0,
#[doc = "1: Enable RR\\[7\\]
register"]
ENABLED = 1,
}
impl From<RR7_A> for bool {
#[inline(always)]
fn from(variant: RR7_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RR7` reader - Enable or disable RR\\[7\\]
register"]
pub struct RR7_R(crate::FieldReader<bool, RR7_A>);
impl RR7_R {
pub(crate) fn new(bits: bool) -> Self {
RR7_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR7_A {
match self.bits {
false => RR7_A::DISABLED,
true => RR7_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
**self == RR7_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
**self == RR7_A::ENABLED
}
}
impl core::ops::Deref for RR7_R {
type Target = crate::FieldReader<bool, RR7_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `RR7` writer - Enable or disable RR\\[7\\]
register"]
pub struct RR7_W<'a> {
w: &'a mut W,
}
impl<'a> RR7_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RR7_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Disable RR\\[7\\]
register"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RR7_A::DISABLED)
}
#[doc = "Enable RR\\[7\\]
register"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RR7_A::ENABLED)
}
#[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
}
}
impl R {
#[doc = "Bit 0 - Enable or disable RR\\[0\\]
register"]
#[inline(always)]
pub fn rr0(&self) -> RR0_R {
RR0_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - Enable or disable RR\\[1\\]
register"]
#[inline(always)]
pub fn rr1(&self) -> RR1_R {
RR1_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - Enable or disable RR\\[2\\]
register"]
#[inline(always)]
pub fn rr2(&self) -> RR2_R {
RR2_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3 - Enable or disable RR\\[3\\]
register"]
#[inline(always)]
pub fn rr3(&self) -> RR3_R {
RR3_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4 - Enable or disable RR\\[4\\]
register"]
#[inline(always)]
pub fn rr4(&self) -> RR4_R {
RR4_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5 - Enable or disable RR\\[5\\]
register"]
#[inline(always)]
pub fn rr5(&self) -> RR5_R {
RR5_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6 - Enable or disable RR\\[6\\]
register"]
#[inline(always)]
pub fn rr6(&self) -> RR6_R {
RR6_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7 - Enable or disable RR\\[7\\]
register"]
#[inline(always)]
pub fn rr7(&self) -> RR7_R {
RR7_R::new(((self.bits >> 7) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - Enable or disable RR\\[0\\]
register"]
#[inline(always)]
pub fn rr0(&mut self) -> RR0_W {
RR0_W { w: self }
}
#[doc = "Bit 1 - Enable or disable RR\\[1\\]
register"]
#[inline(always)]
pub fn rr1(&mut self) -> RR1_W {
RR1_W { w: self }
}
#[doc = "Bit 2 - Enable or disable RR\\[2\\]
register"]
#[inline(always)]
pub fn rr2(&mut self) -> RR2_W {
RR2_W { w: self }
}
#[doc = "Bit 3 - Enable or disable RR\\[3\\]
register"]
#[inline(always)]
pub fn rr3(&mut self) -> RR3_W {
RR3_W { w: self }
}
#[doc = "Bit 4 - Enable or disable RR\\[4\\]
register"]
#[inline(always)]
pub fn rr4(&mut self) -> RR4_W {
RR4_W { w: self }
}
#[doc = "Bit 5 - Enable or disable RR\\[5\\]
register"]
#[inline(always)]
pub fn rr5(&mut self) -> RR5_W {
RR5_W { w: self }
}
#[doc = "Bit 6 - Enable or disable RR\\[6\\]
register"]
#[inline(always)]
pub fn rr6(&mut self) -> RR6_W {
RR6_W { w: self }
}
#[doc = "Bit 7 - Enable or disable RR\\[7\\]
register"]
#[inline(always)]
pub fn rr7(&mut self) -> RR7_W {
RR7_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 = "Enable register for reload request registers\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 [rren](index.html) module"]
pub struct RREN_SPEC;
impl crate::RegisterSpec for RREN_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [rren::R](R) reader structure"]
impl crate::Readable for RREN_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [rren::W](W) writer structure"]
impl crate::Writable for RREN_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets RREN to value 0x01"]
impl crate::Resettable for RREN_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x01
}
}

84
src/wdt/runstatus.rs Normal file
View File

@@ -0,0 +1,84 @@
#[doc = "Register `RUNSTATUS` reader"]
pub struct R(crate::R<RUNSTATUS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<RUNSTATUS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<RUNSTATUS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<RUNSTATUS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Indicates whether or not the watchdog is running\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RUNSTATUS_A {
#[doc = "0: Watchdog not running"]
NOTRUNNING = 0,
#[doc = "1: Watchdog is running"]
RUNNING = 1,
}
impl From<RUNSTATUS_A> for bool {
#[inline(always)]
fn from(variant: RUNSTATUS_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RUNSTATUS` reader - Indicates whether or not the watchdog is running"]
pub struct RUNSTATUS_R(crate::FieldReader<bool, RUNSTATUS_A>);
impl RUNSTATUS_R {
pub(crate) fn new(bits: bool) -> Self {
RUNSTATUS_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RUNSTATUS_A {
match self.bits {
false => RUNSTATUS_A::NOTRUNNING,
true => RUNSTATUS_A::RUNNING,
}
}
#[doc = "Checks if the value of the field is `NOTRUNNING`"]
#[inline(always)]
pub fn is_not_running(&self) -> bool {
**self == RUNSTATUS_A::NOTRUNNING
}
#[doc = "Checks if the value of the field is `RUNNING`"]
#[inline(always)]
pub fn is_running(&self) -> bool {
**self == RUNSTATUS_A::RUNNING
}
}
impl core::ops::Deref for RUNSTATUS_R {
type Target = crate::FieldReader<bool, RUNSTATUS_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl R {
#[doc = "Bit 0 - Indicates whether or not the watchdog is running"]
#[inline(always)]
pub fn runstatus(&self) -> RUNSTATUS_R {
RUNSTATUS_R::new((self.bits & 0x01) != 0)
}
}
#[doc = "Run 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 [runstatus](index.html) module"]
pub struct RUNSTATUS_SPEC;
impl crate::RegisterSpec for RUNSTATUS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [runstatus::R](R) reader structure"]
impl crate::Readable for RUNSTATUS_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets RUNSTATUS to value 0"]
impl crate::Resettable for RUNSTATUS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

45
src/wdt/tasks_start.rs Normal file
View File

@@ -0,0 +1,45 @@
#[doc = "Register `TASKS_START` writer"]
pub struct W(crate::W<TASKS_START_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_START_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<TASKS_START_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_START_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[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 = "Start the watchdog\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tasks_start](index.html) module"]
pub struct TASKS_START_SPEC;
impl crate::RegisterSpec for TASKS_START_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"]
impl crate::Writable for TASKS_START_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_START to value 0"]
impl crate::Resettable for TASKS_START_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}