stm32wb_pac/usart1/
cr2.rs

1#[doc = "Reader of register CR2"]
2pub type R = crate::R<u32, super::CR2>;
3#[doc = "Writer for register CR2"]
4pub type W = crate::W<u32, super::CR2>;
5#[doc = "Register CR2 `reset()`'s with value 0"]
6impl crate::ResetValue for super::CR2 {
7    type Type = u32;
8    #[inline(always)]
9    fn reset_value() -> Self::Type {
10        0
11    }
12}
13#[doc = "Reader of field `ADD4_7`"]
14pub type ADD4_7_R = crate::R<u8, u8>;
15#[doc = "Write proxy for field `ADD4_7`"]
16pub struct ADD4_7_W<'a> {
17    w: &'a mut W,
18}
19impl<'a> ADD4_7_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 & !(0x0f << 28)) | (((value as u32) & 0x0f) << 28);
24        self.w
25    }
26}
27#[doc = "Reader of field `ADD0_3`"]
28pub type ADD0_3_R = crate::R<u8, u8>;
29#[doc = "Write proxy for field `ADD0_3`"]
30pub struct ADD0_3_W<'a> {
31    w: &'a mut W,
32}
33impl<'a> ADD0_3_W<'a> {
34    #[doc = r"Writes raw bits to the field"]
35    #[inline(always)]
36    pub unsafe fn bits(self, value: u8) -> &'a mut W {
37        self.w.bits = (self.w.bits & !(0x0f << 24)) | (((value as u32) & 0x0f) << 24);
38        self.w
39    }
40}
41#[doc = "Reader of field `RTOEN`"]
42pub type RTOEN_R = crate::R<bool, bool>;
43#[doc = "Write proxy for field `RTOEN`"]
44pub struct RTOEN_W<'a> {
45    w: &'a mut W,
46}
47impl<'a> RTOEN_W<'a> {
48    #[doc = r"Sets the field bit"]
49    #[inline(always)]
50    pub fn set_bit(self) -> &'a mut W {
51        self.bit(true)
52    }
53    #[doc = r"Clears the field bit"]
54    #[inline(always)]
55    pub fn clear_bit(self) -> &'a mut W {
56        self.bit(false)
57    }
58    #[doc = r"Writes raw bits to the field"]
59    #[inline(always)]
60    pub fn bit(self, value: bool) -> &'a mut W {
61        self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23);
62        self.w
63    }
64}
65#[doc = "Reader of field `ABRMOD1`"]
66pub type ABRMOD1_R = crate::R<bool, bool>;
67#[doc = "Write proxy for field `ABRMOD1`"]
68pub struct ABRMOD1_W<'a> {
69    w: &'a mut W,
70}
71impl<'a> ABRMOD1_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 << 22)) | (((value as u32) & 0x01) << 22);
86        self.w
87    }
88}
89#[doc = "Reader of field `ABRMOD0`"]
90pub type ABRMOD0_R = crate::R<bool, bool>;
91#[doc = "Write proxy for field `ABRMOD0`"]
92pub struct ABRMOD0_W<'a> {
93    w: &'a mut W,
94}
95impl<'a> ABRMOD0_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 << 21)) | (((value as u32) & 0x01) << 21);
110        self.w
111    }
112}
113#[doc = "Reader of field `ABREN`"]
114pub type ABREN_R = crate::R<bool, bool>;
115#[doc = "Write proxy for field `ABREN`"]
116pub struct ABREN_W<'a> {
117    w: &'a mut W,
118}
119impl<'a> ABREN_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 << 20)) | (((value as u32) & 0x01) << 20);
134        self.w
135    }
136}
137#[doc = "Reader of field `MSBFIRST`"]
138pub type MSBFIRST_R = crate::R<bool, bool>;
139#[doc = "Write proxy for field `MSBFIRST`"]
140pub struct MSBFIRST_W<'a> {
141    w: &'a mut W,
142}
143impl<'a> MSBFIRST_W<'a> {
144    #[doc = r"Sets the field bit"]
145    #[inline(always)]
146    pub fn set_bit(self) -> &'a mut W {
147        self.bit(true)
148    }
149    #[doc = r"Clears the field bit"]
150    #[inline(always)]
151    pub fn clear_bit(self) -> &'a mut W {
152        self.bit(false)
153    }
154    #[doc = r"Writes raw bits to the field"]
155    #[inline(always)]
156    pub fn bit(self, value: bool) -> &'a mut W {
157        self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19);
158        self.w
159    }
160}
161#[doc = "Reader of field `TAINV`"]
162pub type TAINV_R = crate::R<bool, bool>;
163#[doc = "Write proxy for field `TAINV`"]
164pub struct TAINV_W<'a> {
165    w: &'a mut W,
166}
167impl<'a> TAINV_W<'a> {
168    #[doc = r"Sets the field bit"]
169    #[inline(always)]
170    pub fn set_bit(self) -> &'a mut W {
171        self.bit(true)
172    }
173    #[doc = r"Clears the field bit"]
174    #[inline(always)]
175    pub fn clear_bit(self) -> &'a mut W {
176        self.bit(false)
177    }
178    #[doc = r"Writes raw bits to the field"]
179    #[inline(always)]
180    pub fn bit(self, value: bool) -> &'a mut W {
181        self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18);
182        self.w
183    }
184}
185#[doc = "Reader of field `TXINV`"]
186pub type TXINV_R = crate::R<bool, bool>;
187#[doc = "Write proxy for field `TXINV`"]
188pub struct TXINV_W<'a> {
189    w: &'a mut W,
190}
191impl<'a> TXINV_W<'a> {
192    #[doc = r"Sets the field bit"]
193    #[inline(always)]
194    pub fn set_bit(self) -> &'a mut W {
195        self.bit(true)
196    }
197    #[doc = r"Clears the field bit"]
198    #[inline(always)]
199    pub fn clear_bit(self) -> &'a mut W {
200        self.bit(false)
201    }
202    #[doc = r"Writes raw bits to the field"]
203    #[inline(always)]
204    pub fn bit(self, value: bool) -> &'a mut W {
205        self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17);
206        self.w
207    }
208}
209#[doc = "Reader of field `RXINV`"]
210pub type RXINV_R = crate::R<bool, bool>;
211#[doc = "Write proxy for field `RXINV`"]
212pub struct RXINV_W<'a> {
213    w: &'a mut W,
214}
215impl<'a> RXINV_W<'a> {
216    #[doc = r"Sets the field bit"]
217    #[inline(always)]
218    pub fn set_bit(self) -> &'a mut W {
219        self.bit(true)
220    }
221    #[doc = r"Clears the field bit"]
222    #[inline(always)]
223    pub fn clear_bit(self) -> &'a mut W {
224        self.bit(false)
225    }
226    #[doc = r"Writes raw bits to the field"]
227    #[inline(always)]
228    pub fn bit(self, value: bool) -> &'a mut W {
229        self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16);
230        self.w
231    }
232}
233#[doc = "Reader of field `SWAP`"]
234pub type SWAP_R = crate::R<bool, bool>;
235#[doc = "Write proxy for field `SWAP`"]
236pub struct SWAP_W<'a> {
237    w: &'a mut W,
238}
239impl<'a> SWAP_W<'a> {
240    #[doc = r"Sets the field bit"]
241    #[inline(always)]
242    pub fn set_bit(self) -> &'a mut W {
243        self.bit(true)
244    }
245    #[doc = r"Clears the field bit"]
246    #[inline(always)]
247    pub fn clear_bit(self) -> &'a mut W {
248        self.bit(false)
249    }
250    #[doc = r"Writes raw bits to the field"]
251    #[inline(always)]
252    pub fn bit(self, value: bool) -> &'a mut W {
253        self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15);
254        self.w
255    }
256}
257#[doc = "Reader of field `LINEN`"]
258pub type LINEN_R = crate::R<bool, bool>;
259#[doc = "Write proxy for field `LINEN`"]
260pub struct LINEN_W<'a> {
261    w: &'a mut W,
262}
263impl<'a> LINEN_W<'a> {
264    #[doc = r"Sets the field bit"]
265    #[inline(always)]
266    pub fn set_bit(self) -> &'a mut W {
267        self.bit(true)
268    }
269    #[doc = r"Clears the field bit"]
270    #[inline(always)]
271    pub fn clear_bit(self) -> &'a mut W {
272        self.bit(false)
273    }
274    #[doc = r"Writes raw bits to the field"]
275    #[inline(always)]
276    pub fn bit(self, value: bool) -> &'a mut W {
277        self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14);
278        self.w
279    }
280}
281#[doc = "Reader of field `STOP`"]
282pub type STOP_R = crate::R<u8, u8>;
283#[doc = "Write proxy for field `STOP`"]
284pub struct STOP_W<'a> {
285    w: &'a mut W,
286}
287impl<'a> STOP_W<'a> {
288    #[doc = r"Writes raw bits to the field"]
289    #[inline(always)]
290    pub unsafe fn bits(self, value: u8) -> &'a mut W {
291        self.w.bits = (self.w.bits & !(0x03 << 12)) | (((value as u32) & 0x03) << 12);
292        self.w
293    }
294}
295#[doc = "Reader of field `CLKEN`"]
296pub type CLKEN_R = crate::R<bool, bool>;
297#[doc = "Write proxy for field `CLKEN`"]
298pub struct CLKEN_W<'a> {
299    w: &'a mut W,
300}
301impl<'a> CLKEN_W<'a> {
302    #[doc = r"Sets the field bit"]
303    #[inline(always)]
304    pub fn set_bit(self) -> &'a mut W {
305        self.bit(true)
306    }
307    #[doc = r"Clears the field bit"]
308    #[inline(always)]
309    pub fn clear_bit(self) -> &'a mut W {
310        self.bit(false)
311    }
312    #[doc = r"Writes raw bits to the field"]
313    #[inline(always)]
314    pub fn bit(self, value: bool) -> &'a mut W {
315        self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11);
316        self.w
317    }
318}
319#[doc = "Reader of field `CPOL`"]
320pub type CPOL_R = crate::R<bool, bool>;
321#[doc = "Write proxy for field `CPOL`"]
322pub struct CPOL_W<'a> {
323    w: &'a mut W,
324}
325impl<'a> CPOL_W<'a> {
326    #[doc = r"Sets the field bit"]
327    #[inline(always)]
328    pub fn set_bit(self) -> &'a mut W {
329        self.bit(true)
330    }
331    #[doc = r"Clears the field bit"]
332    #[inline(always)]
333    pub fn clear_bit(self) -> &'a mut W {
334        self.bit(false)
335    }
336    #[doc = r"Writes raw bits to the field"]
337    #[inline(always)]
338    pub fn bit(self, value: bool) -> &'a mut W {
339        self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10);
340        self.w
341    }
342}
343#[doc = "Reader of field `CPHA`"]
344pub type CPHA_R = crate::R<bool, bool>;
345#[doc = "Write proxy for field `CPHA`"]
346pub struct CPHA_W<'a> {
347    w: &'a mut W,
348}
349impl<'a> CPHA_W<'a> {
350    #[doc = r"Sets the field bit"]
351    #[inline(always)]
352    pub fn set_bit(self) -> &'a mut W {
353        self.bit(true)
354    }
355    #[doc = r"Clears the field bit"]
356    #[inline(always)]
357    pub fn clear_bit(self) -> &'a mut W {
358        self.bit(false)
359    }
360    #[doc = r"Writes raw bits to the field"]
361    #[inline(always)]
362    pub fn bit(self, value: bool) -> &'a mut W {
363        self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9);
364        self.w
365    }
366}
367#[doc = "Reader of field `LBCL`"]
368pub type LBCL_R = crate::R<bool, bool>;
369#[doc = "Write proxy for field `LBCL`"]
370pub struct LBCL_W<'a> {
371    w: &'a mut W,
372}
373impl<'a> LBCL_W<'a> {
374    #[doc = r"Sets the field bit"]
375    #[inline(always)]
376    pub fn set_bit(self) -> &'a mut W {
377        self.bit(true)
378    }
379    #[doc = r"Clears the field bit"]
380    #[inline(always)]
381    pub fn clear_bit(self) -> &'a mut W {
382        self.bit(false)
383    }
384    #[doc = r"Writes raw bits to the field"]
385    #[inline(always)]
386    pub fn bit(self, value: bool) -> &'a mut W {
387        self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8);
388        self.w
389    }
390}
391#[doc = "Reader of field `LBDIE`"]
392pub type LBDIE_R = crate::R<bool, bool>;
393#[doc = "Write proxy for field `LBDIE`"]
394pub struct LBDIE_W<'a> {
395    w: &'a mut W,
396}
397impl<'a> LBDIE_W<'a> {
398    #[doc = r"Sets the field bit"]
399    #[inline(always)]
400    pub fn set_bit(self) -> &'a mut W {
401        self.bit(true)
402    }
403    #[doc = r"Clears the field bit"]
404    #[inline(always)]
405    pub fn clear_bit(self) -> &'a mut W {
406        self.bit(false)
407    }
408    #[doc = r"Writes raw bits to the field"]
409    #[inline(always)]
410    pub fn bit(self, value: bool) -> &'a mut W {
411        self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
412        self.w
413    }
414}
415#[doc = "Reader of field `LBDL`"]
416pub type LBDL_R = crate::R<bool, bool>;
417#[doc = "Write proxy for field `LBDL`"]
418pub struct LBDL_W<'a> {
419    w: &'a mut W,
420}
421impl<'a> LBDL_W<'a> {
422    #[doc = r"Sets the field bit"]
423    #[inline(always)]
424    pub fn set_bit(self) -> &'a mut W {
425        self.bit(true)
426    }
427    #[doc = r"Clears the field bit"]
428    #[inline(always)]
429    pub fn clear_bit(self) -> &'a mut W {
430        self.bit(false)
431    }
432    #[doc = r"Writes raw bits to the field"]
433    #[inline(always)]
434    pub fn bit(self, value: bool) -> &'a mut W {
435        self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
436        self.w
437    }
438}
439#[doc = "Reader of field `ADDM7`"]
440pub type ADDM7_R = crate::R<bool, bool>;
441#[doc = "Write proxy for field `ADDM7`"]
442pub struct ADDM7_W<'a> {
443    w: &'a mut W,
444}
445impl<'a> ADDM7_W<'a> {
446    #[doc = r"Sets the field bit"]
447    #[inline(always)]
448    pub fn set_bit(self) -> &'a mut W {
449        self.bit(true)
450    }
451    #[doc = r"Clears the field bit"]
452    #[inline(always)]
453    pub fn clear_bit(self) -> &'a mut W {
454        self.bit(false)
455    }
456    #[doc = r"Writes raw bits to the field"]
457    #[inline(always)]
458    pub fn bit(self, value: bool) -> &'a mut W {
459        self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
460        self.w
461    }
462}
463#[doc = "Reader of field `DIS_NSS`"]
464pub type DIS_NSS_R = crate::R<bool, bool>;
465#[doc = "Write proxy for field `DIS_NSS`"]
466pub struct DIS_NSS_W<'a> {
467    w: &'a mut W,
468}
469impl<'a> DIS_NSS_W<'a> {
470    #[doc = r"Sets the field bit"]
471    #[inline(always)]
472    pub fn set_bit(self) -> &'a mut W {
473        self.bit(true)
474    }
475    #[doc = r"Clears the field bit"]
476    #[inline(always)]
477    pub fn clear_bit(self) -> &'a mut W {
478        self.bit(false)
479    }
480    #[doc = r"Writes raw bits to the field"]
481    #[inline(always)]
482    pub fn bit(self, value: bool) -> &'a mut W {
483        self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
484        self.w
485    }
486}
487#[doc = "Reader of field `SLVEN`"]
488pub type SLVEN_R = crate::R<bool, bool>;
489#[doc = "Write proxy for field `SLVEN`"]
490pub struct SLVEN_W<'a> {
491    w: &'a mut W,
492}
493impl<'a> SLVEN_W<'a> {
494    #[doc = r"Sets the field bit"]
495    #[inline(always)]
496    pub fn set_bit(self) -> &'a mut W {
497        self.bit(true)
498    }
499    #[doc = r"Clears the field bit"]
500    #[inline(always)]
501    pub fn clear_bit(self) -> &'a mut W {
502        self.bit(false)
503    }
504    #[doc = r"Writes raw bits to the field"]
505    #[inline(always)]
506    pub fn bit(self, value: bool) -> &'a mut W {
507        self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
508        self.w
509    }
510}
511impl R {
512    #[doc = "Bits 28:31 - Address of the USART node"]
513    #[inline(always)]
514    pub fn add4_7(&self) -> ADD4_7_R {
515        ADD4_7_R::new(((self.bits >> 28) & 0x0f) as u8)
516    }
517    #[doc = "Bits 24:27 - Address of the USART node"]
518    #[inline(always)]
519    pub fn add0_3(&self) -> ADD0_3_R {
520        ADD0_3_R::new(((self.bits >> 24) & 0x0f) as u8)
521    }
522    #[doc = "Bit 23 - Receiver timeout enable"]
523    #[inline(always)]
524    pub fn rtoen(&self) -> RTOEN_R {
525        RTOEN_R::new(((self.bits >> 23) & 0x01) != 0)
526    }
527    #[doc = "Bit 22 - Auto baud rate mode"]
528    #[inline(always)]
529    pub fn abrmod1(&self) -> ABRMOD1_R {
530        ABRMOD1_R::new(((self.bits >> 22) & 0x01) != 0)
531    }
532    #[doc = "Bit 21 - ABRMOD0"]
533    #[inline(always)]
534    pub fn abrmod0(&self) -> ABRMOD0_R {
535        ABRMOD0_R::new(((self.bits >> 21) & 0x01) != 0)
536    }
537    #[doc = "Bit 20 - Auto baud rate enable"]
538    #[inline(always)]
539    pub fn abren(&self) -> ABREN_R {
540        ABREN_R::new(((self.bits >> 20) & 0x01) != 0)
541    }
542    #[doc = "Bit 19 - Most significant bit first"]
543    #[inline(always)]
544    pub fn msbfirst(&self) -> MSBFIRST_R {
545        MSBFIRST_R::new(((self.bits >> 19) & 0x01) != 0)
546    }
547    #[doc = "Bit 18 - Binary data inversion"]
548    #[inline(always)]
549    pub fn tainv(&self) -> TAINV_R {
550        TAINV_R::new(((self.bits >> 18) & 0x01) != 0)
551    }
552    #[doc = "Bit 17 - TX pin active level inversion"]
553    #[inline(always)]
554    pub fn txinv(&self) -> TXINV_R {
555        TXINV_R::new(((self.bits >> 17) & 0x01) != 0)
556    }
557    #[doc = "Bit 16 - RX pin active level inversion"]
558    #[inline(always)]
559    pub fn rxinv(&self) -> RXINV_R {
560        RXINV_R::new(((self.bits >> 16) & 0x01) != 0)
561    }
562    #[doc = "Bit 15 - Swap TX/RX pins"]
563    #[inline(always)]
564    pub fn swap(&self) -> SWAP_R {
565        SWAP_R::new(((self.bits >> 15) & 0x01) != 0)
566    }
567    #[doc = "Bit 14 - LIN mode enable"]
568    #[inline(always)]
569    pub fn linen(&self) -> LINEN_R {
570        LINEN_R::new(((self.bits >> 14) & 0x01) != 0)
571    }
572    #[doc = "Bits 12:13 - STOP bits"]
573    #[inline(always)]
574    pub fn stop(&self) -> STOP_R {
575        STOP_R::new(((self.bits >> 12) & 0x03) as u8)
576    }
577    #[doc = "Bit 11 - Clock enable"]
578    #[inline(always)]
579    pub fn clken(&self) -> CLKEN_R {
580        CLKEN_R::new(((self.bits >> 11) & 0x01) != 0)
581    }
582    #[doc = "Bit 10 - Clock polarity"]
583    #[inline(always)]
584    pub fn cpol(&self) -> CPOL_R {
585        CPOL_R::new(((self.bits >> 10) & 0x01) != 0)
586    }
587    #[doc = "Bit 9 - Clock phase"]
588    #[inline(always)]
589    pub fn cpha(&self) -> CPHA_R {
590        CPHA_R::new(((self.bits >> 9) & 0x01) != 0)
591    }
592    #[doc = "Bit 8 - Last bit clock pulse"]
593    #[inline(always)]
594    pub fn lbcl(&self) -> LBCL_R {
595        LBCL_R::new(((self.bits >> 8) & 0x01) != 0)
596    }
597    #[doc = "Bit 6 - LIN break detection interrupt enable"]
598    #[inline(always)]
599    pub fn lbdie(&self) -> LBDIE_R {
600        LBDIE_R::new(((self.bits >> 6) & 0x01) != 0)
601    }
602    #[doc = "Bit 5 - LIN break detection length"]
603    #[inline(always)]
604    pub fn lbdl(&self) -> LBDL_R {
605        LBDL_R::new(((self.bits >> 5) & 0x01) != 0)
606    }
607    #[doc = "Bit 4 - 7-bit Address Detection/4-bit Address Detection"]
608    #[inline(always)]
609    pub fn addm7(&self) -> ADDM7_R {
610        ADDM7_R::new(((self.bits >> 4) & 0x01) != 0)
611    }
612    #[doc = "Bit 3 - When the DSI_NSS bit is set, the NSS pin input will be ignored"]
613    #[inline(always)]
614    pub fn dis_nss(&self) -> DIS_NSS_R {
615        DIS_NSS_R::new(((self.bits >> 3) & 0x01) != 0)
616    }
617    #[doc = "Bit 0 - Synchronous Slave mode enable"]
618    #[inline(always)]
619    pub fn slven(&self) -> SLVEN_R {
620        SLVEN_R::new((self.bits & 0x01) != 0)
621    }
622}
623impl W {
624    #[doc = "Bits 28:31 - Address of the USART node"]
625    #[inline(always)]
626    pub fn add4_7(&mut self) -> ADD4_7_W {
627        ADD4_7_W { w: self }
628    }
629    #[doc = "Bits 24:27 - Address of the USART node"]
630    #[inline(always)]
631    pub fn add0_3(&mut self) -> ADD0_3_W {
632        ADD0_3_W { w: self }
633    }
634    #[doc = "Bit 23 - Receiver timeout enable"]
635    #[inline(always)]
636    pub fn rtoen(&mut self) -> RTOEN_W {
637        RTOEN_W { w: self }
638    }
639    #[doc = "Bit 22 - Auto baud rate mode"]
640    #[inline(always)]
641    pub fn abrmod1(&mut self) -> ABRMOD1_W {
642        ABRMOD1_W { w: self }
643    }
644    #[doc = "Bit 21 - ABRMOD0"]
645    #[inline(always)]
646    pub fn abrmod0(&mut self) -> ABRMOD0_W {
647        ABRMOD0_W { w: self }
648    }
649    #[doc = "Bit 20 - Auto baud rate enable"]
650    #[inline(always)]
651    pub fn abren(&mut self) -> ABREN_W {
652        ABREN_W { w: self }
653    }
654    #[doc = "Bit 19 - Most significant bit first"]
655    #[inline(always)]
656    pub fn msbfirst(&mut self) -> MSBFIRST_W {
657        MSBFIRST_W { w: self }
658    }
659    #[doc = "Bit 18 - Binary data inversion"]
660    #[inline(always)]
661    pub fn tainv(&mut self) -> TAINV_W {
662        TAINV_W { w: self }
663    }
664    #[doc = "Bit 17 - TX pin active level inversion"]
665    #[inline(always)]
666    pub fn txinv(&mut self) -> TXINV_W {
667        TXINV_W { w: self }
668    }
669    #[doc = "Bit 16 - RX pin active level inversion"]
670    #[inline(always)]
671    pub fn rxinv(&mut self) -> RXINV_W {
672        RXINV_W { w: self }
673    }
674    #[doc = "Bit 15 - Swap TX/RX pins"]
675    #[inline(always)]
676    pub fn swap(&mut self) -> SWAP_W {
677        SWAP_W { w: self }
678    }
679    #[doc = "Bit 14 - LIN mode enable"]
680    #[inline(always)]
681    pub fn linen(&mut self) -> LINEN_W {
682        LINEN_W { w: self }
683    }
684    #[doc = "Bits 12:13 - STOP bits"]
685    #[inline(always)]
686    pub fn stop(&mut self) -> STOP_W {
687        STOP_W { w: self }
688    }
689    #[doc = "Bit 11 - Clock enable"]
690    #[inline(always)]
691    pub fn clken(&mut self) -> CLKEN_W {
692        CLKEN_W { w: self }
693    }
694    #[doc = "Bit 10 - Clock polarity"]
695    #[inline(always)]
696    pub fn cpol(&mut self) -> CPOL_W {
697        CPOL_W { w: self }
698    }
699    #[doc = "Bit 9 - Clock phase"]
700    #[inline(always)]
701    pub fn cpha(&mut self) -> CPHA_W {
702        CPHA_W { w: self }
703    }
704    #[doc = "Bit 8 - Last bit clock pulse"]
705    #[inline(always)]
706    pub fn lbcl(&mut self) -> LBCL_W {
707        LBCL_W { w: self }
708    }
709    #[doc = "Bit 6 - LIN break detection interrupt enable"]
710    #[inline(always)]
711    pub fn lbdie(&mut self) -> LBDIE_W {
712        LBDIE_W { w: self }
713    }
714    #[doc = "Bit 5 - LIN break detection length"]
715    #[inline(always)]
716    pub fn lbdl(&mut self) -> LBDL_W {
717        LBDL_W { w: self }
718    }
719    #[doc = "Bit 4 - 7-bit Address Detection/4-bit Address Detection"]
720    #[inline(always)]
721    pub fn addm7(&mut self) -> ADDM7_W {
722        ADDM7_W { w: self }
723    }
724    #[doc = "Bit 3 - When the DSI_NSS bit is set, the NSS pin input will be ignored"]
725    #[inline(always)]
726    pub fn dis_nss(&mut self) -> DIS_NSS_W {
727        DIS_NSS_W { w: self }
728    }
729    #[doc = "Bit 0 - Synchronous Slave mode enable"]
730    #[inline(always)]
731    pub fn slven(&mut self) -> SLVEN_W {
732        SLVEN_W { w: self }
733    }
734}