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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
#[doc = "WDOG"]
#[repr(C)]
pub struct RegisterBlock {
    #[doc = "Watchdog Control Register"]
    pub WCR: crate::RWRegister<u16>,
    #[doc = "Watchdog Service Register"]
    pub WSR: crate::RWRegister<u16>,
    #[doc = "Watchdog Reset Status Register"]
    pub WRSR: crate::RORegister<u16>,
    #[doc = "Watchdog Interrupt Control Register"]
    pub WICR: crate::RWRegister<u16>,
    #[doc = "Watchdog Miscellaneous Control Register"]
    pub WMCR: crate::RWRegister<u16>,
}
#[doc = "Watchdog Control Register"]
pub mod WCR {
    #[doc = "WDZST"]
    pub mod WDZST {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Continue timer operation (Default)."]
            pub const WDZST_0: u16 = 0;
            #[doc = "Suspend the watchdog timer."]
            pub const WDZST_1: u16 = 0x01;
        }
    }
    #[doc = "WDBG"]
    pub mod WDBG {
        pub const offset: u16 = 1;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Continue WDOG timer operation (Default)."]
            pub const WDBG_0: u16 = 0;
            #[doc = "Suspend the watchdog timer."]
            pub const WDBG_1: u16 = 0x01;
        }
    }
    #[doc = "WDE"]
    pub mod WDE {
        pub const offset: u16 = 2;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disable the Watchdog (Default)."]
            pub const WDE_0: u16 = 0;
            #[doc = "Enable the Watchdog."]
            pub const WDE_1: u16 = 0x01;
        }
    }
    #[doc = "WDT"]
    pub mod WDT {
        pub const offset: u16 = 3;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No effect on WDOG_B (Default)."]
            pub const WDT_0: u16 = 0;
            #[doc = "Assert WDOG_B upon a Watchdog Time-out event."]
            pub const WDT_1: u16 = 0x01;
        }
    }
    #[doc = "SRS"]
    pub mod SRS {
        pub const offset: u16 = 4;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Assert system reset signal."]
            pub const SRS_0: u16 = 0;
            #[doc = "No effect on the system (Default)."]
            pub const SRS_1: u16 = 0x01;
        }
    }
    #[doc = "WDA"]
    pub mod WDA {
        pub const offset: u16 = 5;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Assert WDOG_B output."]
            pub const WDA_0: u16 = 0;
            #[doc = "No effect on system (Default)."]
            pub const WDA_1: u16 = 0x01;
        }
    }
    #[doc = "software reset extension, an option way to generate software reset"]
    pub mod SRE {
        pub const offset: u16 = 6;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "using original way to generate software reset (default)"]
            pub const SRE_0: u16 = 0;
            #[doc = "using new way to generate software reset."]
            pub const SRE_1: u16 = 0x01;
        }
    }
    #[doc = "WDW"]
    pub mod WDW {
        pub const offset: u16 = 7;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Continue WDOG timer operation (Default)."]
            pub const WDW_0: u16 = 0;
            #[doc = "Suspend WDOG timer operation."]
            pub const WDW_1: u16 = 0x01;
        }
    }
    #[doc = "WT"]
    pub mod WT {
        pub const offset: u16 = 8;
        pub const mask: u16 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "- 0.5 Seconds (Default)."]
            pub const WT_0: u16 = 0;
            #[doc = "- 1.0 Seconds."]
            pub const WT_1: u16 = 0x01;
            #[doc = "- 1.5 Seconds."]
            pub const WT_2: u16 = 0x02;
            #[doc = "- 2.0 Seconds."]
            pub const WT_3: u16 = 0x03;
            #[doc = "- 128 Seconds."]
            pub const WT_255: u16 = 0xff;
        }
    }
}
#[doc = "Watchdog Service Register"]
pub mod WSR {
    #[doc = "WSR"]
    pub mod WSR {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Write to the Watchdog Service Register (WDOG_WSR)."]
            pub const WSR_21845: u16 = 0x5555;
            #[doc = "Write to the Watchdog Service Register (WDOG_WSR)."]
            pub const WSR_43690: u16 = 0xaaaa;
        }
    }
}
#[doc = "Watchdog Reset Status Register"]
pub mod WRSR {
    #[doc = "SFTW"]
    pub mod SFTW {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Reset is not the result of a software reset."]
            pub const SFTW_0: u16 = 0;
            #[doc = "Reset is the result of a software reset."]
            pub const SFTW_1: u16 = 0x01;
        }
    }
    #[doc = "TOUT"]
    pub mod TOUT {
        pub const offset: u16 = 1;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Reset is not the result of a WDOG timeout."]
            pub const TOUT_0: u16 = 0;
            #[doc = "Reset is the result of a WDOG timeout."]
            pub const TOUT_1: u16 = 0x01;
        }
    }
    #[doc = "POR"]
    pub mod POR {
        pub const offset: u16 = 4;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Reset is not the result of a power on reset."]
            pub const POR_0: u16 = 0;
            #[doc = "Reset is the result of a power on reset."]
            pub const POR_1: u16 = 0x01;
        }
    }
}
#[doc = "Watchdog Interrupt Control Register"]
pub mod WICR {
    #[doc = "WICT"]
    pub mod WICT {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "WICT\\[7:0\\] = Time duration between interrupt and time-out is 0 seconds."]
            pub const WICT_0: u16 = 0;
            #[doc = "WICT\\[7:0\\] = Time duration between interrupt and time-out is 0.5 seconds."]
            pub const WICT_1: u16 = 0x01;
            #[doc = "WICT\\[7:0\\] = Time duration between interrupt and time-out is 2 seconds (Default)."]
            pub const WICT_4: u16 = 0x04;
            #[doc = "WICT\\[7:0\\] = Time duration between interrupt and time-out is 127.5 seconds."]
            pub const WICT_255: u16 = 0xff;
        }
    }
    #[doc = "WTIS"]
    pub mod WTIS {
        pub const offset: u16 = 14;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No interrupt has occurred (Default)."]
            pub const WTIS_0: u16 = 0;
            #[doc = "Interrupt has occurred"]
            pub const WTIS_1: u16 = 0x01;
        }
    }
    #[doc = "WIE"]
    pub mod WIE {
        pub const offset: u16 = 15;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disable Interrupt (Default)."]
            pub const WIE_0: u16 = 0;
            #[doc = "Enable Interrupt."]
            pub const WIE_1: u16 = 0x01;
        }
    }
}
#[doc = "Watchdog Miscellaneous Control Register"]
pub mod WMCR {
    #[doc = "PDE"]
    pub mod PDE {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Power Down Counter of WDOG is disabled."]
            pub const PDE_0: u16 = 0;
            #[doc = "Power Down Counter of WDOG is enabled (Default)."]
            pub const PDE_1: u16 = 0x01;
        }
    }
}