1#[doc = "Register `PRESETCTRL` reader"]
2pub struct R(crate::R<PRESETCTRL_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<PRESETCTRL_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<PRESETCTRL_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<PRESETCTRL_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `PRESETCTRL` writer"]
17pub struct W(crate::W<PRESETCTRL_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<PRESETCTRL_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<PRESETCTRL_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<PRESETCTRL_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "SPI0 reset control.\n\nValue on reset: 1"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39pub enum SPI0_RST_N_A {
40 #[doc = "0: Assert the SPI0 reset."]
41 SPI0_RST_N_0 = 0,
42 #[doc = "1: Clear the SPI0 reset."]
43 SPI0_RST_N_1 = 1,
44}
45impl From<SPI0_RST_N_A> for bool {
46 #[inline(always)]
47 fn from(variant: SPI0_RST_N_A) -> Self {
48 variant as u8 != 0
49 }
50}
51#[doc = "Field `SPI0_RST_N` reader - SPI0 reset control."]
52pub struct SPI0_RST_N_R(crate::FieldReader<bool, SPI0_RST_N_A>);
53impl SPI0_RST_N_R {
54 pub(crate) fn new(bits: bool) -> Self {
55 SPI0_RST_N_R(crate::FieldReader::new(bits))
56 }
57 #[doc = r"Get enumerated values variant"]
58 #[inline(always)]
59 pub fn variant(&self) -> SPI0_RST_N_A {
60 match self.bits {
61 false => SPI0_RST_N_A::SPI0_RST_N_0,
62 true => SPI0_RST_N_A::SPI0_RST_N_1,
63 }
64 }
65 #[doc = "Checks if the value of the field is `SPI0_RST_N_0`"]
66 #[inline(always)]
67 pub fn is_spi0_rst_n_0(&self) -> bool {
68 **self == SPI0_RST_N_A::SPI0_RST_N_0
69 }
70 #[doc = "Checks if the value of the field is `SPI0_RST_N_1`"]
71 #[inline(always)]
72 pub fn is_spi0_rst_n_1(&self) -> bool {
73 **self == SPI0_RST_N_A::SPI0_RST_N_1
74 }
75}
76impl core::ops::Deref for SPI0_RST_N_R {
77 type Target = crate::FieldReader<bool, SPI0_RST_N_A>;
78 #[inline(always)]
79 fn deref(&self) -> &Self::Target {
80 &self.0
81 }
82}
83#[doc = "Field `SPI0_RST_N` writer - SPI0 reset control."]
84pub struct SPI0_RST_N_W<'a> {
85 w: &'a mut W,
86}
87impl<'a> SPI0_RST_N_W<'a> {
88 #[doc = r"Writes `variant` to the field"]
89 #[inline(always)]
90 pub fn variant(self, variant: SPI0_RST_N_A) -> &'a mut W {
91 self.bit(variant.into())
92 }
93 #[doc = "Assert the SPI0 reset."]
94 #[inline(always)]
95 pub fn spi0_rst_n_0(self) -> &'a mut W {
96 self.variant(SPI0_RST_N_A::SPI0_RST_N_0)
97 }
98 #[doc = "Clear the SPI0 reset."]
99 #[inline(always)]
100 pub fn spi0_rst_n_1(self) -> &'a mut W {
101 self.variant(SPI0_RST_N_A::SPI0_RST_N_1)
102 }
103 #[doc = r"Sets the field bit"]
104 #[inline(always)]
105 pub fn set_bit(self) -> &'a mut W {
106 self.bit(true)
107 }
108 #[doc = r"Clears the field bit"]
109 #[inline(always)]
110 pub fn clear_bit(self) -> &'a mut W {
111 self.bit(false)
112 }
113 #[doc = r"Writes raw bits to the field"]
114 #[inline(always)]
115 pub fn bit(self, value: bool) -> &'a mut W {
116 self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
117 self.w
118 }
119}
120#[doc = "SPI1 reset control.\n\nValue on reset: 1"]
121#[derive(Clone, Copy, Debug, PartialEq)]
122pub enum SPI1_RST_N_A {
123 #[doc = "0: Assert the SPI1 reset."]
124 SPI1_RST_N_0 = 0,
125 #[doc = "1: Clear the SPI1 reset."]
126 SPI1_RST_N_1 = 1,
127}
128impl From<SPI1_RST_N_A> for bool {
129 #[inline(always)]
130 fn from(variant: SPI1_RST_N_A) -> Self {
131 variant as u8 != 0
132 }
133}
134#[doc = "Field `SPI1_RST_N` reader - SPI1 reset control."]
135pub struct SPI1_RST_N_R(crate::FieldReader<bool, SPI1_RST_N_A>);
136impl SPI1_RST_N_R {
137 pub(crate) fn new(bits: bool) -> Self {
138 SPI1_RST_N_R(crate::FieldReader::new(bits))
139 }
140 #[doc = r"Get enumerated values variant"]
141 #[inline(always)]
142 pub fn variant(&self) -> SPI1_RST_N_A {
143 match self.bits {
144 false => SPI1_RST_N_A::SPI1_RST_N_0,
145 true => SPI1_RST_N_A::SPI1_RST_N_1,
146 }
147 }
148 #[doc = "Checks if the value of the field is `SPI1_RST_N_0`"]
149 #[inline(always)]
150 pub fn is_spi1_rst_n_0(&self) -> bool {
151 **self == SPI1_RST_N_A::SPI1_RST_N_0
152 }
153 #[doc = "Checks if the value of the field is `SPI1_RST_N_1`"]
154 #[inline(always)]
155 pub fn is_spi1_rst_n_1(&self) -> bool {
156 **self == SPI1_RST_N_A::SPI1_RST_N_1
157 }
158}
159impl core::ops::Deref for SPI1_RST_N_R {
160 type Target = crate::FieldReader<bool, SPI1_RST_N_A>;
161 #[inline(always)]
162 fn deref(&self) -> &Self::Target {
163 &self.0
164 }
165}
166#[doc = "Field `SPI1_RST_N` writer - SPI1 reset control."]
167pub struct SPI1_RST_N_W<'a> {
168 w: &'a mut W,
169}
170impl<'a> SPI1_RST_N_W<'a> {
171 #[doc = r"Writes `variant` to the field"]
172 #[inline(always)]
173 pub fn variant(self, variant: SPI1_RST_N_A) -> &'a mut W {
174 self.bit(variant.into())
175 }
176 #[doc = "Assert the SPI1 reset."]
177 #[inline(always)]
178 pub fn spi1_rst_n_0(self) -> &'a mut W {
179 self.variant(SPI1_RST_N_A::SPI1_RST_N_0)
180 }
181 #[doc = "Clear the SPI1 reset."]
182 #[inline(always)]
183 pub fn spi1_rst_n_1(self) -> &'a mut W {
184 self.variant(SPI1_RST_N_A::SPI1_RST_N_1)
185 }
186 #[doc = r"Sets the field bit"]
187 #[inline(always)]
188 pub fn set_bit(self) -> &'a mut W {
189 self.bit(true)
190 }
191 #[doc = r"Clears the field bit"]
192 #[inline(always)]
193 pub fn clear_bit(self) -> &'a mut W {
194 self.bit(false)
195 }
196 #[doc = r"Writes raw bits to the field"]
197 #[inline(always)]
198 pub fn bit(self, value: bool) -> &'a mut W {
199 self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
200 self.w
201 }
202}
203#[doc = "USART fractional baud rate generator(UARTFRG) reset control.\n\nValue on reset: 1"]
204#[derive(Clone, Copy, Debug, PartialEq)]
205pub enum UARTFRG_RST_N_A {
206 #[doc = "0: Assert the UARTFRG reset."]
207 UARTFRG_RST_N_0 = 0,
208 #[doc = "1: Clear the UARTFRG reset."]
209 UARTFRG_RST_N_1 = 1,
210}
211impl From<UARTFRG_RST_N_A> for bool {
212 #[inline(always)]
213 fn from(variant: UARTFRG_RST_N_A) -> Self {
214 variant as u8 != 0
215 }
216}
217#[doc = "Field `UARTFRG_RST_N` reader - USART fractional baud rate generator(UARTFRG) reset control."]
218pub struct UARTFRG_RST_N_R(crate::FieldReader<bool, UARTFRG_RST_N_A>);
219impl UARTFRG_RST_N_R {
220 pub(crate) fn new(bits: bool) -> Self {
221 UARTFRG_RST_N_R(crate::FieldReader::new(bits))
222 }
223 #[doc = r"Get enumerated values variant"]
224 #[inline(always)]
225 pub fn variant(&self) -> UARTFRG_RST_N_A {
226 match self.bits {
227 false => UARTFRG_RST_N_A::UARTFRG_RST_N_0,
228 true => UARTFRG_RST_N_A::UARTFRG_RST_N_1,
229 }
230 }
231 #[doc = "Checks if the value of the field is `UARTFRG_RST_N_0`"]
232 #[inline(always)]
233 pub fn is_uartfrg_rst_n_0(&self) -> bool {
234 **self == UARTFRG_RST_N_A::UARTFRG_RST_N_0
235 }
236 #[doc = "Checks if the value of the field is `UARTFRG_RST_N_1`"]
237 #[inline(always)]
238 pub fn is_uartfrg_rst_n_1(&self) -> bool {
239 **self == UARTFRG_RST_N_A::UARTFRG_RST_N_1
240 }
241}
242impl core::ops::Deref for UARTFRG_RST_N_R {
243 type Target = crate::FieldReader<bool, UARTFRG_RST_N_A>;
244 #[inline(always)]
245 fn deref(&self) -> &Self::Target {
246 &self.0
247 }
248}
249#[doc = "Field `UARTFRG_RST_N` writer - USART fractional baud rate generator(UARTFRG) reset control."]
250pub struct UARTFRG_RST_N_W<'a> {
251 w: &'a mut W,
252}
253impl<'a> UARTFRG_RST_N_W<'a> {
254 #[doc = r"Writes `variant` to the field"]
255 #[inline(always)]
256 pub fn variant(self, variant: UARTFRG_RST_N_A) -> &'a mut W {
257 self.bit(variant.into())
258 }
259 #[doc = "Assert the UARTFRG reset."]
260 #[inline(always)]
261 pub fn uartfrg_rst_n_0(self) -> &'a mut W {
262 self.variant(UARTFRG_RST_N_A::UARTFRG_RST_N_0)
263 }
264 #[doc = "Clear the UARTFRG reset."]
265 #[inline(always)]
266 pub fn uartfrg_rst_n_1(self) -> &'a mut W {
267 self.variant(UARTFRG_RST_N_A::UARTFRG_RST_N_1)
268 }
269 #[doc = r"Sets the field bit"]
270 #[inline(always)]
271 pub fn set_bit(self) -> &'a mut W {
272 self.bit(true)
273 }
274 #[doc = r"Clears the field bit"]
275 #[inline(always)]
276 pub fn clear_bit(self) -> &'a mut W {
277 self.bit(false)
278 }
279 #[doc = r"Writes raw bits to the field"]
280 #[inline(always)]
281 pub fn bit(self, value: bool) -> &'a mut W {
282 self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
283 self.w
284 }
285}
286#[doc = "USART0 reset control.\n\nValue on reset: 1"]
287#[derive(Clone, Copy, Debug, PartialEq)]
288pub enum UART0_RST_N_A {
289 #[doc = "0: Assert the USART0 reset."]
290 UART0_RST_N_0 = 0,
291 #[doc = "1: Clear the USART0 reset."]
292 UART0_RST_N_1 = 1,
293}
294impl From<UART0_RST_N_A> for bool {
295 #[inline(always)]
296 fn from(variant: UART0_RST_N_A) -> Self {
297 variant as u8 != 0
298 }
299}
300#[doc = "Field `UART0_RST_N` reader - USART0 reset control."]
301pub struct UART0_RST_N_R(crate::FieldReader<bool, UART0_RST_N_A>);
302impl UART0_RST_N_R {
303 pub(crate) fn new(bits: bool) -> Self {
304 UART0_RST_N_R(crate::FieldReader::new(bits))
305 }
306 #[doc = r"Get enumerated values variant"]
307 #[inline(always)]
308 pub fn variant(&self) -> UART0_RST_N_A {
309 match self.bits {
310 false => UART0_RST_N_A::UART0_RST_N_0,
311 true => UART0_RST_N_A::UART0_RST_N_1,
312 }
313 }
314 #[doc = "Checks if the value of the field is `UART0_RST_N_0`"]
315 #[inline(always)]
316 pub fn is_uart0_rst_n_0(&self) -> bool {
317 **self == UART0_RST_N_A::UART0_RST_N_0
318 }
319 #[doc = "Checks if the value of the field is `UART0_RST_N_1`"]
320 #[inline(always)]
321 pub fn is_uart0_rst_n_1(&self) -> bool {
322 **self == UART0_RST_N_A::UART0_RST_N_1
323 }
324}
325impl core::ops::Deref for UART0_RST_N_R {
326 type Target = crate::FieldReader<bool, UART0_RST_N_A>;
327 #[inline(always)]
328 fn deref(&self) -> &Self::Target {
329 &self.0
330 }
331}
332#[doc = "Field `UART0_RST_N` writer - USART0 reset control."]
333pub struct UART0_RST_N_W<'a> {
334 w: &'a mut W,
335}
336impl<'a> UART0_RST_N_W<'a> {
337 #[doc = r"Writes `variant` to the field"]
338 #[inline(always)]
339 pub fn variant(self, variant: UART0_RST_N_A) -> &'a mut W {
340 self.bit(variant.into())
341 }
342 #[doc = "Assert the USART0 reset."]
343 #[inline(always)]
344 pub fn uart0_rst_n_0(self) -> &'a mut W {
345 self.variant(UART0_RST_N_A::UART0_RST_N_0)
346 }
347 #[doc = "Clear the USART0 reset."]
348 #[inline(always)]
349 pub fn uart0_rst_n_1(self) -> &'a mut W {
350 self.variant(UART0_RST_N_A::UART0_RST_N_1)
351 }
352 #[doc = r"Sets the field bit"]
353 #[inline(always)]
354 pub fn set_bit(self) -> &'a mut W {
355 self.bit(true)
356 }
357 #[doc = r"Clears the field bit"]
358 #[inline(always)]
359 pub fn clear_bit(self) -> &'a mut W {
360 self.bit(false)
361 }
362 #[doc = r"Writes raw bits to the field"]
363 #[inline(always)]
364 pub fn bit(self, value: bool) -> &'a mut W {
365 self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3);
366 self.w
367 }
368}
369#[doc = "USART1 reset control.\n\nValue on reset: 1"]
370#[derive(Clone, Copy, Debug, PartialEq)]
371pub enum UART1_RST_N_A {
372 #[doc = "0: Assert the USART1 reset."]
373 UART1_RST_N_0 = 0,
374 #[doc = "1: Clear the USART1 reset."]
375 UART1_RST_N_1 = 1,
376}
377impl From<UART1_RST_N_A> for bool {
378 #[inline(always)]
379 fn from(variant: UART1_RST_N_A) -> Self {
380 variant as u8 != 0
381 }
382}
383#[doc = "Field `UART1_RST_N` reader - USART1 reset control."]
384pub struct UART1_RST_N_R(crate::FieldReader<bool, UART1_RST_N_A>);
385impl UART1_RST_N_R {
386 pub(crate) fn new(bits: bool) -> Self {
387 UART1_RST_N_R(crate::FieldReader::new(bits))
388 }
389 #[doc = r"Get enumerated values variant"]
390 #[inline(always)]
391 pub fn variant(&self) -> UART1_RST_N_A {
392 match self.bits {
393 false => UART1_RST_N_A::UART1_RST_N_0,
394 true => UART1_RST_N_A::UART1_RST_N_1,
395 }
396 }
397 #[doc = "Checks if the value of the field is `UART1_RST_N_0`"]
398 #[inline(always)]
399 pub fn is_uart1_rst_n_0(&self) -> bool {
400 **self == UART1_RST_N_A::UART1_RST_N_0
401 }
402 #[doc = "Checks if the value of the field is `UART1_RST_N_1`"]
403 #[inline(always)]
404 pub fn is_uart1_rst_n_1(&self) -> bool {
405 **self == UART1_RST_N_A::UART1_RST_N_1
406 }
407}
408impl core::ops::Deref for UART1_RST_N_R {
409 type Target = crate::FieldReader<bool, UART1_RST_N_A>;
410 #[inline(always)]
411 fn deref(&self) -> &Self::Target {
412 &self.0
413 }
414}
415#[doc = "Field `UART1_RST_N` writer - USART1 reset control."]
416pub struct UART1_RST_N_W<'a> {
417 w: &'a mut W,
418}
419impl<'a> UART1_RST_N_W<'a> {
420 #[doc = r"Writes `variant` to the field"]
421 #[inline(always)]
422 pub fn variant(self, variant: UART1_RST_N_A) -> &'a mut W {
423 self.bit(variant.into())
424 }
425 #[doc = "Assert the USART1 reset."]
426 #[inline(always)]
427 pub fn uart1_rst_n_0(self) -> &'a mut W {
428 self.variant(UART1_RST_N_A::UART1_RST_N_0)
429 }
430 #[doc = "Clear the USART1 reset."]
431 #[inline(always)]
432 pub fn uart1_rst_n_1(self) -> &'a mut W {
433 self.variant(UART1_RST_N_A::UART1_RST_N_1)
434 }
435 #[doc = r"Sets the field bit"]
436 #[inline(always)]
437 pub fn set_bit(self) -> &'a mut W {
438 self.bit(true)
439 }
440 #[doc = r"Clears the field bit"]
441 #[inline(always)]
442 pub fn clear_bit(self) -> &'a mut W {
443 self.bit(false)
444 }
445 #[doc = r"Writes raw bits to the field"]
446 #[inline(always)]
447 pub fn bit(self, value: bool) -> &'a mut W {
448 self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4);
449 self.w
450 }
451}
452#[doc = "USART2 reset control.\n\nValue on reset: 1"]
453#[derive(Clone, Copy, Debug, PartialEq)]
454pub enum UART2_RST_N_A {
455 #[doc = "0: Assert the USART2 reset."]
456 UART2_RST_N_0 = 0,
457 #[doc = "1: Clear the USART2 reset."]
458 UART2_RST_N_1 = 1,
459}
460impl From<UART2_RST_N_A> for bool {
461 #[inline(always)]
462 fn from(variant: UART2_RST_N_A) -> Self {
463 variant as u8 != 0
464 }
465}
466#[doc = "Field `UART2_RST_N` reader - USART2 reset control."]
467pub struct UART2_RST_N_R(crate::FieldReader<bool, UART2_RST_N_A>);
468impl UART2_RST_N_R {
469 pub(crate) fn new(bits: bool) -> Self {
470 UART2_RST_N_R(crate::FieldReader::new(bits))
471 }
472 #[doc = r"Get enumerated values variant"]
473 #[inline(always)]
474 pub fn variant(&self) -> UART2_RST_N_A {
475 match self.bits {
476 false => UART2_RST_N_A::UART2_RST_N_0,
477 true => UART2_RST_N_A::UART2_RST_N_1,
478 }
479 }
480 #[doc = "Checks if the value of the field is `UART2_RST_N_0`"]
481 #[inline(always)]
482 pub fn is_uart2_rst_n_0(&self) -> bool {
483 **self == UART2_RST_N_A::UART2_RST_N_0
484 }
485 #[doc = "Checks if the value of the field is `UART2_RST_N_1`"]
486 #[inline(always)]
487 pub fn is_uart2_rst_n_1(&self) -> bool {
488 **self == UART2_RST_N_A::UART2_RST_N_1
489 }
490}
491impl core::ops::Deref for UART2_RST_N_R {
492 type Target = crate::FieldReader<bool, UART2_RST_N_A>;
493 #[inline(always)]
494 fn deref(&self) -> &Self::Target {
495 &self.0
496 }
497}
498#[doc = "Field `UART2_RST_N` writer - USART2 reset control."]
499pub struct UART2_RST_N_W<'a> {
500 w: &'a mut W,
501}
502impl<'a> UART2_RST_N_W<'a> {
503 #[doc = r"Writes `variant` to the field"]
504 #[inline(always)]
505 pub fn variant(self, variant: UART2_RST_N_A) -> &'a mut W {
506 self.bit(variant.into())
507 }
508 #[doc = "Assert the USART2 reset."]
509 #[inline(always)]
510 pub fn uart2_rst_n_0(self) -> &'a mut W {
511 self.variant(UART2_RST_N_A::UART2_RST_N_0)
512 }
513 #[doc = "Clear the USART2 reset."]
514 #[inline(always)]
515 pub fn uart2_rst_n_1(self) -> &'a mut W {
516 self.variant(UART2_RST_N_A::UART2_RST_N_1)
517 }
518 #[doc = r"Sets the field bit"]
519 #[inline(always)]
520 pub fn set_bit(self) -> &'a mut W {
521 self.bit(true)
522 }
523 #[doc = r"Clears the field bit"]
524 #[inline(always)]
525 pub fn clear_bit(self) -> &'a mut W {
526 self.bit(false)
527 }
528 #[doc = r"Writes raw bits to the field"]
529 #[inline(always)]
530 pub fn bit(self, value: bool) -> &'a mut W {
531 self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5);
532 self.w
533 }
534}
535#[doc = "I2C0 reset control.\n\nValue on reset: 1"]
536#[derive(Clone, Copy, Debug, PartialEq)]
537pub enum I2C0_RST_N_A {
538 #[doc = "0: Assert the I2C0 reset."]
539 I2C0_RST_N_0 = 0,
540 #[doc = "1: Clear the I2C0 reset."]
541 I2C0_RST_N_1 = 1,
542}
543impl From<I2C0_RST_N_A> for bool {
544 #[inline(always)]
545 fn from(variant: I2C0_RST_N_A) -> Self {
546 variant as u8 != 0
547 }
548}
549#[doc = "Field `I2C0_RST_N` reader - I2C0 reset control."]
550pub struct I2C0_RST_N_R(crate::FieldReader<bool, I2C0_RST_N_A>);
551impl I2C0_RST_N_R {
552 pub(crate) fn new(bits: bool) -> Self {
553 I2C0_RST_N_R(crate::FieldReader::new(bits))
554 }
555 #[doc = r"Get enumerated values variant"]
556 #[inline(always)]
557 pub fn variant(&self) -> I2C0_RST_N_A {
558 match self.bits {
559 false => I2C0_RST_N_A::I2C0_RST_N_0,
560 true => I2C0_RST_N_A::I2C0_RST_N_1,
561 }
562 }
563 #[doc = "Checks if the value of the field is `I2C0_RST_N_0`"]
564 #[inline(always)]
565 pub fn is_i2c0_rst_n_0(&self) -> bool {
566 **self == I2C0_RST_N_A::I2C0_RST_N_0
567 }
568 #[doc = "Checks if the value of the field is `I2C0_RST_N_1`"]
569 #[inline(always)]
570 pub fn is_i2c0_rst_n_1(&self) -> bool {
571 **self == I2C0_RST_N_A::I2C0_RST_N_1
572 }
573}
574impl core::ops::Deref for I2C0_RST_N_R {
575 type Target = crate::FieldReader<bool, I2C0_RST_N_A>;
576 #[inline(always)]
577 fn deref(&self) -> &Self::Target {
578 &self.0
579 }
580}
581#[doc = "Field `I2C0_RST_N` writer - I2C0 reset control."]
582pub struct I2C0_RST_N_W<'a> {
583 w: &'a mut W,
584}
585impl<'a> I2C0_RST_N_W<'a> {
586 #[doc = r"Writes `variant` to the field"]
587 #[inline(always)]
588 pub fn variant(self, variant: I2C0_RST_N_A) -> &'a mut W {
589 self.bit(variant.into())
590 }
591 #[doc = "Assert the I2C0 reset."]
592 #[inline(always)]
593 pub fn i2c0_rst_n_0(self) -> &'a mut W {
594 self.variant(I2C0_RST_N_A::I2C0_RST_N_0)
595 }
596 #[doc = "Clear the I2C0 reset."]
597 #[inline(always)]
598 pub fn i2c0_rst_n_1(self) -> &'a mut W {
599 self.variant(I2C0_RST_N_A::I2C0_RST_N_1)
600 }
601 #[doc = r"Sets the field bit"]
602 #[inline(always)]
603 pub fn set_bit(self) -> &'a mut W {
604 self.bit(true)
605 }
606 #[doc = r"Clears the field bit"]
607 #[inline(always)]
608 pub fn clear_bit(self) -> &'a mut W {
609 self.bit(false)
610 }
611 #[doc = r"Writes raw bits to the field"]
612 #[inline(always)]
613 pub fn bit(self, value: bool) -> &'a mut W {
614 self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6);
615 self.w
616 }
617}
618#[doc = "Multi-rate timer (MRT) reset control.\n\nValue on reset: 1"]
619#[derive(Clone, Copy, Debug, PartialEq)]
620pub enum MRT_RST_N_A {
621 #[doc = "0: Assert the MRT reset."]
622 MRT_RST_N_0 = 0,
623 #[doc = "1: Clear the MRT reset."]
624 MRT_RST_N_1 = 1,
625}
626impl From<MRT_RST_N_A> for bool {
627 #[inline(always)]
628 fn from(variant: MRT_RST_N_A) -> Self {
629 variant as u8 != 0
630 }
631}
632#[doc = "Field `MRT_RST_N` reader - Multi-rate timer (MRT) reset control."]
633pub struct MRT_RST_N_R(crate::FieldReader<bool, MRT_RST_N_A>);
634impl MRT_RST_N_R {
635 pub(crate) fn new(bits: bool) -> Self {
636 MRT_RST_N_R(crate::FieldReader::new(bits))
637 }
638 #[doc = r"Get enumerated values variant"]
639 #[inline(always)]
640 pub fn variant(&self) -> MRT_RST_N_A {
641 match self.bits {
642 false => MRT_RST_N_A::MRT_RST_N_0,
643 true => MRT_RST_N_A::MRT_RST_N_1,
644 }
645 }
646 #[doc = "Checks if the value of the field is `MRT_RST_N_0`"]
647 #[inline(always)]
648 pub fn is_mrt_rst_n_0(&self) -> bool {
649 **self == MRT_RST_N_A::MRT_RST_N_0
650 }
651 #[doc = "Checks if the value of the field is `MRT_RST_N_1`"]
652 #[inline(always)]
653 pub fn is_mrt_rst_n_1(&self) -> bool {
654 **self == MRT_RST_N_A::MRT_RST_N_1
655 }
656}
657impl core::ops::Deref for MRT_RST_N_R {
658 type Target = crate::FieldReader<bool, MRT_RST_N_A>;
659 #[inline(always)]
660 fn deref(&self) -> &Self::Target {
661 &self.0
662 }
663}
664#[doc = "Field `MRT_RST_N` writer - Multi-rate timer (MRT) reset control."]
665pub struct MRT_RST_N_W<'a> {
666 w: &'a mut W,
667}
668impl<'a> MRT_RST_N_W<'a> {
669 #[doc = r"Writes `variant` to the field"]
670 #[inline(always)]
671 pub fn variant(self, variant: MRT_RST_N_A) -> &'a mut W {
672 self.bit(variant.into())
673 }
674 #[doc = "Assert the MRT reset."]
675 #[inline(always)]
676 pub fn mrt_rst_n_0(self) -> &'a mut W {
677 self.variant(MRT_RST_N_A::MRT_RST_N_0)
678 }
679 #[doc = "Clear the MRT reset."]
680 #[inline(always)]
681 pub fn mrt_rst_n_1(self) -> &'a mut W {
682 self.variant(MRT_RST_N_A::MRT_RST_N_1)
683 }
684 #[doc = r"Sets the field bit"]
685 #[inline(always)]
686 pub fn set_bit(self) -> &'a mut W {
687 self.bit(true)
688 }
689 #[doc = r"Clears the field bit"]
690 #[inline(always)]
691 pub fn clear_bit(self) -> &'a mut W {
692 self.bit(false)
693 }
694 #[doc = r"Writes raw bits to the field"]
695 #[inline(always)]
696 pub fn bit(self, value: bool) -> &'a mut W {
697 self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7);
698 self.w
699 }
700}
701#[doc = "SCT reset control.\n\nValue on reset: 1"]
702#[derive(Clone, Copy, Debug, PartialEq)]
703pub enum SCT_RST_N_A {
704 #[doc = "0: Assert the SCT reset."]
705 SCT_RST_N_0 = 0,
706 #[doc = "1: Clear the SCT reset."]
707 SCT_RST_N_1 = 1,
708}
709impl From<SCT_RST_N_A> for bool {
710 #[inline(always)]
711 fn from(variant: SCT_RST_N_A) -> Self {
712 variant as u8 != 0
713 }
714}
715#[doc = "Field `SCT_RST_N` reader - SCT reset control."]
716pub struct SCT_RST_N_R(crate::FieldReader<bool, SCT_RST_N_A>);
717impl SCT_RST_N_R {
718 pub(crate) fn new(bits: bool) -> Self {
719 SCT_RST_N_R(crate::FieldReader::new(bits))
720 }
721 #[doc = r"Get enumerated values variant"]
722 #[inline(always)]
723 pub fn variant(&self) -> SCT_RST_N_A {
724 match self.bits {
725 false => SCT_RST_N_A::SCT_RST_N_0,
726 true => SCT_RST_N_A::SCT_RST_N_1,
727 }
728 }
729 #[doc = "Checks if the value of the field is `SCT_RST_N_0`"]
730 #[inline(always)]
731 pub fn is_sct_rst_n_0(&self) -> bool {
732 **self == SCT_RST_N_A::SCT_RST_N_0
733 }
734 #[doc = "Checks if the value of the field is `SCT_RST_N_1`"]
735 #[inline(always)]
736 pub fn is_sct_rst_n_1(&self) -> bool {
737 **self == SCT_RST_N_A::SCT_RST_N_1
738 }
739}
740impl core::ops::Deref for SCT_RST_N_R {
741 type Target = crate::FieldReader<bool, SCT_RST_N_A>;
742 #[inline(always)]
743 fn deref(&self) -> &Self::Target {
744 &self.0
745 }
746}
747#[doc = "Field `SCT_RST_N` writer - SCT reset control."]
748pub struct SCT_RST_N_W<'a> {
749 w: &'a mut W,
750}
751impl<'a> SCT_RST_N_W<'a> {
752 #[doc = r"Writes `variant` to the field"]
753 #[inline(always)]
754 pub fn variant(self, variant: SCT_RST_N_A) -> &'a mut W {
755 self.bit(variant.into())
756 }
757 #[doc = "Assert the SCT reset."]
758 #[inline(always)]
759 pub fn sct_rst_n_0(self) -> &'a mut W {
760 self.variant(SCT_RST_N_A::SCT_RST_N_0)
761 }
762 #[doc = "Clear the SCT reset."]
763 #[inline(always)]
764 pub fn sct_rst_n_1(self) -> &'a mut W {
765 self.variant(SCT_RST_N_A::SCT_RST_N_1)
766 }
767 #[doc = r"Sets the field bit"]
768 #[inline(always)]
769 pub fn set_bit(self) -> &'a mut W {
770 self.bit(true)
771 }
772 #[doc = r"Clears the field bit"]
773 #[inline(always)]
774 pub fn clear_bit(self) -> &'a mut W {
775 self.bit(false)
776 }
777 #[doc = r"Writes raw bits to the field"]
778 #[inline(always)]
779 pub fn bit(self, value: bool) -> &'a mut W {
780 self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8);
781 self.w
782 }
783}
784#[doc = "Self-wake-up timer (WKT) reset control.\n\nValue on reset: 1"]
785#[derive(Clone, Copy, Debug, PartialEq)]
786pub enum WKT_RST_N_A {
787 #[doc = "0: Assert the WKT reset."]
788 WKT_RST_N_0 = 0,
789 #[doc = "1: Clear the WKT reset."]
790 WKT_RST_N_1 = 1,
791}
792impl From<WKT_RST_N_A> for bool {
793 #[inline(always)]
794 fn from(variant: WKT_RST_N_A) -> Self {
795 variant as u8 != 0
796 }
797}
798#[doc = "Field `WKT_RST_N` reader - Self-wake-up timer (WKT) reset control."]
799pub struct WKT_RST_N_R(crate::FieldReader<bool, WKT_RST_N_A>);
800impl WKT_RST_N_R {
801 pub(crate) fn new(bits: bool) -> Self {
802 WKT_RST_N_R(crate::FieldReader::new(bits))
803 }
804 #[doc = r"Get enumerated values variant"]
805 #[inline(always)]
806 pub fn variant(&self) -> WKT_RST_N_A {
807 match self.bits {
808 false => WKT_RST_N_A::WKT_RST_N_0,
809 true => WKT_RST_N_A::WKT_RST_N_1,
810 }
811 }
812 #[doc = "Checks if the value of the field is `WKT_RST_N_0`"]
813 #[inline(always)]
814 pub fn is_wkt_rst_n_0(&self) -> bool {
815 **self == WKT_RST_N_A::WKT_RST_N_0
816 }
817 #[doc = "Checks if the value of the field is `WKT_RST_N_1`"]
818 #[inline(always)]
819 pub fn is_wkt_rst_n_1(&self) -> bool {
820 **self == WKT_RST_N_A::WKT_RST_N_1
821 }
822}
823impl core::ops::Deref for WKT_RST_N_R {
824 type Target = crate::FieldReader<bool, WKT_RST_N_A>;
825 #[inline(always)]
826 fn deref(&self) -> &Self::Target {
827 &self.0
828 }
829}
830#[doc = "Field `WKT_RST_N` writer - Self-wake-up timer (WKT) reset control."]
831pub struct WKT_RST_N_W<'a> {
832 w: &'a mut W,
833}
834impl<'a> WKT_RST_N_W<'a> {
835 #[doc = r"Writes `variant` to the field"]
836 #[inline(always)]
837 pub fn variant(self, variant: WKT_RST_N_A) -> &'a mut W {
838 self.bit(variant.into())
839 }
840 #[doc = "Assert the WKT reset."]
841 #[inline(always)]
842 pub fn wkt_rst_n_0(self) -> &'a mut W {
843 self.variant(WKT_RST_N_A::WKT_RST_N_0)
844 }
845 #[doc = "Clear the WKT reset."]
846 #[inline(always)]
847 pub fn wkt_rst_n_1(self) -> &'a mut W {
848 self.variant(WKT_RST_N_A::WKT_RST_N_1)
849 }
850 #[doc = r"Sets the field bit"]
851 #[inline(always)]
852 pub fn set_bit(self) -> &'a mut W {
853 self.bit(true)
854 }
855 #[doc = r"Clears the field bit"]
856 #[inline(always)]
857 pub fn clear_bit(self) -> &'a mut W {
858 self.bit(false)
859 }
860 #[doc = r"Writes raw bits to the field"]
861 #[inline(always)]
862 pub fn bit(self, value: bool) -> &'a mut W {
863 self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9);
864 self.w
865 }
866}
867#[doc = "GPIO and GPIO pin interrupt reset control.\n\nValue on reset: 1"]
868#[derive(Clone, Copy, Debug, PartialEq)]
869pub enum GPIO_RST_N_A {
870 #[doc = "0: Assert the GPIO reset."]
871 GPIO_RST_N_0 = 0,
872 #[doc = "1: Clear the GPIO reset."]
873 GPIO_RST_N_1 = 1,
874}
875impl From<GPIO_RST_N_A> for bool {
876 #[inline(always)]
877 fn from(variant: GPIO_RST_N_A) -> Self {
878 variant as u8 != 0
879 }
880}
881#[doc = "Field `GPIO_RST_N` reader - GPIO and GPIO pin interrupt reset control."]
882pub struct GPIO_RST_N_R(crate::FieldReader<bool, GPIO_RST_N_A>);
883impl GPIO_RST_N_R {
884 pub(crate) fn new(bits: bool) -> Self {
885 GPIO_RST_N_R(crate::FieldReader::new(bits))
886 }
887 #[doc = r"Get enumerated values variant"]
888 #[inline(always)]
889 pub fn variant(&self) -> GPIO_RST_N_A {
890 match self.bits {
891 false => GPIO_RST_N_A::GPIO_RST_N_0,
892 true => GPIO_RST_N_A::GPIO_RST_N_1,
893 }
894 }
895 #[doc = "Checks if the value of the field is `GPIO_RST_N_0`"]
896 #[inline(always)]
897 pub fn is_gpio_rst_n_0(&self) -> bool {
898 **self == GPIO_RST_N_A::GPIO_RST_N_0
899 }
900 #[doc = "Checks if the value of the field is `GPIO_RST_N_1`"]
901 #[inline(always)]
902 pub fn is_gpio_rst_n_1(&self) -> bool {
903 **self == GPIO_RST_N_A::GPIO_RST_N_1
904 }
905}
906impl core::ops::Deref for GPIO_RST_N_R {
907 type Target = crate::FieldReader<bool, GPIO_RST_N_A>;
908 #[inline(always)]
909 fn deref(&self) -> &Self::Target {
910 &self.0
911 }
912}
913#[doc = "Field `GPIO_RST_N` writer - GPIO and GPIO pin interrupt reset control."]
914pub struct GPIO_RST_N_W<'a> {
915 w: &'a mut W,
916}
917impl<'a> GPIO_RST_N_W<'a> {
918 #[doc = r"Writes `variant` to the field"]
919 #[inline(always)]
920 pub fn variant(self, variant: GPIO_RST_N_A) -> &'a mut W {
921 self.bit(variant.into())
922 }
923 #[doc = "Assert the GPIO reset."]
924 #[inline(always)]
925 pub fn gpio_rst_n_0(self) -> &'a mut W {
926 self.variant(GPIO_RST_N_A::GPIO_RST_N_0)
927 }
928 #[doc = "Clear the GPIO reset."]
929 #[inline(always)]
930 pub fn gpio_rst_n_1(self) -> &'a mut W {
931 self.variant(GPIO_RST_N_A::GPIO_RST_N_1)
932 }
933 #[doc = r"Sets the field bit"]
934 #[inline(always)]
935 pub fn set_bit(self) -> &'a mut W {
936 self.bit(true)
937 }
938 #[doc = r"Clears the field bit"]
939 #[inline(always)]
940 pub fn clear_bit(self) -> &'a mut W {
941 self.bit(false)
942 }
943 #[doc = r"Writes raw bits to the field"]
944 #[inline(always)]
945 pub fn bit(self, value: bool) -> &'a mut W {
946 self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10);
947 self.w
948 }
949}
950#[doc = "Flash controller reset control.\n\nValue on reset: 1"]
951#[derive(Clone, Copy, Debug, PartialEq)]
952pub enum FLASH_RST_N_A {
953 #[doc = "0: Assert the flash controller reset."]
954 FLASH_RST_N_0 = 0,
955 #[doc = "1: Clear the flash controller reset."]
956 FLASH_RST_N_1 = 1,
957}
958impl From<FLASH_RST_N_A> for bool {
959 #[inline(always)]
960 fn from(variant: FLASH_RST_N_A) -> Self {
961 variant as u8 != 0
962 }
963}
964#[doc = "Field `FLASH_RST_N` reader - Flash controller reset control."]
965pub struct FLASH_RST_N_R(crate::FieldReader<bool, FLASH_RST_N_A>);
966impl FLASH_RST_N_R {
967 pub(crate) fn new(bits: bool) -> Self {
968 FLASH_RST_N_R(crate::FieldReader::new(bits))
969 }
970 #[doc = r"Get enumerated values variant"]
971 #[inline(always)]
972 pub fn variant(&self) -> FLASH_RST_N_A {
973 match self.bits {
974 false => FLASH_RST_N_A::FLASH_RST_N_0,
975 true => FLASH_RST_N_A::FLASH_RST_N_1,
976 }
977 }
978 #[doc = "Checks if the value of the field is `FLASH_RST_N_0`"]
979 #[inline(always)]
980 pub fn is_flash_rst_n_0(&self) -> bool {
981 **self == FLASH_RST_N_A::FLASH_RST_N_0
982 }
983 #[doc = "Checks if the value of the field is `FLASH_RST_N_1`"]
984 #[inline(always)]
985 pub fn is_flash_rst_n_1(&self) -> bool {
986 **self == FLASH_RST_N_A::FLASH_RST_N_1
987 }
988}
989impl core::ops::Deref for FLASH_RST_N_R {
990 type Target = crate::FieldReader<bool, FLASH_RST_N_A>;
991 #[inline(always)]
992 fn deref(&self) -> &Self::Target {
993 &self.0
994 }
995}
996#[doc = "Field `FLASH_RST_N` writer - Flash controller reset control."]
997pub struct FLASH_RST_N_W<'a> {
998 w: &'a mut W,
999}
1000impl<'a> FLASH_RST_N_W<'a> {
1001 #[doc = r"Writes `variant` to the field"]
1002 #[inline(always)]
1003 pub fn variant(self, variant: FLASH_RST_N_A) -> &'a mut W {
1004 self.bit(variant.into())
1005 }
1006 #[doc = "Assert the flash controller reset."]
1007 #[inline(always)]
1008 pub fn flash_rst_n_0(self) -> &'a mut W {
1009 self.variant(FLASH_RST_N_A::FLASH_RST_N_0)
1010 }
1011 #[doc = "Clear the flash controller reset."]
1012 #[inline(always)]
1013 pub fn flash_rst_n_1(self) -> &'a mut W {
1014 self.variant(FLASH_RST_N_A::FLASH_RST_N_1)
1015 }
1016 #[doc = r"Sets the field bit"]
1017 #[inline(always)]
1018 pub fn set_bit(self) -> &'a mut W {
1019 self.bit(true)
1020 }
1021 #[doc = r"Clears the field bit"]
1022 #[inline(always)]
1023 pub fn clear_bit(self) -> &'a mut W {
1024 self.bit(false)
1025 }
1026 #[doc = r"Writes raw bits to the field"]
1027 #[inline(always)]
1028 pub fn bit(self, value: bool) -> &'a mut W {
1029 self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11);
1030 self.w
1031 }
1032}
1033#[doc = "Analog comparator reset control.\n\nValue on reset: 1"]
1034#[derive(Clone, Copy, Debug, PartialEq)]
1035pub enum ACMP_RST_N_A {
1036 #[doc = "0: Assert the analog comparator reset."]
1037 ACMP_RST_N_0 = 0,
1038 #[doc = "1: Clear the analog comparator controller reset."]
1039 ACMP_RST_N_1 = 1,
1040}
1041impl From<ACMP_RST_N_A> for bool {
1042 #[inline(always)]
1043 fn from(variant: ACMP_RST_N_A) -> Self {
1044 variant as u8 != 0
1045 }
1046}
1047#[doc = "Field `ACMP_RST_N` reader - Analog comparator reset control."]
1048pub struct ACMP_RST_N_R(crate::FieldReader<bool, ACMP_RST_N_A>);
1049impl ACMP_RST_N_R {
1050 pub(crate) fn new(bits: bool) -> Self {
1051 ACMP_RST_N_R(crate::FieldReader::new(bits))
1052 }
1053 #[doc = r"Get enumerated values variant"]
1054 #[inline(always)]
1055 pub fn variant(&self) -> ACMP_RST_N_A {
1056 match self.bits {
1057 false => ACMP_RST_N_A::ACMP_RST_N_0,
1058 true => ACMP_RST_N_A::ACMP_RST_N_1,
1059 }
1060 }
1061 #[doc = "Checks if the value of the field is `ACMP_RST_N_0`"]
1062 #[inline(always)]
1063 pub fn is_acmp_rst_n_0(&self) -> bool {
1064 **self == ACMP_RST_N_A::ACMP_RST_N_0
1065 }
1066 #[doc = "Checks if the value of the field is `ACMP_RST_N_1`"]
1067 #[inline(always)]
1068 pub fn is_acmp_rst_n_1(&self) -> bool {
1069 **self == ACMP_RST_N_A::ACMP_RST_N_1
1070 }
1071}
1072impl core::ops::Deref for ACMP_RST_N_R {
1073 type Target = crate::FieldReader<bool, ACMP_RST_N_A>;
1074 #[inline(always)]
1075 fn deref(&self) -> &Self::Target {
1076 &self.0
1077 }
1078}
1079#[doc = "Field `ACMP_RST_N` writer - Analog comparator reset control."]
1080pub struct ACMP_RST_N_W<'a> {
1081 w: &'a mut W,
1082}
1083impl<'a> ACMP_RST_N_W<'a> {
1084 #[doc = r"Writes `variant` to the field"]
1085 #[inline(always)]
1086 pub fn variant(self, variant: ACMP_RST_N_A) -> &'a mut W {
1087 self.bit(variant.into())
1088 }
1089 #[doc = "Assert the analog comparator reset."]
1090 #[inline(always)]
1091 pub fn acmp_rst_n_0(self) -> &'a mut W {
1092 self.variant(ACMP_RST_N_A::ACMP_RST_N_0)
1093 }
1094 #[doc = "Clear the analog comparator controller reset."]
1095 #[inline(always)]
1096 pub fn acmp_rst_n_1(self) -> &'a mut W {
1097 self.variant(ACMP_RST_N_A::ACMP_RST_N_1)
1098 }
1099 #[doc = r"Sets the field bit"]
1100 #[inline(always)]
1101 pub fn set_bit(self) -> &'a mut W {
1102 self.bit(true)
1103 }
1104 #[doc = r"Clears the field bit"]
1105 #[inline(always)]
1106 pub fn clear_bit(self) -> &'a mut W {
1107 self.bit(false)
1108 }
1109 #[doc = r"Writes raw bits to the field"]
1110 #[inline(always)]
1111 pub fn bit(self, value: bool) -> &'a mut W {
1112 self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12);
1113 self.w
1114 }
1115}
1116#[doc = "I2C1 reset control.\n\nValue on reset: 1"]
1117#[derive(Clone, Copy, Debug, PartialEq)]
1118pub enum I2C1_RST_N_A {
1119 #[doc = "0: Assert the I2C1 reset."]
1120 I2C1_RST_N_0 = 0,
1121 #[doc = "1: Clear the I2C1 reset."]
1122 I2C1_RST_N_1 = 1,
1123}
1124impl From<I2C1_RST_N_A> for bool {
1125 #[inline(always)]
1126 fn from(variant: I2C1_RST_N_A) -> Self {
1127 variant as u8 != 0
1128 }
1129}
1130#[doc = "Field `I2C1_RST_N` reader - I2C1 reset control."]
1131pub struct I2C1_RST_N_R(crate::FieldReader<bool, I2C1_RST_N_A>);
1132impl I2C1_RST_N_R {
1133 pub(crate) fn new(bits: bool) -> Self {
1134 I2C1_RST_N_R(crate::FieldReader::new(bits))
1135 }
1136 #[doc = r"Get enumerated values variant"]
1137 #[inline(always)]
1138 pub fn variant(&self) -> I2C1_RST_N_A {
1139 match self.bits {
1140 false => I2C1_RST_N_A::I2C1_RST_N_0,
1141 true => I2C1_RST_N_A::I2C1_RST_N_1,
1142 }
1143 }
1144 #[doc = "Checks if the value of the field is `I2C1_RST_N_0`"]
1145 #[inline(always)]
1146 pub fn is_i2c1_rst_n_0(&self) -> bool {
1147 **self == I2C1_RST_N_A::I2C1_RST_N_0
1148 }
1149 #[doc = "Checks if the value of the field is `I2C1_RST_N_1`"]
1150 #[inline(always)]
1151 pub fn is_i2c1_rst_n_1(&self) -> bool {
1152 **self == I2C1_RST_N_A::I2C1_RST_N_1
1153 }
1154}
1155impl core::ops::Deref for I2C1_RST_N_R {
1156 type Target = crate::FieldReader<bool, I2C1_RST_N_A>;
1157 #[inline(always)]
1158 fn deref(&self) -> &Self::Target {
1159 &self.0
1160 }
1161}
1162#[doc = "Field `I2C1_RST_N` writer - I2C1 reset control."]
1163pub struct I2C1_RST_N_W<'a> {
1164 w: &'a mut W,
1165}
1166impl<'a> I2C1_RST_N_W<'a> {
1167 #[doc = r"Writes `variant` to the field"]
1168 #[inline(always)]
1169 pub fn variant(self, variant: I2C1_RST_N_A) -> &'a mut W {
1170 self.bit(variant.into())
1171 }
1172 #[doc = "Assert the I2C1 reset."]
1173 #[inline(always)]
1174 pub fn i2c1_rst_n_0(self) -> &'a mut W {
1175 self.variant(I2C1_RST_N_A::I2C1_RST_N_0)
1176 }
1177 #[doc = "Clear the I2C1 reset."]
1178 #[inline(always)]
1179 pub fn i2c1_rst_n_1(self) -> &'a mut W {
1180 self.variant(I2C1_RST_N_A::I2C1_RST_N_1)
1181 }
1182 #[doc = r"Sets the field bit"]
1183 #[inline(always)]
1184 pub fn set_bit(self) -> &'a mut W {
1185 self.bit(true)
1186 }
1187 #[doc = r"Clears the field bit"]
1188 #[inline(always)]
1189 pub fn clear_bit(self) -> &'a mut W {
1190 self.bit(false)
1191 }
1192 #[doc = r"Writes raw bits to the field"]
1193 #[inline(always)]
1194 pub fn bit(self, value: bool) -> &'a mut W {
1195 self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14);
1196 self.w
1197 }
1198}
1199#[doc = "I2C2 reset control.\n\nValue on reset: 1"]
1200#[derive(Clone, Copy, Debug, PartialEq)]
1201pub enum I2C2_RST_N_A {
1202 #[doc = "0: Assert the I2C2 reset."]
1203 I2C2_RST_N_0 = 0,
1204 #[doc = "1: Clear the I2C2 reset."]
1205 I2C2_RST_N_1 = 1,
1206}
1207impl From<I2C2_RST_N_A> for bool {
1208 #[inline(always)]
1209 fn from(variant: I2C2_RST_N_A) -> Self {
1210 variant as u8 != 0
1211 }
1212}
1213#[doc = "Field `I2C2_RST_N` reader - I2C2 reset control."]
1214pub struct I2C2_RST_N_R(crate::FieldReader<bool, I2C2_RST_N_A>);
1215impl I2C2_RST_N_R {
1216 pub(crate) fn new(bits: bool) -> Self {
1217 I2C2_RST_N_R(crate::FieldReader::new(bits))
1218 }
1219 #[doc = r"Get enumerated values variant"]
1220 #[inline(always)]
1221 pub fn variant(&self) -> I2C2_RST_N_A {
1222 match self.bits {
1223 false => I2C2_RST_N_A::I2C2_RST_N_0,
1224 true => I2C2_RST_N_A::I2C2_RST_N_1,
1225 }
1226 }
1227 #[doc = "Checks if the value of the field is `I2C2_RST_N_0`"]
1228 #[inline(always)]
1229 pub fn is_i2c2_rst_n_0(&self) -> bool {
1230 **self == I2C2_RST_N_A::I2C2_RST_N_0
1231 }
1232 #[doc = "Checks if the value of the field is `I2C2_RST_N_1`"]
1233 #[inline(always)]
1234 pub fn is_i2c2_rst_n_1(&self) -> bool {
1235 **self == I2C2_RST_N_A::I2C2_RST_N_1
1236 }
1237}
1238impl core::ops::Deref for I2C2_RST_N_R {
1239 type Target = crate::FieldReader<bool, I2C2_RST_N_A>;
1240 #[inline(always)]
1241 fn deref(&self) -> &Self::Target {
1242 &self.0
1243 }
1244}
1245#[doc = "Field `I2C2_RST_N` writer - I2C2 reset control."]
1246pub struct I2C2_RST_N_W<'a> {
1247 w: &'a mut W,
1248}
1249impl<'a> I2C2_RST_N_W<'a> {
1250 #[doc = r"Writes `variant` to the field"]
1251 #[inline(always)]
1252 pub fn variant(self, variant: I2C2_RST_N_A) -> &'a mut W {
1253 self.bit(variant.into())
1254 }
1255 #[doc = "Assert the I2C2 reset."]
1256 #[inline(always)]
1257 pub fn i2c2_rst_n_0(self) -> &'a mut W {
1258 self.variant(I2C2_RST_N_A::I2C2_RST_N_0)
1259 }
1260 #[doc = "Clear the I2C2 reset."]
1261 #[inline(always)]
1262 pub fn i2c2_rst_n_1(self) -> &'a mut W {
1263 self.variant(I2C2_RST_N_A::I2C2_RST_N_1)
1264 }
1265 #[doc = r"Sets the field bit"]
1266 #[inline(always)]
1267 pub fn set_bit(self) -> &'a mut W {
1268 self.bit(true)
1269 }
1270 #[doc = r"Clears the field bit"]
1271 #[inline(always)]
1272 pub fn clear_bit(self) -> &'a mut W {
1273 self.bit(false)
1274 }
1275 #[doc = r"Writes raw bits to the field"]
1276 #[inline(always)]
1277 pub fn bit(self, value: bool) -> &'a mut W {
1278 self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15);
1279 self.w
1280 }
1281}
1282#[doc = "I2C3 reset control.\n\nValue on reset: 1"]
1283#[derive(Clone, Copy, Debug, PartialEq)]
1284pub enum I2C3_RST_N_A {
1285 #[doc = "0: Assert the I2C3 reset."]
1286 I2C3_RST_N_0 = 0,
1287 #[doc = "1: Clear the I2C3 reset."]
1288 I2C3_RST_N_1 = 1,
1289}
1290impl From<I2C3_RST_N_A> for bool {
1291 #[inline(always)]
1292 fn from(variant: I2C3_RST_N_A) -> Self {
1293 variant as u8 != 0
1294 }
1295}
1296#[doc = "Field `I2C3_RST_N` reader - I2C3 reset control."]
1297pub struct I2C3_RST_N_R(crate::FieldReader<bool, I2C3_RST_N_A>);
1298impl I2C3_RST_N_R {
1299 pub(crate) fn new(bits: bool) -> Self {
1300 I2C3_RST_N_R(crate::FieldReader::new(bits))
1301 }
1302 #[doc = r"Get enumerated values variant"]
1303 #[inline(always)]
1304 pub fn variant(&self) -> I2C3_RST_N_A {
1305 match self.bits {
1306 false => I2C3_RST_N_A::I2C3_RST_N_0,
1307 true => I2C3_RST_N_A::I2C3_RST_N_1,
1308 }
1309 }
1310 #[doc = "Checks if the value of the field is `I2C3_RST_N_0`"]
1311 #[inline(always)]
1312 pub fn is_i2c3_rst_n_0(&self) -> bool {
1313 **self == I2C3_RST_N_A::I2C3_RST_N_0
1314 }
1315 #[doc = "Checks if the value of the field is `I2C3_RST_N_1`"]
1316 #[inline(always)]
1317 pub fn is_i2c3_rst_n_1(&self) -> bool {
1318 **self == I2C3_RST_N_A::I2C3_RST_N_1
1319 }
1320}
1321impl core::ops::Deref for I2C3_RST_N_R {
1322 type Target = crate::FieldReader<bool, I2C3_RST_N_A>;
1323 #[inline(always)]
1324 fn deref(&self) -> &Self::Target {
1325 &self.0
1326 }
1327}
1328#[doc = "Field `I2C3_RST_N` writer - I2C3 reset control."]
1329pub struct I2C3_RST_N_W<'a> {
1330 w: &'a mut W,
1331}
1332impl<'a> I2C3_RST_N_W<'a> {
1333 #[doc = r"Writes `variant` to the field"]
1334 #[inline(always)]
1335 pub fn variant(self, variant: I2C3_RST_N_A) -> &'a mut W {
1336 self.bit(variant.into())
1337 }
1338 #[doc = "Assert the I2C3 reset."]
1339 #[inline(always)]
1340 pub fn i2c3_rst_n_0(self) -> &'a mut W {
1341 self.variant(I2C3_RST_N_A::I2C3_RST_N_0)
1342 }
1343 #[doc = "Clear the I2C3 reset."]
1344 #[inline(always)]
1345 pub fn i2c3_rst_n_1(self) -> &'a mut W {
1346 self.variant(I2C3_RST_N_A::I2C3_RST_N_1)
1347 }
1348 #[doc = r"Sets the field bit"]
1349 #[inline(always)]
1350 pub fn set_bit(self) -> &'a mut W {
1351 self.bit(true)
1352 }
1353 #[doc = r"Clears the field bit"]
1354 #[inline(always)]
1355 pub fn clear_bit(self) -> &'a mut W {
1356 self.bit(false)
1357 }
1358 #[doc = r"Writes raw bits to the field"]
1359 #[inline(always)]
1360 pub fn bit(self, value: bool) -> &'a mut W {
1361 self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16);
1362 self.w
1363 }
1364}
1365#[doc = "ADC reset control.\n\nValue on reset: 1"]
1366#[derive(Clone, Copy, Debug, PartialEq)]
1367pub enum ADC_RST_N_A {
1368 #[doc = "0: Assert the ADC reset."]
1369 ADC_RST_N_0 = 0,
1370 #[doc = "1: Clear the ADC reset."]
1371 ADC_RST_N_1 = 1,
1372}
1373impl From<ADC_RST_N_A> for bool {
1374 #[inline(always)]
1375 fn from(variant: ADC_RST_N_A) -> Self {
1376 variant as u8 != 0
1377 }
1378}
1379#[doc = "Field `ADC_RST_N` reader - ADC reset control."]
1380pub struct ADC_RST_N_R(crate::FieldReader<bool, ADC_RST_N_A>);
1381impl ADC_RST_N_R {
1382 pub(crate) fn new(bits: bool) -> Self {
1383 ADC_RST_N_R(crate::FieldReader::new(bits))
1384 }
1385 #[doc = r"Get enumerated values variant"]
1386 #[inline(always)]
1387 pub fn variant(&self) -> ADC_RST_N_A {
1388 match self.bits {
1389 false => ADC_RST_N_A::ADC_RST_N_0,
1390 true => ADC_RST_N_A::ADC_RST_N_1,
1391 }
1392 }
1393 #[doc = "Checks if the value of the field is `ADC_RST_N_0`"]
1394 #[inline(always)]
1395 pub fn is_adc_rst_n_0(&self) -> bool {
1396 **self == ADC_RST_N_A::ADC_RST_N_0
1397 }
1398 #[doc = "Checks if the value of the field is `ADC_RST_N_1`"]
1399 #[inline(always)]
1400 pub fn is_adc_rst_n_1(&self) -> bool {
1401 **self == ADC_RST_N_A::ADC_RST_N_1
1402 }
1403}
1404impl core::ops::Deref for ADC_RST_N_R {
1405 type Target = crate::FieldReader<bool, ADC_RST_N_A>;
1406 #[inline(always)]
1407 fn deref(&self) -> &Self::Target {
1408 &self.0
1409 }
1410}
1411#[doc = "Field `ADC_RST_N` writer - ADC reset control."]
1412pub struct ADC_RST_N_W<'a> {
1413 w: &'a mut W,
1414}
1415impl<'a> ADC_RST_N_W<'a> {
1416 #[doc = r"Writes `variant` to the field"]
1417 #[inline(always)]
1418 pub fn variant(self, variant: ADC_RST_N_A) -> &'a mut W {
1419 self.bit(variant.into())
1420 }
1421 #[doc = "Assert the ADC reset."]
1422 #[inline(always)]
1423 pub fn adc_rst_n_0(self) -> &'a mut W {
1424 self.variant(ADC_RST_N_A::ADC_RST_N_0)
1425 }
1426 #[doc = "Clear the ADC reset."]
1427 #[inline(always)]
1428 pub fn adc_rst_n_1(self) -> &'a mut W {
1429 self.variant(ADC_RST_N_A::ADC_RST_N_1)
1430 }
1431 #[doc = r"Sets the field bit"]
1432 #[inline(always)]
1433 pub fn set_bit(self) -> &'a mut W {
1434 self.bit(true)
1435 }
1436 #[doc = r"Clears the field bit"]
1437 #[inline(always)]
1438 pub fn clear_bit(self) -> &'a mut W {
1439 self.bit(false)
1440 }
1441 #[doc = r"Writes raw bits to the field"]
1442 #[inline(always)]
1443 pub fn bit(self, value: bool) -> &'a mut W {
1444 self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24);
1445 self.w
1446 }
1447}
1448#[doc = "DMA reset control.\n\nValue on reset: 1"]
1449#[derive(Clone, Copy, Debug, PartialEq)]
1450pub enum DMA_RST_N_A {
1451 #[doc = "0: Assert the DMA reset."]
1452 DMA_RST_N_0 = 0,
1453 #[doc = "1: Clear the DMA reset."]
1454 DMA_RST_N_1 = 1,
1455}
1456impl From<DMA_RST_N_A> for bool {
1457 #[inline(always)]
1458 fn from(variant: DMA_RST_N_A) -> Self {
1459 variant as u8 != 0
1460 }
1461}
1462#[doc = "Field `DMA_RST_N` reader - DMA reset control."]
1463pub struct DMA_RST_N_R(crate::FieldReader<bool, DMA_RST_N_A>);
1464impl DMA_RST_N_R {
1465 pub(crate) fn new(bits: bool) -> Self {
1466 DMA_RST_N_R(crate::FieldReader::new(bits))
1467 }
1468 #[doc = r"Get enumerated values variant"]
1469 #[inline(always)]
1470 pub fn variant(&self) -> DMA_RST_N_A {
1471 match self.bits {
1472 false => DMA_RST_N_A::DMA_RST_N_0,
1473 true => DMA_RST_N_A::DMA_RST_N_1,
1474 }
1475 }
1476 #[doc = "Checks if the value of the field is `DMA_RST_N_0`"]
1477 #[inline(always)]
1478 pub fn is_dma_rst_n_0(&self) -> bool {
1479 **self == DMA_RST_N_A::DMA_RST_N_0
1480 }
1481 #[doc = "Checks if the value of the field is `DMA_RST_N_1`"]
1482 #[inline(always)]
1483 pub fn is_dma_rst_n_1(&self) -> bool {
1484 **self == DMA_RST_N_A::DMA_RST_N_1
1485 }
1486}
1487impl core::ops::Deref for DMA_RST_N_R {
1488 type Target = crate::FieldReader<bool, DMA_RST_N_A>;
1489 #[inline(always)]
1490 fn deref(&self) -> &Self::Target {
1491 &self.0
1492 }
1493}
1494#[doc = "Field `DMA_RST_N` writer - DMA reset control."]
1495pub struct DMA_RST_N_W<'a> {
1496 w: &'a mut W,
1497}
1498impl<'a> DMA_RST_N_W<'a> {
1499 #[doc = r"Writes `variant` to the field"]
1500 #[inline(always)]
1501 pub fn variant(self, variant: DMA_RST_N_A) -> &'a mut W {
1502 self.bit(variant.into())
1503 }
1504 #[doc = "Assert the DMA reset."]
1505 #[inline(always)]
1506 pub fn dma_rst_n_0(self) -> &'a mut W {
1507 self.variant(DMA_RST_N_A::DMA_RST_N_0)
1508 }
1509 #[doc = "Clear the DMA reset."]
1510 #[inline(always)]
1511 pub fn dma_rst_n_1(self) -> &'a mut W {
1512 self.variant(DMA_RST_N_A::DMA_RST_N_1)
1513 }
1514 #[doc = r"Sets the field bit"]
1515 #[inline(always)]
1516 pub fn set_bit(self) -> &'a mut W {
1517 self.bit(true)
1518 }
1519 #[doc = r"Clears the field bit"]
1520 #[inline(always)]
1521 pub fn clear_bit(self) -> &'a mut W {
1522 self.bit(false)
1523 }
1524 #[doc = r"Writes raw bits to the field"]
1525 #[inline(always)]
1526 pub fn bit(self, value: bool) -> &'a mut W {
1527 self.w.bits = (self.w.bits & !(0x01 << 29)) | ((value as u32 & 0x01) << 29);
1528 self.w
1529 }
1530}
1531impl R {
1532 #[doc = "Bit 0 - SPI0 reset control."]
1533 #[inline(always)]
1534 pub fn spi0_rst_n(&self) -> SPI0_RST_N_R {
1535 SPI0_RST_N_R::new((self.bits & 0x01) != 0)
1536 }
1537 #[doc = "Bit 1 - SPI1 reset control."]
1538 #[inline(always)]
1539 pub fn spi1_rst_n(&self) -> SPI1_RST_N_R {
1540 SPI1_RST_N_R::new(((self.bits >> 1) & 0x01) != 0)
1541 }
1542 #[doc = "Bit 2 - USART fractional baud rate generator(UARTFRG) reset control."]
1543 #[inline(always)]
1544 pub fn uartfrg_rst_n(&self) -> UARTFRG_RST_N_R {
1545 UARTFRG_RST_N_R::new(((self.bits >> 2) & 0x01) != 0)
1546 }
1547 #[doc = "Bit 3 - USART0 reset control."]
1548 #[inline(always)]
1549 pub fn uart0_rst_n(&self) -> UART0_RST_N_R {
1550 UART0_RST_N_R::new(((self.bits >> 3) & 0x01) != 0)
1551 }
1552 #[doc = "Bit 4 - USART1 reset control."]
1553 #[inline(always)]
1554 pub fn uart1_rst_n(&self) -> UART1_RST_N_R {
1555 UART1_RST_N_R::new(((self.bits >> 4) & 0x01) != 0)
1556 }
1557 #[doc = "Bit 5 - USART2 reset control."]
1558 #[inline(always)]
1559 pub fn uart2_rst_n(&self) -> UART2_RST_N_R {
1560 UART2_RST_N_R::new(((self.bits >> 5) & 0x01) != 0)
1561 }
1562 #[doc = "Bit 6 - I2C0 reset control."]
1563 #[inline(always)]
1564 pub fn i2c0_rst_n(&self) -> I2C0_RST_N_R {
1565 I2C0_RST_N_R::new(((self.bits >> 6) & 0x01) != 0)
1566 }
1567 #[doc = "Bit 7 - Multi-rate timer (MRT) reset control."]
1568 #[inline(always)]
1569 pub fn mrt_rst_n(&self) -> MRT_RST_N_R {
1570 MRT_RST_N_R::new(((self.bits >> 7) & 0x01) != 0)
1571 }
1572 #[doc = "Bit 8 - SCT reset control."]
1573 #[inline(always)]
1574 pub fn sct_rst_n(&self) -> SCT_RST_N_R {
1575 SCT_RST_N_R::new(((self.bits >> 8) & 0x01) != 0)
1576 }
1577 #[doc = "Bit 9 - Self-wake-up timer (WKT) reset control."]
1578 #[inline(always)]
1579 pub fn wkt_rst_n(&self) -> WKT_RST_N_R {
1580 WKT_RST_N_R::new(((self.bits >> 9) & 0x01) != 0)
1581 }
1582 #[doc = "Bit 10 - GPIO and GPIO pin interrupt reset control."]
1583 #[inline(always)]
1584 pub fn gpio_rst_n(&self) -> GPIO_RST_N_R {
1585 GPIO_RST_N_R::new(((self.bits >> 10) & 0x01) != 0)
1586 }
1587 #[doc = "Bit 11 - Flash controller reset control."]
1588 #[inline(always)]
1589 pub fn flash_rst_n(&self) -> FLASH_RST_N_R {
1590 FLASH_RST_N_R::new(((self.bits >> 11) & 0x01) != 0)
1591 }
1592 #[doc = "Bit 12 - Analog comparator reset control."]
1593 #[inline(always)]
1594 pub fn acmp_rst_n(&self) -> ACMP_RST_N_R {
1595 ACMP_RST_N_R::new(((self.bits >> 12) & 0x01) != 0)
1596 }
1597 #[doc = "Bit 14 - I2C1 reset control."]
1598 #[inline(always)]
1599 pub fn i2c1_rst_n(&self) -> I2C1_RST_N_R {
1600 I2C1_RST_N_R::new(((self.bits >> 14) & 0x01) != 0)
1601 }
1602 #[doc = "Bit 15 - I2C2 reset control."]
1603 #[inline(always)]
1604 pub fn i2c2_rst_n(&self) -> I2C2_RST_N_R {
1605 I2C2_RST_N_R::new(((self.bits >> 15) & 0x01) != 0)
1606 }
1607 #[doc = "Bit 16 - I2C3 reset control."]
1608 #[inline(always)]
1609 pub fn i2c3_rst_n(&self) -> I2C3_RST_N_R {
1610 I2C3_RST_N_R::new(((self.bits >> 16) & 0x01) != 0)
1611 }
1612 #[doc = "Bit 24 - ADC reset control."]
1613 #[inline(always)]
1614 pub fn adc_rst_n(&self) -> ADC_RST_N_R {
1615 ADC_RST_N_R::new(((self.bits >> 24) & 0x01) != 0)
1616 }
1617 #[doc = "Bit 29 - DMA reset control."]
1618 #[inline(always)]
1619 pub fn dma_rst_n(&self) -> DMA_RST_N_R {
1620 DMA_RST_N_R::new(((self.bits >> 29) & 0x01) != 0)
1621 }
1622}
1623impl W {
1624 #[doc = "Bit 0 - SPI0 reset control."]
1625 #[inline(always)]
1626 pub fn spi0_rst_n(&mut self) -> SPI0_RST_N_W {
1627 SPI0_RST_N_W { w: self }
1628 }
1629 #[doc = "Bit 1 - SPI1 reset control."]
1630 #[inline(always)]
1631 pub fn spi1_rst_n(&mut self) -> SPI1_RST_N_W {
1632 SPI1_RST_N_W { w: self }
1633 }
1634 #[doc = "Bit 2 - USART fractional baud rate generator(UARTFRG) reset control."]
1635 #[inline(always)]
1636 pub fn uartfrg_rst_n(&mut self) -> UARTFRG_RST_N_W {
1637 UARTFRG_RST_N_W { w: self }
1638 }
1639 #[doc = "Bit 3 - USART0 reset control."]
1640 #[inline(always)]
1641 pub fn uart0_rst_n(&mut self) -> UART0_RST_N_W {
1642 UART0_RST_N_W { w: self }
1643 }
1644 #[doc = "Bit 4 - USART1 reset control."]
1645 #[inline(always)]
1646 pub fn uart1_rst_n(&mut self) -> UART1_RST_N_W {
1647 UART1_RST_N_W { w: self }
1648 }
1649 #[doc = "Bit 5 - USART2 reset control."]
1650 #[inline(always)]
1651 pub fn uart2_rst_n(&mut self) -> UART2_RST_N_W {
1652 UART2_RST_N_W { w: self }
1653 }
1654 #[doc = "Bit 6 - I2C0 reset control."]
1655 #[inline(always)]
1656 pub fn i2c0_rst_n(&mut self) -> I2C0_RST_N_W {
1657 I2C0_RST_N_W { w: self }
1658 }
1659 #[doc = "Bit 7 - Multi-rate timer (MRT) reset control."]
1660 #[inline(always)]
1661 pub fn mrt_rst_n(&mut self) -> MRT_RST_N_W {
1662 MRT_RST_N_W { w: self }
1663 }
1664 #[doc = "Bit 8 - SCT reset control."]
1665 #[inline(always)]
1666 pub fn sct_rst_n(&mut self) -> SCT_RST_N_W {
1667 SCT_RST_N_W { w: self }
1668 }
1669 #[doc = "Bit 9 - Self-wake-up timer (WKT) reset control."]
1670 #[inline(always)]
1671 pub fn wkt_rst_n(&mut self) -> WKT_RST_N_W {
1672 WKT_RST_N_W { w: self }
1673 }
1674 #[doc = "Bit 10 - GPIO and GPIO pin interrupt reset control."]
1675 #[inline(always)]
1676 pub fn gpio_rst_n(&mut self) -> GPIO_RST_N_W {
1677 GPIO_RST_N_W { w: self }
1678 }
1679 #[doc = "Bit 11 - Flash controller reset control."]
1680 #[inline(always)]
1681 pub fn flash_rst_n(&mut self) -> FLASH_RST_N_W {
1682 FLASH_RST_N_W { w: self }
1683 }
1684 #[doc = "Bit 12 - Analog comparator reset control."]
1685 #[inline(always)]
1686 pub fn acmp_rst_n(&mut self) -> ACMP_RST_N_W {
1687 ACMP_RST_N_W { w: self }
1688 }
1689 #[doc = "Bit 14 - I2C1 reset control."]
1690 #[inline(always)]
1691 pub fn i2c1_rst_n(&mut self) -> I2C1_RST_N_W {
1692 I2C1_RST_N_W { w: self }
1693 }
1694 #[doc = "Bit 15 - I2C2 reset control."]
1695 #[inline(always)]
1696 pub fn i2c2_rst_n(&mut self) -> I2C2_RST_N_W {
1697 I2C2_RST_N_W { w: self }
1698 }
1699 #[doc = "Bit 16 - I2C3 reset control."]
1700 #[inline(always)]
1701 pub fn i2c3_rst_n(&mut self) -> I2C3_RST_N_W {
1702 I2C3_RST_N_W { w: self }
1703 }
1704 #[doc = "Bit 24 - ADC reset control."]
1705 #[inline(always)]
1706 pub fn adc_rst_n(&mut self) -> ADC_RST_N_W {
1707 ADC_RST_N_W { w: self }
1708 }
1709 #[doc = "Bit 29 - DMA reset control."]
1710 #[inline(always)]
1711 pub fn dma_rst_n(&mut self) -> DMA_RST_N_W {
1712 DMA_RST_N_W { w: self }
1713 }
1714 #[doc = "Writes raw bits to the register."]
1715 #[inline(always)]
1716 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1717 self.0.bits(bits);
1718 self
1719 }
1720}
1721#[doc = "Peripheral reset control 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 [presetctrl](index.html) module"]
1722pub struct PRESETCTRL_SPEC;
1723impl crate::RegisterSpec for PRESETCTRL_SPEC {
1724 type Ux = u32;
1725}
1726#[doc = "`read()` method returns [presetctrl::R](R) reader structure"]
1727impl crate::Readable for PRESETCTRL_SPEC {
1728 type Reader = R;
1729}
1730#[doc = "`write(|w| ..)` method takes [presetctrl::W](W) writer structure"]
1731impl crate::Writable for PRESETCTRL_SPEC {
1732 type Writer = W;
1733}
1734#[doc = "`reset()` method sets PRESETCTRL to value 0x2101_dfff"]
1735impl crate::Resettable for PRESETCTRL_SPEC {
1736 #[inline(always)]
1737 fn reset_value() -> Self::Ux {
1738 0x2101_dfff
1739 }
1740}