1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
#[doc = "Reader of register STAT"] pub type R = crate::R<u32, super::STAT>; #[doc = "Free watchdog timer prescaler value update\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum PUD_A { #[doc = "0: The value read from the PSC register is valid"] VALID = 0, #[doc = "1: A write operation to to the PSC register is ongoing, so the value read is invalid"] ONGOING = 1, } impl From<PUD_A> for bool { #[inline(always)] fn from(variant: PUD_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `PUD`"] pub type PUD_R = crate::R<bool, PUD_A>; impl PUD_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> PUD_A { match self.bits { false => PUD_A::VALID, true => PUD_A::ONGOING, } } #[doc = "Checks if the value of the field is `VALID`"] #[inline(always)] pub fn is_valid(&self) -> bool { *self == PUD_A::VALID } #[doc = "Checks if the value of the field is `ONGOING`"] #[inline(always)] pub fn is_ongoing(&self) -> bool { *self == PUD_A::ONGOING } } #[doc = "Free watchdog timer counter reload value update\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum RUD_A { #[doc = "0: The value read from the RLD register is valid"] VALID = 0, #[doc = "1: A write operation to to the RLD register is ongoing, so the value read is invalid"] ONGOING = 1, } impl From<RUD_A> for bool { #[inline(always)] fn from(variant: RUD_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `RUD`"] pub type RUD_R = crate::R<bool, RUD_A>; impl RUD_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> RUD_A { match self.bits { false => RUD_A::VALID, true => RUD_A::ONGOING, } } #[doc = "Checks if the value of the field is `VALID`"] #[inline(always)] pub fn is_valid(&self) -> bool { *self == RUD_A::VALID } #[doc = "Checks if the value of the field is `ONGOING`"] #[inline(always)] pub fn is_ongoing(&self) -> bool { *self == RUD_A::ONGOING } } #[doc = "Watchdog counter window value update\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum WUD_A { #[doc = "0: The value read from the WND register is valid"] VALID = 0, #[doc = "1: A write operation to to the WND register is ongoing, so the value read is invalid"] ONGOING = 1, } impl From<WUD_A> for bool { #[inline(always)] fn from(variant: WUD_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `WUD`"] pub type WUD_R = crate::R<bool, WUD_A>; impl WUD_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> WUD_A { match self.bits { false => WUD_A::VALID, true => WUD_A::ONGOING, } } #[doc = "Checks if the value of the field is `VALID`"] #[inline(always)] pub fn is_valid(&self) -> bool { *self == WUD_A::VALID } #[doc = "Checks if the value of the field is `ONGOING`"] #[inline(always)] pub fn is_ongoing(&self) -> bool { *self == WUD_A::ONGOING } } impl R { #[doc = "Bit 0 - Free watchdog timer prescaler value update"] #[inline(always)] pub fn pud(&self) -> PUD_R { PUD_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Free watchdog timer counter reload value update"] #[inline(always)] pub fn rud(&self) -> RUD_R { RUD_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Watchdog counter window value update"] #[inline(always)] pub fn wud(&self) -> WUD_R { WUD_R::new(((self.bits >> 2) & 0x01) != 0) } }