stm32wb_pac/usart1/
cr3.rs1#[doc = "Reader of register CR3"]
2pub type R = crate::R<u32, super::CR3>;
3#[doc = "Writer for register CR3"]
4pub type W = crate::W<u32, super::CR3>;
5#[doc = "Register CR3 `reset()`'s with value 0"]
6impl crate::ResetValue for super::CR3 {
7 type Type = u32;
8 #[inline(always)]
9 fn reset_value() -> Self::Type {
10 0
11 }
12}
13#[doc = "Reader of field `TXFTCFG`"]
14pub type TXFTCFG_R = crate::R<u8, u8>;
15#[doc = "Write proxy for field `TXFTCFG`"]
16pub struct TXFTCFG_W<'a> {
17 w: &'a mut W,
18}
19impl<'a> TXFTCFG_W<'a> {
20 #[doc = r"Writes raw bits to the field"]
21 #[inline(always)]
22 pub unsafe fn bits(self, value: u8) -> &'a mut W {
23 self.w.bits = (self.w.bits & !(0x07 << 29)) | (((value as u32) & 0x07) << 29);
24 self.w
25 }
26}
27#[doc = "Reader of field `RXFTIE`"]
28pub type RXFTIE_R = crate::R<bool, bool>;
29#[doc = "Write proxy for field `RXFTIE`"]
30pub struct RXFTIE_W<'a> {
31 w: &'a mut W,
32}
33impl<'a> RXFTIE_W<'a> {
34 #[doc = r"Sets the field bit"]
35 #[inline(always)]
36 pub fn set_bit(self) -> &'a mut W {
37 self.bit(true)
38 }
39 #[doc = r"Clears the field bit"]
40 #[inline(always)]
41 pub fn clear_bit(self) -> &'a mut W {
42 self.bit(false)
43 }
44 #[doc = r"Writes raw bits to the field"]
45 #[inline(always)]
46 pub fn bit(self, value: bool) -> &'a mut W {
47 self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28);
48 self.w
49 }
50}
51#[doc = "Reader of field `RXFTCFG`"]
52pub type RXFTCFG_R = crate::R<u8, u8>;
53#[doc = "Write proxy for field `RXFTCFG`"]
54pub struct RXFTCFG_W<'a> {
55 w: &'a mut W,
56}
57impl<'a> RXFTCFG_W<'a> {
58 #[doc = r"Writes raw bits to the field"]
59 #[inline(always)]
60 pub unsafe fn bits(self, value: u8) -> &'a mut W {
61 self.w.bits = (self.w.bits & !(0x07 << 25)) | (((value as u32) & 0x07) << 25);
62 self.w
63 }
64}
65#[doc = "Reader of field `TCBGTIE`"]
66pub type TCBGTIE_R = crate::R<bool, bool>;
67#[doc = "Write proxy for field `TCBGTIE`"]
68pub struct TCBGTIE_W<'a> {
69 w: &'a mut W,
70}
71impl<'a> TCBGTIE_W<'a> {
72 #[doc = r"Sets the field bit"]
73 #[inline(always)]
74 pub fn set_bit(self) -> &'a mut W {
75 self.bit(true)
76 }
77 #[doc = r"Clears the field bit"]
78 #[inline(always)]
79 pub fn clear_bit(self) -> &'a mut W {
80 self.bit(false)
81 }
82 #[doc = r"Writes raw bits to the field"]
83 #[inline(always)]
84 pub fn bit(self, value: bool) -> &'a mut W {
85 self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24);
86 self.w
87 }
88}
89#[doc = "Reader of field `TXFTIE`"]
90pub type TXFTIE_R = crate::R<bool, bool>;
91#[doc = "Write proxy for field `TXFTIE`"]
92pub struct TXFTIE_W<'a> {
93 w: &'a mut W,
94}
95impl<'a> TXFTIE_W<'a> {
96 #[doc = r"Sets the field bit"]
97 #[inline(always)]
98 pub fn set_bit(self) -> &'a mut W {
99 self.bit(true)
100 }
101 #[doc = r"Clears the field bit"]
102 #[inline(always)]
103 pub fn clear_bit(self) -> &'a mut W {
104 self.bit(false)
105 }
106 #[doc = r"Writes raw bits to the field"]
107 #[inline(always)]
108 pub fn bit(self, value: bool) -> &'a mut W {
109 self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23);
110 self.w
111 }
112}
113#[doc = "Reader of field `WUFIE`"]
114pub type WUFIE_R = crate::R<bool, bool>;
115#[doc = "Write proxy for field `WUFIE`"]
116pub struct WUFIE_W<'a> {
117 w: &'a mut W,
118}
119impl<'a> WUFIE_W<'a> {
120 #[doc = r"Sets the field bit"]
121 #[inline(always)]
122 pub fn set_bit(self) -> &'a mut W {
123 self.bit(true)
124 }
125 #[doc = r"Clears the field bit"]
126 #[inline(always)]
127 pub fn clear_bit(self) -> &'a mut W {
128 self.bit(false)
129 }
130 #[doc = r"Writes raw bits to the field"]
131 #[inline(always)]
132 pub fn bit(self, value: bool) -> &'a mut W {
133 self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22);
134 self.w
135 }
136}
137#[doc = "Reader of field `WUS`"]
138pub type WUS_R = crate::R<u8, u8>;
139#[doc = "Write proxy for field `WUS`"]
140pub struct WUS_W<'a> {
141 w: &'a mut W,
142}
143impl<'a> WUS_W<'a> {
144 #[doc = r"Writes raw bits to the field"]
145 #[inline(always)]
146 pub unsafe fn bits(self, value: u8) -> &'a mut W {
147 self.w.bits = (self.w.bits & !(0x03 << 20)) | (((value as u32) & 0x03) << 20);
148 self.w
149 }
150}
151#[doc = "Reader of field `SCARCNT`"]
152pub type SCARCNT_R = crate::R<u8, u8>;
153#[doc = "Write proxy for field `SCARCNT`"]
154pub struct SCARCNT_W<'a> {
155 w: &'a mut W,
156}
157impl<'a> SCARCNT_W<'a> {
158 #[doc = r"Writes raw bits to the field"]
159 #[inline(always)]
160 pub unsafe fn bits(self, value: u8) -> &'a mut W {
161 self.w.bits = (self.w.bits & !(0x07 << 17)) | (((value as u32) & 0x07) << 17);
162 self.w
163 }
164}
165#[doc = "Reader of field `DEP`"]
166pub type DEP_R = crate::R<bool, bool>;
167#[doc = "Write proxy for field `DEP`"]
168pub struct DEP_W<'a> {
169 w: &'a mut W,
170}
171impl<'a> DEP_W<'a> {
172 #[doc = r"Sets the field bit"]
173 #[inline(always)]
174 pub fn set_bit(self) -> &'a mut W {
175 self.bit(true)
176 }
177 #[doc = r"Clears the field bit"]
178 #[inline(always)]
179 pub fn clear_bit(self) -> &'a mut W {
180 self.bit(false)
181 }
182 #[doc = r"Writes raw bits to the field"]
183 #[inline(always)]
184 pub fn bit(self, value: bool) -> &'a mut W {
185 self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15);
186 self.w
187 }
188}
189#[doc = "Reader of field `DEM`"]
190pub type DEM_R = crate::R<bool, bool>;
191#[doc = "Write proxy for field `DEM`"]
192pub struct DEM_W<'a> {
193 w: &'a mut W,
194}
195impl<'a> DEM_W<'a> {
196 #[doc = r"Sets the field bit"]
197 #[inline(always)]
198 pub fn set_bit(self) -> &'a mut W {
199 self.bit(true)
200 }
201 #[doc = r"Clears the field bit"]
202 #[inline(always)]
203 pub fn clear_bit(self) -> &'a mut W {
204 self.bit(false)
205 }
206 #[doc = r"Writes raw bits to the field"]
207 #[inline(always)]
208 pub fn bit(self, value: bool) -> &'a mut W {
209 self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14);
210 self.w
211 }
212}
213#[doc = "Reader of field `DDRE`"]
214pub type DDRE_R = crate::R<bool, bool>;
215#[doc = "Write proxy for field `DDRE`"]
216pub struct DDRE_W<'a> {
217 w: &'a mut W,
218}
219impl<'a> DDRE_W<'a> {
220 #[doc = r"Sets the field bit"]
221 #[inline(always)]
222 pub fn set_bit(self) -> &'a mut W {
223 self.bit(true)
224 }
225 #[doc = r"Clears the field bit"]
226 #[inline(always)]
227 pub fn clear_bit(self) -> &'a mut W {
228 self.bit(false)
229 }
230 #[doc = r"Writes raw bits to the field"]
231 #[inline(always)]
232 pub fn bit(self, value: bool) -> &'a mut W {
233 self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13);
234 self.w
235 }
236}
237#[doc = "Reader of field `OVRDIS`"]
238pub type OVRDIS_R = crate::R<bool, bool>;
239#[doc = "Write proxy for field `OVRDIS`"]
240pub struct OVRDIS_W<'a> {
241 w: &'a mut W,
242}
243impl<'a> OVRDIS_W<'a> {
244 #[doc = r"Sets the field bit"]
245 #[inline(always)]
246 pub fn set_bit(self) -> &'a mut W {
247 self.bit(true)
248 }
249 #[doc = r"Clears the field bit"]
250 #[inline(always)]
251 pub fn clear_bit(self) -> &'a mut W {
252 self.bit(false)
253 }
254 #[doc = r"Writes raw bits to the field"]
255 #[inline(always)]
256 pub fn bit(self, value: bool) -> &'a mut W {
257 self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12);
258 self.w
259 }
260}
261#[doc = "Reader of field `ONEBIT`"]
262pub type ONEBIT_R = crate::R<bool, bool>;
263#[doc = "Write proxy for field `ONEBIT`"]
264pub struct ONEBIT_W<'a> {
265 w: &'a mut W,
266}
267impl<'a> ONEBIT_W<'a> {
268 #[doc = r"Sets the field bit"]
269 #[inline(always)]
270 pub fn set_bit(self) -> &'a mut W {
271 self.bit(true)
272 }
273 #[doc = r"Clears the field bit"]
274 #[inline(always)]
275 pub fn clear_bit(self) -> &'a mut W {
276 self.bit(false)
277 }
278 #[doc = r"Writes raw bits to the field"]
279 #[inline(always)]
280 pub fn bit(self, value: bool) -> &'a mut W {
281 self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11);
282 self.w
283 }
284}
285#[doc = "Reader of field `CTSIE`"]
286pub type CTSIE_R = crate::R<bool, bool>;
287#[doc = "Write proxy for field `CTSIE`"]
288pub struct CTSIE_W<'a> {
289 w: &'a mut W,
290}
291impl<'a> CTSIE_W<'a> {
292 #[doc = r"Sets the field bit"]
293 #[inline(always)]
294 pub fn set_bit(self) -> &'a mut W {
295 self.bit(true)
296 }
297 #[doc = r"Clears the field bit"]
298 #[inline(always)]
299 pub fn clear_bit(self) -> &'a mut W {
300 self.bit(false)
301 }
302 #[doc = r"Writes raw bits to the field"]
303 #[inline(always)]
304 pub fn bit(self, value: bool) -> &'a mut W {
305 self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10);
306 self.w
307 }
308}
309#[doc = "Reader of field `CTSE`"]
310pub type CTSE_R = crate::R<bool, bool>;
311#[doc = "Write proxy for field `CTSE`"]
312pub struct CTSE_W<'a> {
313 w: &'a mut W,
314}
315impl<'a> CTSE_W<'a> {
316 #[doc = r"Sets the field bit"]
317 #[inline(always)]
318 pub fn set_bit(self) -> &'a mut W {
319 self.bit(true)
320 }
321 #[doc = r"Clears the field bit"]
322 #[inline(always)]
323 pub fn clear_bit(self) -> &'a mut W {
324 self.bit(false)
325 }
326 #[doc = r"Writes raw bits to the field"]
327 #[inline(always)]
328 pub fn bit(self, value: bool) -> &'a mut W {
329 self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9);
330 self.w
331 }
332}
333#[doc = "Reader of field `RTSE`"]
334pub type RTSE_R = crate::R<bool, bool>;
335#[doc = "Write proxy for field `RTSE`"]
336pub struct RTSE_W<'a> {
337 w: &'a mut W,
338}
339impl<'a> RTSE_W<'a> {
340 #[doc = r"Sets the field bit"]
341 #[inline(always)]
342 pub fn set_bit(self) -> &'a mut W {
343 self.bit(true)
344 }
345 #[doc = r"Clears the field bit"]
346 #[inline(always)]
347 pub fn clear_bit(self) -> &'a mut W {
348 self.bit(false)
349 }
350 #[doc = r"Writes raw bits to the field"]
351 #[inline(always)]
352 pub fn bit(self, value: bool) -> &'a mut W {
353 self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8);
354 self.w
355 }
356}
357#[doc = "Reader of field `DMAT`"]
358pub type DMAT_R = crate::R<bool, bool>;
359#[doc = "Write proxy for field `DMAT`"]
360pub struct DMAT_W<'a> {
361 w: &'a mut W,
362}
363impl<'a> DMAT_W<'a> {
364 #[doc = r"Sets the field bit"]
365 #[inline(always)]
366 pub fn set_bit(self) -> &'a mut W {
367 self.bit(true)
368 }
369 #[doc = r"Clears the field bit"]
370 #[inline(always)]
371 pub fn clear_bit(self) -> &'a mut W {
372 self.bit(false)
373 }
374 #[doc = r"Writes raw bits to the field"]
375 #[inline(always)]
376 pub fn bit(self, value: bool) -> &'a mut W {
377 self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
378 self.w
379 }
380}
381#[doc = "Reader of field `DMAR`"]
382pub type DMAR_R = crate::R<bool, bool>;
383#[doc = "Write proxy for field `DMAR`"]
384pub struct DMAR_W<'a> {
385 w: &'a mut W,
386}
387impl<'a> DMAR_W<'a> {
388 #[doc = r"Sets the field bit"]
389 #[inline(always)]
390 pub fn set_bit(self) -> &'a mut W {
391 self.bit(true)
392 }
393 #[doc = r"Clears the field bit"]
394 #[inline(always)]
395 pub fn clear_bit(self) -> &'a mut W {
396 self.bit(false)
397 }
398 #[doc = r"Writes raw bits to the field"]
399 #[inline(always)]
400 pub fn bit(self, value: bool) -> &'a mut W {
401 self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
402 self.w
403 }
404}
405#[doc = "Reader of field `SCEN`"]
406pub type SCEN_R = crate::R<bool, bool>;
407#[doc = "Write proxy for field `SCEN`"]
408pub struct SCEN_W<'a> {
409 w: &'a mut W,
410}
411impl<'a> SCEN_W<'a> {
412 #[doc = r"Sets the field bit"]
413 #[inline(always)]
414 pub fn set_bit(self) -> &'a mut W {
415 self.bit(true)
416 }
417 #[doc = r"Clears the field bit"]
418 #[inline(always)]
419 pub fn clear_bit(self) -> &'a mut W {
420 self.bit(false)
421 }
422 #[doc = r"Writes raw bits to the field"]
423 #[inline(always)]
424 pub fn bit(self, value: bool) -> &'a mut W {
425 self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
426 self.w
427 }
428}
429#[doc = "Reader of field `NACK`"]
430pub type NACK_R = crate::R<bool, bool>;
431#[doc = "Write proxy for field `NACK`"]
432pub struct NACK_W<'a> {
433 w: &'a mut W,
434}
435impl<'a> NACK_W<'a> {
436 #[doc = r"Sets the field bit"]
437 #[inline(always)]
438 pub fn set_bit(self) -> &'a mut W {
439 self.bit(true)
440 }
441 #[doc = r"Clears the field bit"]
442 #[inline(always)]
443 pub fn clear_bit(self) -> &'a mut W {
444 self.bit(false)
445 }
446 #[doc = r"Writes raw bits to the field"]
447 #[inline(always)]
448 pub fn bit(self, value: bool) -> &'a mut W {
449 self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
450 self.w
451 }
452}
453#[doc = "Reader of field `HDSEL`"]
454pub type HDSEL_R = crate::R<bool, bool>;
455#[doc = "Write proxy for field `HDSEL`"]
456pub struct HDSEL_W<'a> {
457 w: &'a mut W,
458}
459impl<'a> HDSEL_W<'a> {
460 #[doc = r"Sets the field bit"]
461 #[inline(always)]
462 pub fn set_bit(self) -> &'a mut W {
463 self.bit(true)
464 }
465 #[doc = r"Clears the field bit"]
466 #[inline(always)]
467 pub fn clear_bit(self) -> &'a mut W {
468 self.bit(false)
469 }
470 #[doc = r"Writes raw bits to the field"]
471 #[inline(always)]
472 pub fn bit(self, value: bool) -> &'a mut W {
473 self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
474 self.w
475 }
476}
477#[doc = "Reader of field `IRLP`"]
478pub type IRLP_R = crate::R<bool, bool>;
479#[doc = "Write proxy for field `IRLP`"]
480pub struct IRLP_W<'a> {
481 w: &'a mut W,
482}
483impl<'a> IRLP_W<'a> {
484 #[doc = r"Sets the field bit"]
485 #[inline(always)]
486 pub fn set_bit(self) -> &'a mut W {
487 self.bit(true)
488 }
489 #[doc = r"Clears the field bit"]
490 #[inline(always)]
491 pub fn clear_bit(self) -> &'a mut W {
492 self.bit(false)
493 }
494 #[doc = r"Writes raw bits to the field"]
495 #[inline(always)]
496 pub fn bit(self, value: bool) -> &'a mut W {
497 self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
498 self.w
499 }
500}
501#[doc = "Reader of field `IREN`"]
502pub type IREN_R = crate::R<bool, bool>;
503#[doc = "Write proxy for field `IREN`"]
504pub struct IREN_W<'a> {
505 w: &'a mut W,
506}
507impl<'a> IREN_W<'a> {
508 #[doc = r"Sets the field bit"]
509 #[inline(always)]
510 pub fn set_bit(self) -> &'a mut W {
511 self.bit(true)
512 }
513 #[doc = r"Clears the field bit"]
514 #[inline(always)]
515 pub fn clear_bit(self) -> &'a mut W {
516 self.bit(false)
517 }
518 #[doc = r"Writes raw bits to the field"]
519 #[inline(always)]
520 pub fn bit(self, value: bool) -> &'a mut W {
521 self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
522 self.w
523 }
524}
525#[doc = "Reader of field `EIE`"]
526pub type EIE_R = crate::R<bool, bool>;
527#[doc = "Write proxy for field `EIE`"]
528pub struct EIE_W<'a> {
529 w: &'a mut W,
530}
531impl<'a> EIE_W<'a> {
532 #[doc = r"Sets the field bit"]
533 #[inline(always)]
534 pub fn set_bit(self) -> &'a mut W {
535 self.bit(true)
536 }
537 #[doc = r"Clears the field bit"]
538 #[inline(always)]
539 pub fn clear_bit(self) -> &'a mut W {
540 self.bit(false)
541 }
542 #[doc = r"Writes raw bits to the field"]
543 #[inline(always)]
544 pub fn bit(self, value: bool) -> &'a mut W {
545 self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
546 self.w
547 }
548}
549impl R {
550 #[doc = "Bits 29:31 - TXFIFO threshold configuration"]
551 #[inline(always)]
552 pub fn txftcfg(&self) -> TXFTCFG_R {
553 TXFTCFG_R::new(((self.bits >> 29) & 0x07) as u8)
554 }
555 #[doc = "Bit 28 - RXFIFO threshold interrupt enable"]
556 #[inline(always)]
557 pub fn rxftie(&self) -> RXFTIE_R {
558 RXFTIE_R::new(((self.bits >> 28) & 0x01) != 0)
559 }
560 #[doc = "Bits 25:27 - Receive FIFO threshold configuration"]
561 #[inline(always)]
562 pub fn rxftcfg(&self) -> RXFTCFG_R {
563 RXFTCFG_R::new(((self.bits >> 25) & 0x07) as u8)
564 }
565 #[doc = "Bit 24 - Tr Complete before guard time, interrupt enable"]
566 #[inline(always)]
567 pub fn tcbgtie(&self) -> TCBGTIE_R {
568 TCBGTIE_R::new(((self.bits >> 24) & 0x01) != 0)
569 }
570 #[doc = "Bit 23 - threshold interrupt enable"]
571 #[inline(always)]
572 pub fn txftie(&self) -> TXFTIE_R {
573 TXFTIE_R::new(((self.bits >> 23) & 0x01) != 0)
574 }
575 #[doc = "Bit 22 - Wakeup from Stop mode interrupt enable"]
576 #[inline(always)]
577 pub fn wufie(&self) -> WUFIE_R {
578 WUFIE_R::new(((self.bits >> 22) & 0x01) != 0)
579 }
580 #[doc = "Bits 20:21 - Wakeup from Stop mode interrupt flag selection"]
581 #[inline(always)]
582 pub fn wus(&self) -> WUS_R {
583 WUS_R::new(((self.bits >> 20) & 0x03) as u8)
584 }
585 #[doc = "Bits 17:19 - Smartcard auto-retry count"]
586 #[inline(always)]
587 pub fn scarcnt(&self) -> SCARCNT_R {
588 SCARCNT_R::new(((self.bits >> 17) & 0x07) as u8)
589 }
590 #[doc = "Bit 15 - Driver enable polarity selection"]
591 #[inline(always)]
592 pub fn dep(&self) -> DEP_R {
593 DEP_R::new(((self.bits >> 15) & 0x01) != 0)
594 }
595 #[doc = "Bit 14 - Driver enable mode"]
596 #[inline(always)]
597 pub fn dem(&self) -> DEM_R {
598 DEM_R::new(((self.bits >> 14) & 0x01) != 0)
599 }
600 #[doc = "Bit 13 - DMA Disable on Reception Error"]
601 #[inline(always)]
602 pub fn ddre(&self) -> DDRE_R {
603 DDRE_R::new(((self.bits >> 13) & 0x01) != 0)
604 }
605 #[doc = "Bit 12 - Overrun Disable"]
606 #[inline(always)]
607 pub fn ovrdis(&self) -> OVRDIS_R {
608 OVRDIS_R::new(((self.bits >> 12) & 0x01) != 0)
609 }
610 #[doc = "Bit 11 - One sample bit method enable"]
611 #[inline(always)]
612 pub fn onebit(&self) -> ONEBIT_R {
613 ONEBIT_R::new(((self.bits >> 11) & 0x01) != 0)
614 }
615 #[doc = "Bit 10 - CTS interrupt enable"]
616 #[inline(always)]
617 pub fn ctsie(&self) -> CTSIE_R {
618 CTSIE_R::new(((self.bits >> 10) & 0x01) != 0)
619 }
620 #[doc = "Bit 9 - CTS enable"]
621 #[inline(always)]
622 pub fn ctse(&self) -> CTSE_R {
623 CTSE_R::new(((self.bits >> 9) & 0x01) != 0)
624 }
625 #[doc = "Bit 8 - RTS enable"]
626 #[inline(always)]
627 pub fn rtse(&self) -> RTSE_R {
628 RTSE_R::new(((self.bits >> 8) & 0x01) != 0)
629 }
630 #[doc = "Bit 7 - DMA enable transmitter"]
631 #[inline(always)]
632 pub fn dmat(&self) -> DMAT_R {
633 DMAT_R::new(((self.bits >> 7) & 0x01) != 0)
634 }
635 #[doc = "Bit 6 - DMA enable receiver"]
636 #[inline(always)]
637 pub fn dmar(&self) -> DMAR_R {
638 DMAR_R::new(((self.bits >> 6) & 0x01) != 0)
639 }
640 #[doc = "Bit 5 - Smartcard mode enable"]
641 #[inline(always)]
642 pub fn scen(&self) -> SCEN_R {
643 SCEN_R::new(((self.bits >> 5) & 0x01) != 0)
644 }
645 #[doc = "Bit 4 - Smartcard NACK enable"]
646 #[inline(always)]
647 pub fn nack(&self) -> NACK_R {
648 NACK_R::new(((self.bits >> 4) & 0x01) != 0)
649 }
650 #[doc = "Bit 3 - Half-duplex selection"]
651 #[inline(always)]
652 pub fn hdsel(&self) -> HDSEL_R {
653 HDSEL_R::new(((self.bits >> 3) & 0x01) != 0)
654 }
655 #[doc = "Bit 2 - Ir low-power"]
656 #[inline(always)]
657 pub fn irlp(&self) -> IRLP_R {
658 IRLP_R::new(((self.bits >> 2) & 0x01) != 0)
659 }
660 #[doc = "Bit 1 - Ir mode enable"]
661 #[inline(always)]
662 pub fn iren(&self) -> IREN_R {
663 IREN_R::new(((self.bits >> 1) & 0x01) != 0)
664 }
665 #[doc = "Bit 0 - Error interrupt enable"]
666 #[inline(always)]
667 pub fn eie(&self) -> EIE_R {
668 EIE_R::new((self.bits & 0x01) != 0)
669 }
670}
671impl W {
672 #[doc = "Bits 29:31 - TXFIFO threshold configuration"]
673 #[inline(always)]
674 pub fn txftcfg(&mut self) -> TXFTCFG_W {
675 TXFTCFG_W { w: self }
676 }
677 #[doc = "Bit 28 - RXFIFO threshold interrupt enable"]
678 #[inline(always)]
679 pub fn rxftie(&mut self) -> RXFTIE_W {
680 RXFTIE_W { w: self }
681 }
682 #[doc = "Bits 25:27 - Receive FIFO threshold configuration"]
683 #[inline(always)]
684 pub fn rxftcfg(&mut self) -> RXFTCFG_W {
685 RXFTCFG_W { w: self }
686 }
687 #[doc = "Bit 24 - Tr Complete before guard time, interrupt enable"]
688 #[inline(always)]
689 pub fn tcbgtie(&mut self) -> TCBGTIE_W {
690 TCBGTIE_W { w: self }
691 }
692 #[doc = "Bit 23 - threshold interrupt enable"]
693 #[inline(always)]
694 pub fn txftie(&mut self) -> TXFTIE_W {
695 TXFTIE_W { w: self }
696 }
697 #[doc = "Bit 22 - Wakeup from Stop mode interrupt enable"]
698 #[inline(always)]
699 pub fn wufie(&mut self) -> WUFIE_W {
700 WUFIE_W { w: self }
701 }
702 #[doc = "Bits 20:21 - Wakeup from Stop mode interrupt flag selection"]
703 #[inline(always)]
704 pub fn wus(&mut self) -> WUS_W {
705 WUS_W { w: self }
706 }
707 #[doc = "Bits 17:19 - Smartcard auto-retry count"]
708 #[inline(always)]
709 pub fn scarcnt(&mut self) -> SCARCNT_W {
710 SCARCNT_W { w: self }
711 }
712 #[doc = "Bit 15 - Driver enable polarity selection"]
713 #[inline(always)]
714 pub fn dep(&mut self) -> DEP_W {
715 DEP_W { w: self }
716 }
717 #[doc = "Bit 14 - Driver enable mode"]
718 #[inline(always)]
719 pub fn dem(&mut self) -> DEM_W {
720 DEM_W { w: self }
721 }
722 #[doc = "Bit 13 - DMA Disable on Reception Error"]
723 #[inline(always)]
724 pub fn ddre(&mut self) -> DDRE_W {
725 DDRE_W { w: self }
726 }
727 #[doc = "Bit 12 - Overrun Disable"]
728 #[inline(always)]
729 pub fn ovrdis(&mut self) -> OVRDIS_W {
730 OVRDIS_W { w: self }
731 }
732 #[doc = "Bit 11 - One sample bit method enable"]
733 #[inline(always)]
734 pub fn onebit(&mut self) -> ONEBIT_W {
735 ONEBIT_W { w: self }
736 }
737 #[doc = "Bit 10 - CTS interrupt enable"]
738 #[inline(always)]
739 pub fn ctsie(&mut self) -> CTSIE_W {
740 CTSIE_W { w: self }
741 }
742 #[doc = "Bit 9 - CTS enable"]
743 #[inline(always)]
744 pub fn ctse(&mut self) -> CTSE_W {
745 CTSE_W { w: self }
746 }
747 #[doc = "Bit 8 - RTS enable"]
748 #[inline(always)]
749 pub fn rtse(&mut self) -> RTSE_W {
750 RTSE_W { w: self }
751 }
752 #[doc = "Bit 7 - DMA enable transmitter"]
753 #[inline(always)]
754 pub fn dmat(&mut self) -> DMAT_W {
755 DMAT_W { w: self }
756 }
757 #[doc = "Bit 6 - DMA enable receiver"]
758 #[inline(always)]
759 pub fn dmar(&mut self) -> DMAR_W {
760 DMAR_W { w: self }
761 }
762 #[doc = "Bit 5 - Smartcard mode enable"]
763 #[inline(always)]
764 pub fn scen(&mut self) -> SCEN_W {
765 SCEN_W { w: self }
766 }
767 #[doc = "Bit 4 - Smartcard NACK enable"]
768 #[inline(always)]
769 pub fn nack(&mut self) -> NACK_W {
770 NACK_W { w: self }
771 }
772 #[doc = "Bit 3 - Half-duplex selection"]
773 #[inline(always)]
774 pub fn hdsel(&mut self) -> HDSEL_W {
775 HDSEL_W { w: self }
776 }
777 #[doc = "Bit 2 - Ir low-power"]
778 #[inline(always)]
779 pub fn irlp(&mut self) -> IRLP_W {
780 IRLP_W { w: self }
781 }
782 #[doc = "Bit 1 - Ir mode enable"]
783 #[inline(always)]
784 pub fn iren(&mut self) -> IREN_W {
785 IREN_W { w: self }
786 }
787 #[doc = "Bit 0 - Error interrupt enable"]
788 #[inline(always)]
789 pub fn eie(&mut self) -> EIE_W {
790 EIE_W { w: self }
791 }
792}