s32k118_pac/lpspi0/
sr.rs

1#[doc = "Register `SR` reader"]
2pub struct R(crate::R<SR_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<SR_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<SR_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<SR_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `SR` writer"]
17pub struct W(crate::W<SR_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<SR_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<SR_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<SR_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Transmit Data Flag\n\nValue on reset: 1"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39pub enum TDF_A {
40    #[doc = "0: Transmit data not requested."]
41    _0 = 0,
42    #[doc = "1: Transmit data is requested."]
43    _1 = 1,
44}
45impl From<TDF_A> for bool {
46    #[inline(always)]
47    fn from(variant: TDF_A) -> Self {
48        variant as u8 != 0
49    }
50}
51#[doc = "Field `TDF` reader - Transmit Data Flag"]
52pub struct TDF_R(crate::FieldReader<bool, TDF_A>);
53impl TDF_R {
54    #[inline(always)]
55    pub(crate) fn new(bits: bool) -> Self {
56        TDF_R(crate::FieldReader::new(bits))
57    }
58    #[doc = r"Get enumerated values variant"]
59    #[inline(always)]
60    pub fn variant(&self) -> TDF_A {
61        match self.bits {
62            false => TDF_A::_0,
63            true => TDF_A::_1,
64        }
65    }
66    #[doc = "Checks if the value of the field is `_0`"]
67    #[inline(always)]
68    pub fn is_0(&self) -> bool {
69        **self == TDF_A::_0
70    }
71    #[doc = "Checks if the value of the field is `_1`"]
72    #[inline(always)]
73    pub fn is_1(&self) -> bool {
74        **self == TDF_A::_1
75    }
76}
77impl core::ops::Deref for TDF_R {
78    type Target = crate::FieldReader<bool, TDF_A>;
79    #[inline(always)]
80    fn deref(&self) -> &Self::Target {
81        &self.0
82    }
83}
84#[doc = "Receive Data Flag\n\nValue on reset: 0"]
85#[derive(Clone, Copy, Debug, PartialEq)]
86pub enum RDF_A {
87    #[doc = "0: Receive Data is not ready."]
88    _0 = 0,
89    #[doc = "1: Receive data is ready."]
90    _1 = 1,
91}
92impl From<RDF_A> for bool {
93    #[inline(always)]
94    fn from(variant: RDF_A) -> Self {
95        variant as u8 != 0
96    }
97}
98#[doc = "Field `RDF` reader - Receive Data Flag"]
99pub struct RDF_R(crate::FieldReader<bool, RDF_A>);
100impl RDF_R {
101    #[inline(always)]
102    pub(crate) fn new(bits: bool) -> Self {
103        RDF_R(crate::FieldReader::new(bits))
104    }
105    #[doc = r"Get enumerated values variant"]
106    #[inline(always)]
107    pub fn variant(&self) -> RDF_A {
108        match self.bits {
109            false => RDF_A::_0,
110            true => RDF_A::_1,
111        }
112    }
113    #[doc = "Checks if the value of the field is `_0`"]
114    #[inline(always)]
115    pub fn is_0(&self) -> bool {
116        **self == RDF_A::_0
117    }
118    #[doc = "Checks if the value of the field is `_1`"]
119    #[inline(always)]
120    pub fn is_1(&self) -> bool {
121        **self == RDF_A::_1
122    }
123}
124impl core::ops::Deref for RDF_R {
125    type Target = crate::FieldReader<bool, RDF_A>;
126    #[inline(always)]
127    fn deref(&self) -> &Self::Target {
128        &self.0
129    }
130}
131#[doc = "Word Complete Flag\n\nValue on reset: 0"]
132#[derive(Clone, Copy, Debug, PartialEq)]
133pub enum WCF_A {
134    #[doc = "0: Transfer word not completed."]
135    _0 = 0,
136    #[doc = "1: Transfer word completed."]
137    _1 = 1,
138}
139impl From<WCF_A> for bool {
140    #[inline(always)]
141    fn from(variant: WCF_A) -> Self {
142        variant as u8 != 0
143    }
144}
145#[doc = "Field `WCF` reader - Word Complete Flag"]
146pub struct WCF_R(crate::FieldReader<bool, WCF_A>);
147impl WCF_R {
148    #[inline(always)]
149    pub(crate) fn new(bits: bool) -> Self {
150        WCF_R(crate::FieldReader::new(bits))
151    }
152    #[doc = r"Get enumerated values variant"]
153    #[inline(always)]
154    pub fn variant(&self) -> WCF_A {
155        match self.bits {
156            false => WCF_A::_0,
157            true => WCF_A::_1,
158        }
159    }
160    #[doc = "Checks if the value of the field is `_0`"]
161    #[inline(always)]
162    pub fn is_0(&self) -> bool {
163        **self == WCF_A::_0
164    }
165    #[doc = "Checks if the value of the field is `_1`"]
166    #[inline(always)]
167    pub fn is_1(&self) -> bool {
168        **self == WCF_A::_1
169    }
170}
171impl core::ops::Deref for WCF_R {
172    type Target = crate::FieldReader<bool, WCF_A>;
173    #[inline(always)]
174    fn deref(&self) -> &Self::Target {
175        &self.0
176    }
177}
178#[doc = "Field `WCF` writer - Word Complete Flag"]
179pub struct WCF_W<'a> {
180    w: &'a mut W,
181}
182impl<'a> WCF_W<'a> {
183    #[doc = r"Writes `variant` to the field"]
184    #[inline(always)]
185    pub fn variant(self, variant: WCF_A) -> &'a mut W {
186        self.bit(variant.into())
187    }
188    #[doc = "Transfer word not completed."]
189    #[inline(always)]
190    pub fn _0(self) -> &'a mut W {
191        self.variant(WCF_A::_0)
192    }
193    #[doc = "Transfer word completed."]
194    #[inline(always)]
195    pub fn _1(self) -> &'a mut W {
196        self.variant(WCF_A::_1)
197    }
198    #[doc = r"Sets the field bit"]
199    #[inline(always)]
200    pub fn set_bit(self) -> &'a mut W {
201        self.bit(true)
202    }
203    #[doc = r"Clears the field bit"]
204    #[inline(always)]
205    pub fn clear_bit(self) -> &'a mut W {
206        self.bit(false)
207    }
208    #[doc = r"Writes raw bits to the field"]
209    #[inline(always)]
210    pub fn bit(self, value: bool) -> &'a mut W {
211        self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8);
212        self.w
213    }
214}
215#[doc = "Frame Complete Flag\n\nValue on reset: 0"]
216#[derive(Clone, Copy, Debug, PartialEq)]
217pub enum FCF_A {
218    #[doc = "0: Frame transfer has not completed."]
219    _0 = 0,
220    #[doc = "1: Frame transfer has completed."]
221    _1 = 1,
222}
223impl From<FCF_A> for bool {
224    #[inline(always)]
225    fn from(variant: FCF_A) -> Self {
226        variant as u8 != 0
227    }
228}
229#[doc = "Field `FCF` reader - Frame Complete Flag"]
230pub struct FCF_R(crate::FieldReader<bool, FCF_A>);
231impl FCF_R {
232    #[inline(always)]
233    pub(crate) fn new(bits: bool) -> Self {
234        FCF_R(crate::FieldReader::new(bits))
235    }
236    #[doc = r"Get enumerated values variant"]
237    #[inline(always)]
238    pub fn variant(&self) -> FCF_A {
239        match self.bits {
240            false => FCF_A::_0,
241            true => FCF_A::_1,
242        }
243    }
244    #[doc = "Checks if the value of the field is `_0`"]
245    #[inline(always)]
246    pub fn is_0(&self) -> bool {
247        **self == FCF_A::_0
248    }
249    #[doc = "Checks if the value of the field is `_1`"]
250    #[inline(always)]
251    pub fn is_1(&self) -> bool {
252        **self == FCF_A::_1
253    }
254}
255impl core::ops::Deref for FCF_R {
256    type Target = crate::FieldReader<bool, FCF_A>;
257    #[inline(always)]
258    fn deref(&self) -> &Self::Target {
259        &self.0
260    }
261}
262#[doc = "Field `FCF` writer - Frame Complete Flag"]
263pub struct FCF_W<'a> {
264    w: &'a mut W,
265}
266impl<'a> FCF_W<'a> {
267    #[doc = r"Writes `variant` to the field"]
268    #[inline(always)]
269    pub fn variant(self, variant: FCF_A) -> &'a mut W {
270        self.bit(variant.into())
271    }
272    #[doc = "Frame transfer has not completed."]
273    #[inline(always)]
274    pub fn _0(self) -> &'a mut W {
275        self.variant(FCF_A::_0)
276    }
277    #[doc = "Frame transfer has completed."]
278    #[inline(always)]
279    pub fn _1(self) -> &'a mut W {
280        self.variant(FCF_A::_1)
281    }
282    #[doc = r"Sets the field bit"]
283    #[inline(always)]
284    pub fn set_bit(self) -> &'a mut W {
285        self.bit(true)
286    }
287    #[doc = r"Clears the field bit"]
288    #[inline(always)]
289    pub fn clear_bit(self) -> &'a mut W {
290        self.bit(false)
291    }
292    #[doc = r"Writes raw bits to the field"]
293    #[inline(always)]
294    pub fn bit(self, value: bool) -> &'a mut W {
295        self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9);
296        self.w
297    }
298}
299#[doc = "Transfer Complete Flag\n\nValue on reset: 0"]
300#[derive(Clone, Copy, Debug, PartialEq)]
301pub enum TCF_A {
302    #[doc = "0: All transfers have not completed."]
303    _0 = 0,
304    #[doc = "1: All transfers have completed."]
305    _1 = 1,
306}
307impl From<TCF_A> for bool {
308    #[inline(always)]
309    fn from(variant: TCF_A) -> Self {
310        variant as u8 != 0
311    }
312}
313#[doc = "Field `TCF` reader - Transfer Complete Flag"]
314pub struct TCF_R(crate::FieldReader<bool, TCF_A>);
315impl TCF_R {
316    #[inline(always)]
317    pub(crate) fn new(bits: bool) -> Self {
318        TCF_R(crate::FieldReader::new(bits))
319    }
320    #[doc = r"Get enumerated values variant"]
321    #[inline(always)]
322    pub fn variant(&self) -> TCF_A {
323        match self.bits {
324            false => TCF_A::_0,
325            true => TCF_A::_1,
326        }
327    }
328    #[doc = "Checks if the value of the field is `_0`"]
329    #[inline(always)]
330    pub fn is_0(&self) -> bool {
331        **self == TCF_A::_0
332    }
333    #[doc = "Checks if the value of the field is `_1`"]
334    #[inline(always)]
335    pub fn is_1(&self) -> bool {
336        **self == TCF_A::_1
337    }
338}
339impl core::ops::Deref for TCF_R {
340    type Target = crate::FieldReader<bool, TCF_A>;
341    #[inline(always)]
342    fn deref(&self) -> &Self::Target {
343        &self.0
344    }
345}
346#[doc = "Field `TCF` writer - Transfer Complete Flag"]
347pub struct TCF_W<'a> {
348    w: &'a mut W,
349}
350impl<'a> TCF_W<'a> {
351    #[doc = r"Writes `variant` to the field"]
352    #[inline(always)]
353    pub fn variant(self, variant: TCF_A) -> &'a mut W {
354        self.bit(variant.into())
355    }
356    #[doc = "All transfers have not completed."]
357    #[inline(always)]
358    pub fn _0(self) -> &'a mut W {
359        self.variant(TCF_A::_0)
360    }
361    #[doc = "All transfers have completed."]
362    #[inline(always)]
363    pub fn _1(self) -> &'a mut W {
364        self.variant(TCF_A::_1)
365    }
366    #[doc = r"Sets the field bit"]
367    #[inline(always)]
368    pub fn set_bit(self) -> &'a mut W {
369        self.bit(true)
370    }
371    #[doc = r"Clears the field bit"]
372    #[inline(always)]
373    pub fn clear_bit(self) -> &'a mut W {
374        self.bit(false)
375    }
376    #[doc = r"Writes raw bits to the field"]
377    #[inline(always)]
378    pub fn bit(self, value: bool) -> &'a mut W {
379        self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10);
380        self.w
381    }
382}
383#[doc = "Transmit Error Flag\n\nValue on reset: 0"]
384#[derive(Clone, Copy, Debug, PartialEq)]
385pub enum TEF_A {
386    #[doc = "0: Transmit FIFO underrun has not occurred."]
387    _0 = 0,
388    #[doc = "1: Transmit FIFO underrun has occurred"]
389    _1 = 1,
390}
391impl From<TEF_A> for bool {
392    #[inline(always)]
393    fn from(variant: TEF_A) -> Self {
394        variant as u8 != 0
395    }
396}
397#[doc = "Field `TEF` reader - Transmit Error Flag"]
398pub struct TEF_R(crate::FieldReader<bool, TEF_A>);
399impl TEF_R {
400    #[inline(always)]
401    pub(crate) fn new(bits: bool) -> Self {
402        TEF_R(crate::FieldReader::new(bits))
403    }
404    #[doc = r"Get enumerated values variant"]
405    #[inline(always)]
406    pub fn variant(&self) -> TEF_A {
407        match self.bits {
408            false => TEF_A::_0,
409            true => TEF_A::_1,
410        }
411    }
412    #[doc = "Checks if the value of the field is `_0`"]
413    #[inline(always)]
414    pub fn is_0(&self) -> bool {
415        **self == TEF_A::_0
416    }
417    #[doc = "Checks if the value of the field is `_1`"]
418    #[inline(always)]
419    pub fn is_1(&self) -> bool {
420        **self == TEF_A::_1
421    }
422}
423impl core::ops::Deref for TEF_R {
424    type Target = crate::FieldReader<bool, TEF_A>;
425    #[inline(always)]
426    fn deref(&self) -> &Self::Target {
427        &self.0
428    }
429}
430#[doc = "Field `TEF` writer - Transmit Error Flag"]
431pub struct TEF_W<'a> {
432    w: &'a mut W,
433}
434impl<'a> TEF_W<'a> {
435    #[doc = r"Writes `variant` to the field"]
436    #[inline(always)]
437    pub fn variant(self, variant: TEF_A) -> &'a mut W {
438        self.bit(variant.into())
439    }
440    #[doc = "Transmit FIFO underrun has not occurred."]
441    #[inline(always)]
442    pub fn _0(self) -> &'a mut W {
443        self.variant(TEF_A::_0)
444    }
445    #[doc = "Transmit FIFO underrun has occurred"]
446    #[inline(always)]
447    pub fn _1(self) -> &'a mut W {
448        self.variant(TEF_A::_1)
449    }
450    #[doc = r"Sets the field bit"]
451    #[inline(always)]
452    pub fn set_bit(self) -> &'a mut W {
453        self.bit(true)
454    }
455    #[doc = r"Clears the field bit"]
456    #[inline(always)]
457    pub fn clear_bit(self) -> &'a mut W {
458        self.bit(false)
459    }
460    #[doc = r"Writes raw bits to the field"]
461    #[inline(always)]
462    pub fn bit(self, value: bool) -> &'a mut W {
463        self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11);
464        self.w
465    }
466}
467#[doc = "Receive Error Flag\n\nValue on reset: 0"]
468#[derive(Clone, Copy, Debug, PartialEq)]
469pub enum REF_A {
470    #[doc = "0: Receive FIFO has not overflowed."]
471    _0 = 0,
472    #[doc = "1: Receive FIFO has overflowed."]
473    _1 = 1,
474}
475impl From<REF_A> for bool {
476    #[inline(always)]
477    fn from(variant: REF_A) -> Self {
478        variant as u8 != 0
479    }
480}
481#[doc = "Field `REF` reader - Receive Error Flag"]
482pub struct REF_R(crate::FieldReader<bool, REF_A>);
483impl REF_R {
484    #[inline(always)]
485    pub(crate) fn new(bits: bool) -> Self {
486        REF_R(crate::FieldReader::new(bits))
487    }
488    #[doc = r"Get enumerated values variant"]
489    #[inline(always)]
490    pub fn variant(&self) -> REF_A {
491        match self.bits {
492            false => REF_A::_0,
493            true => REF_A::_1,
494        }
495    }
496    #[doc = "Checks if the value of the field is `_0`"]
497    #[inline(always)]
498    pub fn is_0(&self) -> bool {
499        **self == REF_A::_0
500    }
501    #[doc = "Checks if the value of the field is `_1`"]
502    #[inline(always)]
503    pub fn is_1(&self) -> bool {
504        **self == REF_A::_1
505    }
506}
507impl core::ops::Deref for REF_R {
508    type Target = crate::FieldReader<bool, REF_A>;
509    #[inline(always)]
510    fn deref(&self) -> &Self::Target {
511        &self.0
512    }
513}
514#[doc = "Field `REF` writer - Receive Error Flag"]
515pub struct REF_W<'a> {
516    w: &'a mut W,
517}
518impl<'a> REF_W<'a> {
519    #[doc = r"Writes `variant` to the field"]
520    #[inline(always)]
521    pub fn variant(self, variant: REF_A) -> &'a mut W {
522        self.bit(variant.into())
523    }
524    #[doc = "Receive FIFO has not overflowed."]
525    #[inline(always)]
526    pub fn _0(self) -> &'a mut W {
527        self.variant(REF_A::_0)
528    }
529    #[doc = "Receive FIFO has overflowed."]
530    #[inline(always)]
531    pub fn _1(self) -> &'a mut W {
532        self.variant(REF_A::_1)
533    }
534    #[doc = r"Sets the field bit"]
535    #[inline(always)]
536    pub fn set_bit(self) -> &'a mut W {
537        self.bit(true)
538    }
539    #[doc = r"Clears the field bit"]
540    #[inline(always)]
541    pub fn clear_bit(self) -> &'a mut W {
542        self.bit(false)
543    }
544    #[doc = r"Writes raw bits to the field"]
545    #[inline(always)]
546    pub fn bit(self, value: bool) -> &'a mut W {
547        self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12);
548        self.w
549    }
550}
551#[doc = "Data Match Flag\n\nValue on reset: 0"]
552#[derive(Clone, Copy, Debug, PartialEq)]
553pub enum DMF_A {
554    #[doc = "0: Have not received matching data."]
555    _0 = 0,
556    #[doc = "1: Have received matching data."]
557    _1 = 1,
558}
559impl From<DMF_A> for bool {
560    #[inline(always)]
561    fn from(variant: DMF_A) -> Self {
562        variant as u8 != 0
563    }
564}
565#[doc = "Field `DMF` reader - Data Match Flag"]
566pub struct DMF_R(crate::FieldReader<bool, DMF_A>);
567impl DMF_R {
568    #[inline(always)]
569    pub(crate) fn new(bits: bool) -> Self {
570        DMF_R(crate::FieldReader::new(bits))
571    }
572    #[doc = r"Get enumerated values variant"]
573    #[inline(always)]
574    pub fn variant(&self) -> DMF_A {
575        match self.bits {
576            false => DMF_A::_0,
577            true => DMF_A::_1,
578        }
579    }
580    #[doc = "Checks if the value of the field is `_0`"]
581    #[inline(always)]
582    pub fn is_0(&self) -> bool {
583        **self == DMF_A::_0
584    }
585    #[doc = "Checks if the value of the field is `_1`"]
586    #[inline(always)]
587    pub fn is_1(&self) -> bool {
588        **self == DMF_A::_1
589    }
590}
591impl core::ops::Deref for DMF_R {
592    type Target = crate::FieldReader<bool, DMF_A>;
593    #[inline(always)]
594    fn deref(&self) -> &Self::Target {
595        &self.0
596    }
597}
598#[doc = "Field `DMF` writer - Data Match Flag"]
599pub struct DMF_W<'a> {
600    w: &'a mut W,
601}
602impl<'a> DMF_W<'a> {
603    #[doc = r"Writes `variant` to the field"]
604    #[inline(always)]
605    pub fn variant(self, variant: DMF_A) -> &'a mut W {
606        self.bit(variant.into())
607    }
608    #[doc = "Have not received matching data."]
609    #[inline(always)]
610    pub fn _0(self) -> &'a mut W {
611        self.variant(DMF_A::_0)
612    }
613    #[doc = "Have received matching data."]
614    #[inline(always)]
615    pub fn _1(self) -> &'a mut W {
616        self.variant(DMF_A::_1)
617    }
618    #[doc = r"Sets the field bit"]
619    #[inline(always)]
620    pub fn set_bit(self) -> &'a mut W {
621        self.bit(true)
622    }
623    #[doc = r"Clears the field bit"]
624    #[inline(always)]
625    pub fn clear_bit(self) -> &'a mut W {
626        self.bit(false)
627    }
628    #[doc = r"Writes raw bits to the field"]
629    #[inline(always)]
630    pub fn bit(self, value: bool) -> &'a mut W {
631        self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13);
632        self.w
633    }
634}
635#[doc = "Module Busy Flag\n\nValue on reset: 0"]
636#[derive(Clone, Copy, Debug, PartialEq)]
637pub enum MBF_A {
638    #[doc = "0: LPSPI is idle."]
639    _0 = 0,
640    #[doc = "1: LPSPI is busy."]
641    _1 = 1,
642}
643impl From<MBF_A> for bool {
644    #[inline(always)]
645    fn from(variant: MBF_A) -> Self {
646        variant as u8 != 0
647    }
648}
649#[doc = "Field `MBF` reader - Module Busy Flag"]
650pub struct MBF_R(crate::FieldReader<bool, MBF_A>);
651impl MBF_R {
652    #[inline(always)]
653    pub(crate) fn new(bits: bool) -> Self {
654        MBF_R(crate::FieldReader::new(bits))
655    }
656    #[doc = r"Get enumerated values variant"]
657    #[inline(always)]
658    pub fn variant(&self) -> MBF_A {
659        match self.bits {
660            false => MBF_A::_0,
661            true => MBF_A::_1,
662        }
663    }
664    #[doc = "Checks if the value of the field is `_0`"]
665    #[inline(always)]
666    pub fn is_0(&self) -> bool {
667        **self == MBF_A::_0
668    }
669    #[doc = "Checks if the value of the field is `_1`"]
670    #[inline(always)]
671    pub fn is_1(&self) -> bool {
672        **self == MBF_A::_1
673    }
674}
675impl core::ops::Deref for MBF_R {
676    type Target = crate::FieldReader<bool, MBF_A>;
677    #[inline(always)]
678    fn deref(&self) -> &Self::Target {
679        &self.0
680    }
681}
682impl R {
683    #[doc = "Bit 0 - Transmit Data Flag"]
684    #[inline(always)]
685    pub fn tdf(&self) -> TDF_R {
686        TDF_R::new((self.bits & 0x01) != 0)
687    }
688    #[doc = "Bit 1 - Receive Data Flag"]
689    #[inline(always)]
690    pub fn rdf(&self) -> RDF_R {
691        RDF_R::new(((self.bits >> 1) & 0x01) != 0)
692    }
693    #[doc = "Bit 8 - Word Complete Flag"]
694    #[inline(always)]
695    pub fn wcf(&self) -> WCF_R {
696        WCF_R::new(((self.bits >> 8) & 0x01) != 0)
697    }
698    #[doc = "Bit 9 - Frame Complete Flag"]
699    #[inline(always)]
700    pub fn fcf(&self) -> FCF_R {
701        FCF_R::new(((self.bits >> 9) & 0x01) != 0)
702    }
703    #[doc = "Bit 10 - Transfer Complete Flag"]
704    #[inline(always)]
705    pub fn tcf(&self) -> TCF_R {
706        TCF_R::new(((self.bits >> 10) & 0x01) != 0)
707    }
708    #[doc = "Bit 11 - Transmit Error Flag"]
709    #[inline(always)]
710    pub fn tef(&self) -> TEF_R {
711        TEF_R::new(((self.bits >> 11) & 0x01) != 0)
712    }
713    #[doc = "Bit 12 - Receive Error Flag"]
714    #[inline(always)]
715    pub fn ref_(&self) -> REF_R {
716        REF_R::new(((self.bits >> 12) & 0x01) != 0)
717    }
718    #[doc = "Bit 13 - Data Match Flag"]
719    #[inline(always)]
720    pub fn dmf(&self) -> DMF_R {
721        DMF_R::new(((self.bits >> 13) & 0x01) != 0)
722    }
723    #[doc = "Bit 24 - Module Busy Flag"]
724    #[inline(always)]
725    pub fn mbf(&self) -> MBF_R {
726        MBF_R::new(((self.bits >> 24) & 0x01) != 0)
727    }
728}
729impl W {
730    #[doc = "Bit 8 - Word Complete Flag"]
731    #[inline(always)]
732    pub fn wcf(&mut self) -> WCF_W {
733        WCF_W { w: self }
734    }
735    #[doc = "Bit 9 - Frame Complete Flag"]
736    #[inline(always)]
737    pub fn fcf(&mut self) -> FCF_W {
738        FCF_W { w: self }
739    }
740    #[doc = "Bit 10 - Transfer Complete Flag"]
741    #[inline(always)]
742    pub fn tcf(&mut self) -> TCF_W {
743        TCF_W { w: self }
744    }
745    #[doc = "Bit 11 - Transmit Error Flag"]
746    #[inline(always)]
747    pub fn tef(&mut self) -> TEF_W {
748        TEF_W { w: self }
749    }
750    #[doc = "Bit 12 - Receive Error Flag"]
751    #[inline(always)]
752    pub fn ref_(&mut self) -> REF_W {
753        REF_W { w: self }
754    }
755    #[doc = "Bit 13 - Data Match Flag"]
756    #[inline(always)]
757    pub fn dmf(&mut self) -> DMF_W {
758        DMF_W { w: self }
759    }
760    #[doc = "Writes raw bits to the register."]
761    #[inline(always)]
762    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
763        self.0.bits(bits);
764        self
765    }
766}
767#[doc = "Status 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 [sr](index.html) module"]
768pub struct SR_SPEC;
769impl crate::RegisterSpec for SR_SPEC {
770    type Ux = u32;
771}
772#[doc = "`read()` method returns [sr::R](R) reader structure"]
773impl crate::Readable for SR_SPEC {
774    type Reader = R;
775}
776#[doc = "`write(|w| ..)` method takes [sr::W](W) writer structure"]
777impl crate::Writable for SR_SPEC {
778    type Writer = W;
779}
780#[doc = "`reset()` method sets SR to value 0x01"]
781impl crate::Resettable for SR_SPEC {
782    #[inline(always)]
783    fn reset_value() -> Self::Ux {
784        0x01
785    }
786}