stm32l4x2_pac/lpuart1/
isr.rs

1#[doc = r" Value read from the register"]
2pub struct R {
3    bits: u32,
4}
5impl super::ISR {
6    #[doc = r" Reads the contents of the register"]
7    #[inline]
8    pub fn read(&self) -> R {
9        R {
10            bits: self.register.get(),
11        }
12    }
13}
14#[doc = r" Value of the field"]
15pub struct REACKR {
16    bits: bool,
17}
18impl REACKR {
19    #[doc = r" Value of the field as raw bits"]
20    #[inline]
21    pub fn bit(&self) -> bool {
22        self.bits
23    }
24    #[doc = r" Returns `true` if the bit is clear (0)"]
25    #[inline]
26    pub fn bit_is_clear(&self) -> bool {
27        !self.bit()
28    }
29    #[doc = r" Returns `true` if the bit is set (1)"]
30    #[inline]
31    pub fn bit_is_set(&self) -> bool {
32        self.bit()
33    }
34}
35#[doc = r" Value of the field"]
36pub struct TEACKR {
37    bits: bool,
38}
39impl TEACKR {
40    #[doc = r" Value of the field as raw bits"]
41    #[inline]
42    pub fn bit(&self) -> bool {
43        self.bits
44    }
45    #[doc = r" Returns `true` if the bit is clear (0)"]
46    #[inline]
47    pub fn bit_is_clear(&self) -> bool {
48        !self.bit()
49    }
50    #[doc = r" Returns `true` if the bit is set (1)"]
51    #[inline]
52    pub fn bit_is_set(&self) -> bool {
53        self.bit()
54    }
55}
56#[doc = r" Value of the field"]
57pub struct WUFR {
58    bits: bool,
59}
60impl WUFR {
61    #[doc = r" Value of the field as raw bits"]
62    #[inline]
63    pub fn bit(&self) -> bool {
64        self.bits
65    }
66    #[doc = r" Returns `true` if the bit is clear (0)"]
67    #[inline]
68    pub fn bit_is_clear(&self) -> bool {
69        !self.bit()
70    }
71    #[doc = r" Returns `true` if the bit is set (1)"]
72    #[inline]
73    pub fn bit_is_set(&self) -> bool {
74        self.bit()
75    }
76}
77#[doc = r" Value of the field"]
78pub struct RWUR {
79    bits: bool,
80}
81impl RWUR {
82    #[doc = r" Value of the field as raw bits"]
83    #[inline]
84    pub fn bit(&self) -> bool {
85        self.bits
86    }
87    #[doc = r" Returns `true` if the bit is clear (0)"]
88    #[inline]
89    pub fn bit_is_clear(&self) -> bool {
90        !self.bit()
91    }
92    #[doc = r" Returns `true` if the bit is set (1)"]
93    #[inline]
94    pub fn bit_is_set(&self) -> bool {
95        self.bit()
96    }
97}
98#[doc = r" Value of the field"]
99pub struct SBKFR {
100    bits: bool,
101}
102impl SBKFR {
103    #[doc = r" Value of the field as raw bits"]
104    #[inline]
105    pub fn bit(&self) -> bool {
106        self.bits
107    }
108    #[doc = r" Returns `true` if the bit is clear (0)"]
109    #[inline]
110    pub fn bit_is_clear(&self) -> bool {
111        !self.bit()
112    }
113    #[doc = r" Returns `true` if the bit is set (1)"]
114    #[inline]
115    pub fn bit_is_set(&self) -> bool {
116        self.bit()
117    }
118}
119#[doc = r" Value of the field"]
120pub struct CMFR {
121    bits: bool,
122}
123impl CMFR {
124    #[doc = r" Value of the field as raw bits"]
125    #[inline]
126    pub fn bit(&self) -> bool {
127        self.bits
128    }
129    #[doc = r" Returns `true` if the bit is clear (0)"]
130    #[inline]
131    pub fn bit_is_clear(&self) -> bool {
132        !self.bit()
133    }
134    #[doc = r" Returns `true` if the bit is set (1)"]
135    #[inline]
136    pub fn bit_is_set(&self) -> bool {
137        self.bit()
138    }
139}
140#[doc = r" Value of the field"]
141pub struct BUSYR {
142    bits: bool,
143}
144impl BUSYR {
145    #[doc = r" Value of the field as raw bits"]
146    #[inline]
147    pub fn bit(&self) -> bool {
148        self.bits
149    }
150    #[doc = r" Returns `true` if the bit is clear (0)"]
151    #[inline]
152    pub fn bit_is_clear(&self) -> bool {
153        !self.bit()
154    }
155    #[doc = r" Returns `true` if the bit is set (1)"]
156    #[inline]
157    pub fn bit_is_set(&self) -> bool {
158        self.bit()
159    }
160}
161#[doc = r" Value of the field"]
162pub struct CTSR {
163    bits: bool,
164}
165impl CTSR {
166    #[doc = r" Value of the field as raw bits"]
167    #[inline]
168    pub fn bit(&self) -> bool {
169        self.bits
170    }
171    #[doc = r" Returns `true` if the bit is clear (0)"]
172    #[inline]
173    pub fn bit_is_clear(&self) -> bool {
174        !self.bit()
175    }
176    #[doc = r" Returns `true` if the bit is set (1)"]
177    #[inline]
178    pub fn bit_is_set(&self) -> bool {
179        self.bit()
180    }
181}
182#[doc = r" Value of the field"]
183pub struct CTSIFR {
184    bits: bool,
185}
186impl CTSIFR {
187    #[doc = r" Value of the field as raw bits"]
188    #[inline]
189    pub fn bit(&self) -> bool {
190        self.bits
191    }
192    #[doc = r" Returns `true` if the bit is clear (0)"]
193    #[inline]
194    pub fn bit_is_clear(&self) -> bool {
195        !self.bit()
196    }
197    #[doc = r" Returns `true` if the bit is set (1)"]
198    #[inline]
199    pub fn bit_is_set(&self) -> bool {
200        self.bit()
201    }
202}
203#[doc = r" Value of the field"]
204pub struct TXER {
205    bits: bool,
206}
207impl TXER {
208    #[doc = r" Value of the field as raw bits"]
209    #[inline]
210    pub fn bit(&self) -> bool {
211        self.bits
212    }
213    #[doc = r" Returns `true` if the bit is clear (0)"]
214    #[inline]
215    pub fn bit_is_clear(&self) -> bool {
216        !self.bit()
217    }
218    #[doc = r" Returns `true` if the bit is set (1)"]
219    #[inline]
220    pub fn bit_is_set(&self) -> bool {
221        self.bit()
222    }
223}
224#[doc = r" Value of the field"]
225pub struct TCR {
226    bits: bool,
227}
228impl TCR {
229    #[doc = r" Value of the field as raw bits"]
230    #[inline]
231    pub fn bit(&self) -> bool {
232        self.bits
233    }
234    #[doc = r" Returns `true` if the bit is clear (0)"]
235    #[inline]
236    pub fn bit_is_clear(&self) -> bool {
237        !self.bit()
238    }
239    #[doc = r" Returns `true` if the bit is set (1)"]
240    #[inline]
241    pub fn bit_is_set(&self) -> bool {
242        self.bit()
243    }
244}
245#[doc = r" Value of the field"]
246pub struct RXNER {
247    bits: bool,
248}
249impl RXNER {
250    #[doc = r" Value of the field as raw bits"]
251    #[inline]
252    pub fn bit(&self) -> bool {
253        self.bits
254    }
255    #[doc = r" Returns `true` if the bit is clear (0)"]
256    #[inline]
257    pub fn bit_is_clear(&self) -> bool {
258        !self.bit()
259    }
260    #[doc = r" Returns `true` if the bit is set (1)"]
261    #[inline]
262    pub fn bit_is_set(&self) -> bool {
263        self.bit()
264    }
265}
266#[doc = r" Value of the field"]
267pub struct IDLER {
268    bits: bool,
269}
270impl IDLER {
271    #[doc = r" Value of the field as raw bits"]
272    #[inline]
273    pub fn bit(&self) -> bool {
274        self.bits
275    }
276    #[doc = r" Returns `true` if the bit is clear (0)"]
277    #[inline]
278    pub fn bit_is_clear(&self) -> bool {
279        !self.bit()
280    }
281    #[doc = r" Returns `true` if the bit is set (1)"]
282    #[inline]
283    pub fn bit_is_set(&self) -> bool {
284        self.bit()
285    }
286}
287#[doc = r" Value of the field"]
288pub struct ORER {
289    bits: bool,
290}
291impl ORER {
292    #[doc = r" Value of the field as raw bits"]
293    #[inline]
294    pub fn bit(&self) -> bool {
295        self.bits
296    }
297    #[doc = r" Returns `true` if the bit is clear (0)"]
298    #[inline]
299    pub fn bit_is_clear(&self) -> bool {
300        !self.bit()
301    }
302    #[doc = r" Returns `true` if the bit is set (1)"]
303    #[inline]
304    pub fn bit_is_set(&self) -> bool {
305        self.bit()
306    }
307}
308#[doc = r" Value of the field"]
309pub struct NFR {
310    bits: bool,
311}
312impl NFR {
313    #[doc = r" Value of the field as raw bits"]
314    #[inline]
315    pub fn bit(&self) -> bool {
316        self.bits
317    }
318    #[doc = r" Returns `true` if the bit is clear (0)"]
319    #[inline]
320    pub fn bit_is_clear(&self) -> bool {
321        !self.bit()
322    }
323    #[doc = r" Returns `true` if the bit is set (1)"]
324    #[inline]
325    pub fn bit_is_set(&self) -> bool {
326        self.bit()
327    }
328}
329#[doc = r" Value of the field"]
330pub struct FER {
331    bits: bool,
332}
333impl FER {
334    #[doc = r" Value of the field as raw bits"]
335    #[inline]
336    pub fn bit(&self) -> bool {
337        self.bits
338    }
339    #[doc = r" Returns `true` if the bit is clear (0)"]
340    #[inline]
341    pub fn bit_is_clear(&self) -> bool {
342        !self.bit()
343    }
344    #[doc = r" Returns `true` if the bit is set (1)"]
345    #[inline]
346    pub fn bit_is_set(&self) -> bool {
347        self.bit()
348    }
349}
350#[doc = r" Value of the field"]
351pub struct PER {
352    bits: bool,
353}
354impl PER {
355    #[doc = r" Value of the field as raw bits"]
356    #[inline]
357    pub fn bit(&self) -> bool {
358        self.bits
359    }
360    #[doc = r" Returns `true` if the bit is clear (0)"]
361    #[inline]
362    pub fn bit_is_clear(&self) -> bool {
363        !self.bit()
364    }
365    #[doc = r" Returns `true` if the bit is set (1)"]
366    #[inline]
367    pub fn bit_is_set(&self) -> bool {
368        self.bit()
369    }
370}
371impl R {
372    #[doc = r" Value of the register as raw bits"]
373    #[inline]
374    pub fn bits(&self) -> u32 {
375        self.bits
376    }
377    #[doc = "Bit 22 - REACK"]
378    #[inline]
379    pub fn reack(&self) -> REACKR {
380        let bits = {
381            const MASK: bool = true;
382            const OFFSET: u8 = 22;
383            ((self.bits >> OFFSET) & MASK as u32) != 0
384        };
385        REACKR { bits }
386    }
387    #[doc = "Bit 21 - TEACK"]
388    #[inline]
389    pub fn teack(&self) -> TEACKR {
390        let bits = {
391            const MASK: bool = true;
392            const OFFSET: u8 = 21;
393            ((self.bits >> OFFSET) & MASK as u32) != 0
394        };
395        TEACKR { bits }
396    }
397    #[doc = "Bit 20 - WUF"]
398    #[inline]
399    pub fn wuf(&self) -> WUFR {
400        let bits = {
401            const MASK: bool = true;
402            const OFFSET: u8 = 20;
403            ((self.bits >> OFFSET) & MASK as u32) != 0
404        };
405        WUFR { bits }
406    }
407    #[doc = "Bit 19 - RWU"]
408    #[inline]
409    pub fn rwu(&self) -> RWUR {
410        let bits = {
411            const MASK: bool = true;
412            const OFFSET: u8 = 19;
413            ((self.bits >> OFFSET) & MASK as u32) != 0
414        };
415        RWUR { bits }
416    }
417    #[doc = "Bit 18 - SBKF"]
418    #[inline]
419    pub fn sbkf(&self) -> SBKFR {
420        let bits = {
421            const MASK: bool = true;
422            const OFFSET: u8 = 18;
423            ((self.bits >> OFFSET) & MASK as u32) != 0
424        };
425        SBKFR { bits }
426    }
427    #[doc = "Bit 17 - CMF"]
428    #[inline]
429    pub fn cmf(&self) -> CMFR {
430        let bits = {
431            const MASK: bool = true;
432            const OFFSET: u8 = 17;
433            ((self.bits >> OFFSET) & MASK as u32) != 0
434        };
435        CMFR { bits }
436    }
437    #[doc = "Bit 16 - BUSY"]
438    #[inline]
439    pub fn busy(&self) -> BUSYR {
440        let bits = {
441            const MASK: bool = true;
442            const OFFSET: u8 = 16;
443            ((self.bits >> OFFSET) & MASK as u32) != 0
444        };
445        BUSYR { bits }
446    }
447    #[doc = "Bit 10 - CTS"]
448    #[inline]
449    pub fn cts(&self) -> CTSR {
450        let bits = {
451            const MASK: bool = true;
452            const OFFSET: u8 = 10;
453            ((self.bits >> OFFSET) & MASK as u32) != 0
454        };
455        CTSR { bits }
456    }
457    #[doc = "Bit 9 - CTSIF"]
458    #[inline]
459    pub fn ctsif(&self) -> CTSIFR {
460        let bits = {
461            const MASK: bool = true;
462            const OFFSET: u8 = 9;
463            ((self.bits >> OFFSET) & MASK as u32) != 0
464        };
465        CTSIFR { bits }
466    }
467    #[doc = "Bit 7 - TXE"]
468    #[inline]
469    pub fn txe(&self) -> TXER {
470        let bits = {
471            const MASK: bool = true;
472            const OFFSET: u8 = 7;
473            ((self.bits >> OFFSET) & MASK as u32) != 0
474        };
475        TXER { bits }
476    }
477    #[doc = "Bit 6 - TC"]
478    #[inline]
479    pub fn tc(&self) -> TCR {
480        let bits = {
481            const MASK: bool = true;
482            const OFFSET: u8 = 6;
483            ((self.bits >> OFFSET) & MASK as u32) != 0
484        };
485        TCR { bits }
486    }
487    #[doc = "Bit 5 - RXNE"]
488    #[inline]
489    pub fn rxne(&self) -> RXNER {
490        let bits = {
491            const MASK: bool = true;
492            const OFFSET: u8 = 5;
493            ((self.bits >> OFFSET) & MASK as u32) != 0
494        };
495        RXNER { bits }
496    }
497    #[doc = "Bit 4 - IDLE"]
498    #[inline]
499    pub fn idle(&self) -> IDLER {
500        let bits = {
501            const MASK: bool = true;
502            const OFFSET: u8 = 4;
503            ((self.bits >> OFFSET) & MASK as u32) != 0
504        };
505        IDLER { bits }
506    }
507    #[doc = "Bit 3 - ORE"]
508    #[inline]
509    pub fn ore(&self) -> ORER {
510        let bits = {
511            const MASK: bool = true;
512            const OFFSET: u8 = 3;
513            ((self.bits >> OFFSET) & MASK as u32) != 0
514        };
515        ORER { bits }
516    }
517    #[doc = "Bit 2 - NF"]
518    #[inline]
519    pub fn nf(&self) -> NFR {
520        let bits = {
521            const MASK: bool = true;
522            const OFFSET: u8 = 2;
523            ((self.bits >> OFFSET) & MASK as u32) != 0
524        };
525        NFR { bits }
526    }
527    #[doc = "Bit 1 - FE"]
528    #[inline]
529    pub fn fe(&self) -> FER {
530        let bits = {
531            const MASK: bool = true;
532            const OFFSET: u8 = 1;
533            ((self.bits >> OFFSET) & MASK as u32) != 0
534        };
535        FER { bits }
536    }
537    #[doc = "Bit 0 - PE"]
538    #[inline]
539    pub fn pe(&self) -> PER {
540        let bits = {
541            const MASK: bool = true;
542            const OFFSET: u8 = 0;
543            ((self.bits >> OFFSET) & MASK as u32) != 0
544        };
545        PER { bits }
546    }
547}