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
128
129
130
131
132
133
134
135
136
137
138
#[doc = "Register `STAT` reader"]
pub type R = crate::R<StatSpec>;
#[doc = "Free watchdog timer prescaler value update\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Pud {
    #[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> for bool {
    #[inline(always)]
    fn from(variant: Pud) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `PUD` reader - Free watchdog timer prescaler value update"]
pub type PudR = crate::BitReader<Pud>;
impl PudR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Pud {
        match self.bits {
            false => Pud::Valid,
            true => Pud::Ongoing,
        }
    }
    #[doc = "The value read from the PSC register is valid"]
    #[inline(always)]
    pub fn is_valid(&self) -> bool {
        *self == Pud::Valid
    }
    #[doc = "A write operation to to the PSC register is ongoing, so the value read is invalid"]
    #[inline(always)]
    pub fn is_ongoing(&self) -> bool {
        *self == Pud::Ongoing
    }
}
#[doc = "Free watchdog timer counter reload value update\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Rud {
    #[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> for bool {
    #[inline(always)]
    fn from(variant: Rud) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `RUD` reader - Free watchdog timer counter reload value update"]
pub type RudR = crate::BitReader<Rud>;
impl RudR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Rud {
        match self.bits {
            false => Rud::Valid,
            true => Rud::Ongoing,
        }
    }
    #[doc = "The value read from the RLD register is valid"]
    #[inline(always)]
    pub fn is_valid(&self) -> bool {
        *self == Rud::Valid
    }
    #[doc = "A write operation to to the RLD register is ongoing, so the value read is invalid"]
    #[inline(always)]
    pub fn is_ongoing(&self) -> bool {
        *self == Rud::Ongoing
    }
}
#[doc = "Watchdog counter window value update\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Wud {
    #[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> for bool {
    #[inline(always)]
    fn from(variant: Wud) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `WUD` reader - Watchdog counter window value update"]
pub type WudR = crate::BitReader<Wud>;
impl WudR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Wud {
        match self.bits {
            false => Wud::Valid,
            true => Wud::Ongoing,
        }
    }
    #[doc = "The value read from the WND register is valid"]
    #[inline(always)]
    pub fn is_valid(&self) -> bool {
        *self == Wud::Valid
    }
    #[doc = "A write operation to to the WND register is ongoing, so the value read is invalid"]
    #[inline(always)]
    pub fn is_ongoing(&self) -> bool {
        *self == Wud::Ongoing
    }
}
impl R {
    #[doc = "Bit 0 - Free watchdog timer prescaler value update"]
    #[inline(always)]
    pub fn pud(&self) -> PudR {
        PudR::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - Free watchdog timer counter reload value update"]
    #[inline(always)]
    pub fn rud(&self) -> RudR {
        RudR::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - Watchdog counter window value update"]
    #[inline(always)]
    pub fn wud(&self) -> WudR {
        WudR::new(((self.bits >> 2) & 1) != 0)
    }
}
#[doc = "Status register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`stat::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct StatSpec;
impl crate::RegisterSpec for StatSpec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`stat::R`](R) reader structure"]
impl crate::Readable for StatSpec {}
#[doc = "`reset()` method sets STAT to value 0"]
impl crate::Resettable for StatSpec {
    const RESET_VALUE: u32 = 0;
}