k66/spi1/
sr.rs

1#[doc = r" Value read from the register"]
2pub struct R {
3    bits: u32,
4}
5#[doc = r" Value to write to the register"]
6pub struct W {
7    bits: u32,
8}
9impl super::SR {
10    #[doc = r" Modifies the contents of the register"]
11    #[inline]
12    pub fn modify<F>(&self, f: F)
13    where
14        for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
15    {
16        let bits = self.register.get();
17        let r = R { bits: bits };
18        let mut w = W { bits: bits };
19        f(&r, &mut w);
20        self.register.set(w.bits);
21    }
22    #[doc = r" Reads the contents of the register"]
23    #[inline]
24    pub fn read(&self) -> R {
25        R {
26            bits: self.register.get(),
27        }
28    }
29    #[doc = r" Writes to the register"]
30    #[inline]
31    pub fn write<F>(&self, f: F)
32    where
33        F: FnOnce(&mut W) -> &mut W,
34    {
35        let mut w = W::reset_value();
36        f(&mut w);
37        self.register.set(w.bits);
38    }
39    #[doc = r" Writes the reset value to the register"]
40    #[inline]
41    pub fn reset(&self) {
42        self.write(|w| w)
43    }
44}
45#[doc = r" Value of the field"]
46pub struct POPNXTPTRR {
47    bits: u8,
48}
49impl POPNXTPTRR {
50    #[doc = r" Value of the field as raw bits"]
51    #[inline]
52    pub fn bits(&self) -> u8 {
53        self.bits
54    }
55}
56#[doc = r" Value of the field"]
57pub struct RXCTRR {
58    bits: u8,
59}
60impl RXCTRR {
61    #[doc = r" Value of the field as raw bits"]
62    #[inline]
63    pub fn bits(&self) -> u8 {
64        self.bits
65    }
66}
67#[doc = r" Value of the field"]
68pub struct TXNXTPTRR {
69    bits: u8,
70}
71impl TXNXTPTRR {
72    #[doc = r" Value of the field as raw bits"]
73    #[inline]
74    pub fn bits(&self) -> u8 {
75        self.bits
76    }
77}
78#[doc = r" Value of the field"]
79pub struct TXCTRR {
80    bits: u8,
81}
82impl TXCTRR {
83    #[doc = r" Value of the field as raw bits"]
84    #[inline]
85    pub fn bits(&self) -> u8 {
86        self.bits
87    }
88}
89#[doc = "Possible values of the field `RFDF`"]
90#[derive(Clone, Copy, Debug, PartialEq)]
91pub enum RFDFR {
92    #[doc = "RX FIFO is empty."]
93    _0,
94    #[doc = "RX FIFO is not empty."]
95    _1,
96}
97impl RFDFR {
98    #[doc = r" Returns `true` if the bit is clear (0)"]
99    #[inline]
100    pub fn bit_is_clear(&self) -> bool {
101        !self.bit()
102    }
103    #[doc = r" Returns `true` if the bit is set (1)"]
104    #[inline]
105    pub fn bit_is_set(&self) -> bool {
106        self.bit()
107    }
108    #[doc = r" Value of the field as raw bits"]
109    #[inline]
110    pub fn bit(&self) -> bool {
111        match *self {
112            RFDFR::_0 => false,
113            RFDFR::_1 => true,
114        }
115    }
116    #[allow(missing_docs)]
117    #[doc(hidden)]
118    #[inline]
119    pub fn _from(value: bool) -> RFDFR {
120        match value {
121            false => RFDFR::_0,
122            true => RFDFR::_1,
123        }
124    }
125    #[doc = "Checks if the value of the field is `_0`"]
126    #[inline]
127    pub fn is_0(&self) -> bool {
128        *self == RFDFR::_0
129    }
130    #[doc = "Checks if the value of the field is `_1`"]
131    #[inline]
132    pub fn is_1(&self) -> bool {
133        *self == RFDFR::_1
134    }
135}
136#[doc = "Possible values of the field `RFOF`"]
137#[derive(Clone, Copy, Debug, PartialEq)]
138pub enum RFOFR {
139    #[doc = "No Rx FIFO overflow."]
140    _0,
141    #[doc = "Rx FIFO overflow has occurred."]
142    _1,
143}
144impl RFOFR {
145    #[doc = r" Returns `true` if the bit is clear (0)"]
146    #[inline]
147    pub fn bit_is_clear(&self) -> bool {
148        !self.bit()
149    }
150    #[doc = r" Returns `true` if the bit is set (1)"]
151    #[inline]
152    pub fn bit_is_set(&self) -> bool {
153        self.bit()
154    }
155    #[doc = r" Value of the field as raw bits"]
156    #[inline]
157    pub fn bit(&self) -> bool {
158        match *self {
159            RFOFR::_0 => false,
160            RFOFR::_1 => true,
161        }
162    }
163    #[allow(missing_docs)]
164    #[doc(hidden)]
165    #[inline]
166    pub fn _from(value: bool) -> RFOFR {
167        match value {
168            false => RFOFR::_0,
169            true => RFOFR::_1,
170        }
171    }
172    #[doc = "Checks if the value of the field is `_0`"]
173    #[inline]
174    pub fn is_0(&self) -> bool {
175        *self == RFOFR::_0
176    }
177    #[doc = "Checks if the value of the field is `_1`"]
178    #[inline]
179    pub fn is_1(&self) -> bool {
180        *self == RFOFR::_1
181    }
182}
183#[doc = "Possible values of the field `TFFF`"]
184#[derive(Clone, Copy, Debug, PartialEq)]
185pub enum TFFFR {
186    #[doc = "TX FIFO is full."]
187    _0,
188    #[doc = "TX FIFO is not full."]
189    _1,
190}
191impl TFFFR {
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    #[doc = r" Value of the field as raw bits"]
203    #[inline]
204    pub fn bit(&self) -> bool {
205        match *self {
206            TFFFR::_0 => false,
207            TFFFR::_1 => true,
208        }
209    }
210    #[allow(missing_docs)]
211    #[doc(hidden)]
212    #[inline]
213    pub fn _from(value: bool) -> TFFFR {
214        match value {
215            false => TFFFR::_0,
216            true => TFFFR::_1,
217        }
218    }
219    #[doc = "Checks if the value of the field is `_0`"]
220    #[inline]
221    pub fn is_0(&self) -> bool {
222        *self == TFFFR::_0
223    }
224    #[doc = "Checks if the value of the field is `_1`"]
225    #[inline]
226    pub fn is_1(&self) -> bool {
227        *self == TFFFR::_1
228    }
229}
230#[doc = "Possible values of the field `TFUF`"]
231#[derive(Clone, Copy, Debug, PartialEq)]
232pub enum TFUFR {
233    #[doc = "No TX FIFO underflow."]
234    _0,
235    #[doc = "TX FIFO underflow has occurred."]
236    _1,
237}
238impl TFUFR {
239    #[doc = r" Returns `true` if the bit is clear (0)"]
240    #[inline]
241    pub fn bit_is_clear(&self) -> bool {
242        !self.bit()
243    }
244    #[doc = r" Returns `true` if the bit is set (1)"]
245    #[inline]
246    pub fn bit_is_set(&self) -> bool {
247        self.bit()
248    }
249    #[doc = r" Value of the field as raw bits"]
250    #[inline]
251    pub fn bit(&self) -> bool {
252        match *self {
253            TFUFR::_0 => false,
254            TFUFR::_1 => true,
255        }
256    }
257    #[allow(missing_docs)]
258    #[doc(hidden)]
259    #[inline]
260    pub fn _from(value: bool) -> TFUFR {
261        match value {
262            false => TFUFR::_0,
263            true => TFUFR::_1,
264        }
265    }
266    #[doc = "Checks if the value of the field is `_0`"]
267    #[inline]
268    pub fn is_0(&self) -> bool {
269        *self == TFUFR::_0
270    }
271    #[doc = "Checks if the value of the field is `_1`"]
272    #[inline]
273    pub fn is_1(&self) -> bool {
274        *self == TFUFR::_1
275    }
276}
277#[doc = "Possible values of the field `EOQF`"]
278#[derive(Clone, Copy, Debug, PartialEq)]
279pub enum EOQFR {
280    #[doc = "EOQ is not set in the executing command."]
281    _0,
282    #[doc = "EOQ is set in the executing SPI command."]
283    _1,
284}
285impl EOQFR {
286    #[doc = r" Returns `true` if the bit is clear (0)"]
287    #[inline]
288    pub fn bit_is_clear(&self) -> bool {
289        !self.bit()
290    }
291    #[doc = r" Returns `true` if the bit is set (1)"]
292    #[inline]
293    pub fn bit_is_set(&self) -> bool {
294        self.bit()
295    }
296    #[doc = r" Value of the field as raw bits"]
297    #[inline]
298    pub fn bit(&self) -> bool {
299        match *self {
300            EOQFR::_0 => false,
301            EOQFR::_1 => true,
302        }
303    }
304    #[allow(missing_docs)]
305    #[doc(hidden)]
306    #[inline]
307    pub fn _from(value: bool) -> EOQFR {
308        match value {
309            false => EOQFR::_0,
310            true => EOQFR::_1,
311        }
312    }
313    #[doc = "Checks if the value of the field is `_0`"]
314    #[inline]
315    pub fn is_0(&self) -> bool {
316        *self == EOQFR::_0
317    }
318    #[doc = "Checks if the value of the field is `_1`"]
319    #[inline]
320    pub fn is_1(&self) -> bool {
321        *self == EOQFR::_1
322    }
323}
324#[doc = "Possible values of the field `TXRXS`"]
325#[derive(Clone, Copy, Debug, PartialEq)]
326pub enum TXRXSR {
327    #[doc = "Transmit and receive operations are disabled (The module is in Stopped state)."]
328    _0,
329    #[doc = "Transmit and receive operations are enabled (The module is in Running state)."]
330    _1,
331}
332impl TXRXSR {
333    #[doc = r" Returns `true` if the bit is clear (0)"]
334    #[inline]
335    pub fn bit_is_clear(&self) -> bool {
336        !self.bit()
337    }
338    #[doc = r" Returns `true` if the bit is set (1)"]
339    #[inline]
340    pub fn bit_is_set(&self) -> bool {
341        self.bit()
342    }
343    #[doc = r" Value of the field as raw bits"]
344    #[inline]
345    pub fn bit(&self) -> bool {
346        match *self {
347            TXRXSR::_0 => false,
348            TXRXSR::_1 => true,
349        }
350    }
351    #[allow(missing_docs)]
352    #[doc(hidden)]
353    #[inline]
354    pub fn _from(value: bool) -> TXRXSR {
355        match value {
356            false => TXRXSR::_0,
357            true => TXRXSR::_1,
358        }
359    }
360    #[doc = "Checks if the value of the field is `_0`"]
361    #[inline]
362    pub fn is_0(&self) -> bool {
363        *self == TXRXSR::_0
364    }
365    #[doc = "Checks if the value of the field is `_1`"]
366    #[inline]
367    pub fn is_1(&self) -> bool {
368        *self == TXRXSR::_1
369    }
370}
371#[doc = "Possible values of the field `TCF`"]
372#[derive(Clone, Copy, Debug, PartialEq)]
373pub enum TCFR {
374    #[doc = "Transfer not complete."]
375    _0,
376    #[doc = "Transfer complete."]
377    _1,
378}
379impl TCFR {
380    #[doc = r" Returns `true` if the bit is clear (0)"]
381    #[inline]
382    pub fn bit_is_clear(&self) -> bool {
383        !self.bit()
384    }
385    #[doc = r" Returns `true` if the bit is set (1)"]
386    #[inline]
387    pub fn bit_is_set(&self) -> bool {
388        self.bit()
389    }
390    #[doc = r" Value of the field as raw bits"]
391    #[inline]
392    pub fn bit(&self) -> bool {
393        match *self {
394            TCFR::_0 => false,
395            TCFR::_1 => true,
396        }
397    }
398    #[allow(missing_docs)]
399    #[doc(hidden)]
400    #[inline]
401    pub fn _from(value: bool) -> TCFR {
402        match value {
403            false => TCFR::_0,
404            true => TCFR::_1,
405        }
406    }
407    #[doc = "Checks if the value of the field is `_0`"]
408    #[inline]
409    pub fn is_0(&self) -> bool {
410        *self == TCFR::_0
411    }
412    #[doc = "Checks if the value of the field is `_1`"]
413    #[inline]
414    pub fn is_1(&self) -> bool {
415        *self == TCFR::_1
416    }
417}
418#[doc = "Values that can be written to the field `RFDF`"]
419pub enum RFDFW {
420    #[doc = "RX FIFO is empty."]
421    _0,
422    #[doc = "RX FIFO is not empty."]
423    _1,
424}
425impl RFDFW {
426    #[allow(missing_docs)]
427    #[doc(hidden)]
428    #[inline]
429    pub fn _bits(&self) -> bool {
430        match *self {
431            RFDFW::_0 => false,
432            RFDFW::_1 => true,
433        }
434    }
435}
436#[doc = r" Proxy"]
437pub struct _RFDFW<'a> {
438    w: &'a mut W,
439}
440impl<'a> _RFDFW<'a> {
441    #[doc = r" Writes `variant` to the field"]
442    #[inline]
443    pub fn variant(self, variant: RFDFW) -> &'a mut W {
444        {
445            self.bit(variant._bits())
446        }
447    }
448    #[doc = "RX FIFO is empty."]
449    #[inline]
450    pub fn _0(self) -> &'a mut W {
451        self.variant(RFDFW::_0)
452    }
453    #[doc = "RX FIFO is not empty."]
454    #[inline]
455    pub fn _1(self) -> &'a mut W {
456        self.variant(RFDFW::_1)
457    }
458    #[doc = r" Sets the field bit"]
459    pub fn set_bit(self) -> &'a mut W {
460        self.bit(true)
461    }
462    #[doc = r" Clears the field bit"]
463    pub fn clear_bit(self) -> &'a mut W {
464        self.bit(false)
465    }
466    #[doc = r" Writes raw bits to the field"]
467    #[inline]
468    pub fn bit(self, value: bool) -> &'a mut W {
469        const MASK: bool = true;
470        const OFFSET: u8 = 17;
471        self.w.bits &= !((MASK as u32) << OFFSET);
472        self.w.bits |= ((value & MASK) as u32) << OFFSET;
473        self.w
474    }
475}
476#[doc = "Values that can be written to the field `RFOF`"]
477pub enum RFOFW {
478    #[doc = "No Rx FIFO overflow."]
479    _0,
480    #[doc = "Rx FIFO overflow has occurred."]
481    _1,
482}
483impl RFOFW {
484    #[allow(missing_docs)]
485    #[doc(hidden)]
486    #[inline]
487    pub fn _bits(&self) -> bool {
488        match *self {
489            RFOFW::_0 => false,
490            RFOFW::_1 => true,
491        }
492    }
493}
494#[doc = r" Proxy"]
495pub struct _RFOFW<'a> {
496    w: &'a mut W,
497}
498impl<'a> _RFOFW<'a> {
499    #[doc = r" Writes `variant` to the field"]
500    #[inline]
501    pub fn variant(self, variant: RFOFW) -> &'a mut W {
502        {
503            self.bit(variant._bits())
504        }
505    }
506    #[doc = "No Rx FIFO overflow."]
507    #[inline]
508    pub fn _0(self) -> &'a mut W {
509        self.variant(RFOFW::_0)
510    }
511    #[doc = "Rx FIFO overflow has occurred."]
512    #[inline]
513    pub fn _1(self) -> &'a mut W {
514        self.variant(RFOFW::_1)
515    }
516    #[doc = r" Sets the field bit"]
517    pub fn set_bit(self) -> &'a mut W {
518        self.bit(true)
519    }
520    #[doc = r" Clears the field bit"]
521    pub fn clear_bit(self) -> &'a mut W {
522        self.bit(false)
523    }
524    #[doc = r" Writes raw bits to the field"]
525    #[inline]
526    pub fn bit(self, value: bool) -> &'a mut W {
527        const MASK: bool = true;
528        const OFFSET: u8 = 19;
529        self.w.bits &= !((MASK as u32) << OFFSET);
530        self.w.bits |= ((value & MASK) as u32) << OFFSET;
531        self.w
532    }
533}
534#[doc = "Values that can be written to the field `TFFF`"]
535pub enum TFFFW {
536    #[doc = "TX FIFO is full."]
537    _0,
538    #[doc = "TX FIFO is not full."]
539    _1,
540}
541impl TFFFW {
542    #[allow(missing_docs)]
543    #[doc(hidden)]
544    #[inline]
545    pub fn _bits(&self) -> bool {
546        match *self {
547            TFFFW::_0 => false,
548            TFFFW::_1 => true,
549        }
550    }
551}
552#[doc = r" Proxy"]
553pub struct _TFFFW<'a> {
554    w: &'a mut W,
555}
556impl<'a> _TFFFW<'a> {
557    #[doc = r" Writes `variant` to the field"]
558    #[inline]
559    pub fn variant(self, variant: TFFFW) -> &'a mut W {
560        {
561            self.bit(variant._bits())
562        }
563    }
564    #[doc = "TX FIFO is full."]
565    #[inline]
566    pub fn _0(self) -> &'a mut W {
567        self.variant(TFFFW::_0)
568    }
569    #[doc = "TX FIFO is not full."]
570    #[inline]
571    pub fn _1(self) -> &'a mut W {
572        self.variant(TFFFW::_1)
573    }
574    #[doc = r" Sets the field bit"]
575    pub fn set_bit(self) -> &'a mut W {
576        self.bit(true)
577    }
578    #[doc = r" Clears the field bit"]
579    pub fn clear_bit(self) -> &'a mut W {
580        self.bit(false)
581    }
582    #[doc = r" Writes raw bits to the field"]
583    #[inline]
584    pub fn bit(self, value: bool) -> &'a mut W {
585        const MASK: bool = true;
586        const OFFSET: u8 = 25;
587        self.w.bits &= !((MASK as u32) << OFFSET);
588        self.w.bits |= ((value & MASK) as u32) << OFFSET;
589        self.w
590    }
591}
592#[doc = "Values that can be written to the field `TFUF`"]
593pub enum TFUFW {
594    #[doc = "No TX FIFO underflow."]
595    _0,
596    #[doc = "TX FIFO underflow has occurred."]
597    _1,
598}
599impl TFUFW {
600    #[allow(missing_docs)]
601    #[doc(hidden)]
602    #[inline]
603    pub fn _bits(&self) -> bool {
604        match *self {
605            TFUFW::_0 => false,
606            TFUFW::_1 => true,
607        }
608    }
609}
610#[doc = r" Proxy"]
611pub struct _TFUFW<'a> {
612    w: &'a mut W,
613}
614impl<'a> _TFUFW<'a> {
615    #[doc = r" Writes `variant` to the field"]
616    #[inline]
617    pub fn variant(self, variant: TFUFW) -> &'a mut W {
618        {
619            self.bit(variant._bits())
620        }
621    }
622    #[doc = "No TX FIFO underflow."]
623    #[inline]
624    pub fn _0(self) -> &'a mut W {
625        self.variant(TFUFW::_0)
626    }
627    #[doc = "TX FIFO underflow has occurred."]
628    #[inline]
629    pub fn _1(self) -> &'a mut W {
630        self.variant(TFUFW::_1)
631    }
632    #[doc = r" Sets the field bit"]
633    pub fn set_bit(self) -> &'a mut W {
634        self.bit(true)
635    }
636    #[doc = r" Clears the field bit"]
637    pub fn clear_bit(self) -> &'a mut W {
638        self.bit(false)
639    }
640    #[doc = r" Writes raw bits to the field"]
641    #[inline]
642    pub fn bit(self, value: bool) -> &'a mut W {
643        const MASK: bool = true;
644        const OFFSET: u8 = 27;
645        self.w.bits &= !((MASK as u32) << OFFSET);
646        self.w.bits |= ((value & MASK) as u32) << OFFSET;
647        self.w
648    }
649}
650#[doc = "Values that can be written to the field `EOQF`"]
651pub enum EOQFW {
652    #[doc = "EOQ is not set in the executing command."]
653    _0,
654    #[doc = "EOQ is set in the executing SPI command."]
655    _1,
656}
657impl EOQFW {
658    #[allow(missing_docs)]
659    #[doc(hidden)]
660    #[inline]
661    pub fn _bits(&self) -> bool {
662        match *self {
663            EOQFW::_0 => false,
664            EOQFW::_1 => true,
665        }
666    }
667}
668#[doc = r" Proxy"]
669pub struct _EOQFW<'a> {
670    w: &'a mut W,
671}
672impl<'a> _EOQFW<'a> {
673    #[doc = r" Writes `variant` to the field"]
674    #[inline]
675    pub fn variant(self, variant: EOQFW) -> &'a mut W {
676        {
677            self.bit(variant._bits())
678        }
679    }
680    #[doc = "EOQ is not set in the executing command."]
681    #[inline]
682    pub fn _0(self) -> &'a mut W {
683        self.variant(EOQFW::_0)
684    }
685    #[doc = "EOQ is set in the executing SPI command."]
686    #[inline]
687    pub fn _1(self) -> &'a mut W {
688        self.variant(EOQFW::_1)
689    }
690    #[doc = r" Sets the field bit"]
691    pub fn set_bit(self) -> &'a mut W {
692        self.bit(true)
693    }
694    #[doc = r" Clears the field bit"]
695    pub fn clear_bit(self) -> &'a mut W {
696        self.bit(false)
697    }
698    #[doc = r" Writes raw bits to the field"]
699    #[inline]
700    pub fn bit(self, value: bool) -> &'a mut W {
701        const MASK: bool = true;
702        const OFFSET: u8 = 28;
703        self.w.bits &= !((MASK as u32) << OFFSET);
704        self.w.bits |= ((value & MASK) as u32) << OFFSET;
705        self.w
706    }
707}
708#[doc = "Values that can be written to the field `TXRXS`"]
709pub enum TXRXSW {
710    #[doc = "Transmit and receive operations are disabled (The module is in Stopped state)."]
711    _0,
712    #[doc = "Transmit and receive operations are enabled (The module is in Running state)."]
713    _1,
714}
715impl TXRXSW {
716    #[allow(missing_docs)]
717    #[doc(hidden)]
718    #[inline]
719    pub fn _bits(&self) -> bool {
720        match *self {
721            TXRXSW::_0 => false,
722            TXRXSW::_1 => true,
723        }
724    }
725}
726#[doc = r" Proxy"]
727pub struct _TXRXSW<'a> {
728    w: &'a mut W,
729}
730impl<'a> _TXRXSW<'a> {
731    #[doc = r" Writes `variant` to the field"]
732    #[inline]
733    pub fn variant(self, variant: TXRXSW) -> &'a mut W {
734        {
735            self.bit(variant._bits())
736        }
737    }
738    #[doc = "Transmit and receive operations are disabled (The module is in Stopped state)."]
739    #[inline]
740    pub fn _0(self) -> &'a mut W {
741        self.variant(TXRXSW::_0)
742    }
743    #[doc = "Transmit and receive operations are enabled (The module is in Running state)."]
744    #[inline]
745    pub fn _1(self) -> &'a mut W {
746        self.variant(TXRXSW::_1)
747    }
748    #[doc = r" Sets the field bit"]
749    pub fn set_bit(self) -> &'a mut W {
750        self.bit(true)
751    }
752    #[doc = r" Clears the field bit"]
753    pub fn clear_bit(self) -> &'a mut W {
754        self.bit(false)
755    }
756    #[doc = r" Writes raw bits to the field"]
757    #[inline]
758    pub fn bit(self, value: bool) -> &'a mut W {
759        const MASK: bool = true;
760        const OFFSET: u8 = 30;
761        self.w.bits &= !((MASK as u32) << OFFSET);
762        self.w.bits |= ((value & MASK) as u32) << OFFSET;
763        self.w
764    }
765}
766#[doc = "Values that can be written to the field `TCF`"]
767pub enum TCFW {
768    #[doc = "Transfer not complete."]
769    _0,
770    #[doc = "Transfer complete."]
771    _1,
772}
773impl TCFW {
774    #[allow(missing_docs)]
775    #[doc(hidden)]
776    #[inline]
777    pub fn _bits(&self) -> bool {
778        match *self {
779            TCFW::_0 => false,
780            TCFW::_1 => true,
781        }
782    }
783}
784#[doc = r" Proxy"]
785pub struct _TCFW<'a> {
786    w: &'a mut W,
787}
788impl<'a> _TCFW<'a> {
789    #[doc = r" Writes `variant` to the field"]
790    #[inline]
791    pub fn variant(self, variant: TCFW) -> &'a mut W {
792        {
793            self.bit(variant._bits())
794        }
795    }
796    #[doc = "Transfer not complete."]
797    #[inline]
798    pub fn _0(self) -> &'a mut W {
799        self.variant(TCFW::_0)
800    }
801    #[doc = "Transfer complete."]
802    #[inline]
803    pub fn _1(self) -> &'a mut W {
804        self.variant(TCFW::_1)
805    }
806    #[doc = r" Sets the field bit"]
807    pub fn set_bit(self) -> &'a mut W {
808        self.bit(true)
809    }
810    #[doc = r" Clears the field bit"]
811    pub fn clear_bit(self) -> &'a mut W {
812        self.bit(false)
813    }
814    #[doc = r" Writes raw bits to the field"]
815    #[inline]
816    pub fn bit(self, value: bool) -> &'a mut W {
817        const MASK: bool = true;
818        const OFFSET: u8 = 31;
819        self.w.bits &= !((MASK as u32) << OFFSET);
820        self.w.bits |= ((value & MASK) as u32) << OFFSET;
821        self.w
822    }
823}
824impl R {
825    #[doc = r" Value of the register as raw bits"]
826    #[inline]
827    pub fn bits(&self) -> u32 {
828        self.bits
829    }
830    #[doc = "Bits 0:3 - Pop Next Pointer"]
831    #[inline]
832    pub fn popnxtptr(&self) -> POPNXTPTRR {
833        let bits = {
834            const MASK: u8 = 15;
835            const OFFSET: u8 = 0;
836            ((self.bits >> OFFSET) & MASK as u32) as u8
837        };
838        POPNXTPTRR { bits }
839    }
840    #[doc = "Bits 4:7 - RX FIFO Counter"]
841    #[inline]
842    pub fn rxctr(&self) -> RXCTRR {
843        let bits = {
844            const MASK: u8 = 15;
845            const OFFSET: u8 = 4;
846            ((self.bits >> OFFSET) & MASK as u32) as u8
847        };
848        RXCTRR { bits }
849    }
850    #[doc = "Bits 8:11 - Transmit Next Pointer"]
851    #[inline]
852    pub fn txnxtptr(&self) -> TXNXTPTRR {
853        let bits = {
854            const MASK: u8 = 15;
855            const OFFSET: u8 = 8;
856            ((self.bits >> OFFSET) & MASK as u32) as u8
857        };
858        TXNXTPTRR { bits }
859    }
860    #[doc = "Bits 12:15 - TX FIFO Counter"]
861    #[inline]
862    pub fn txctr(&self) -> TXCTRR {
863        let bits = {
864            const MASK: u8 = 15;
865            const OFFSET: u8 = 12;
866            ((self.bits >> OFFSET) & MASK as u32) as u8
867        };
868        TXCTRR { bits }
869    }
870    #[doc = "Bit 17 - Receive FIFO Drain Flag"]
871    #[inline]
872    pub fn rfdf(&self) -> RFDFR {
873        RFDFR::_from({
874            const MASK: bool = true;
875            const OFFSET: u8 = 17;
876            ((self.bits >> OFFSET) & MASK as u32) != 0
877        })
878    }
879    #[doc = "Bit 19 - Receive FIFO Overflow Flag"]
880    #[inline]
881    pub fn rfof(&self) -> RFOFR {
882        RFOFR::_from({
883            const MASK: bool = true;
884            const OFFSET: u8 = 19;
885            ((self.bits >> OFFSET) & MASK as u32) != 0
886        })
887    }
888    #[doc = "Bit 25 - Transmit FIFO Fill Flag"]
889    #[inline]
890    pub fn tfff(&self) -> TFFFR {
891        TFFFR::_from({
892            const MASK: bool = true;
893            const OFFSET: u8 = 25;
894            ((self.bits >> OFFSET) & MASK as u32) != 0
895        })
896    }
897    #[doc = "Bit 27 - Transmit FIFO Underflow Flag"]
898    #[inline]
899    pub fn tfuf(&self) -> TFUFR {
900        TFUFR::_from({
901            const MASK: bool = true;
902            const OFFSET: u8 = 27;
903            ((self.bits >> OFFSET) & MASK as u32) != 0
904        })
905    }
906    #[doc = "Bit 28 - End of Queue Flag"]
907    #[inline]
908    pub fn eoqf(&self) -> EOQFR {
909        EOQFR::_from({
910            const MASK: bool = true;
911            const OFFSET: u8 = 28;
912            ((self.bits >> OFFSET) & MASK as u32) != 0
913        })
914    }
915    #[doc = "Bit 30 - TX and RX Status"]
916    #[inline]
917    pub fn txrxs(&self) -> TXRXSR {
918        TXRXSR::_from({
919            const MASK: bool = true;
920            const OFFSET: u8 = 30;
921            ((self.bits >> OFFSET) & MASK as u32) != 0
922        })
923    }
924    #[doc = "Bit 31 - Transfer Complete Flag"]
925    #[inline]
926    pub fn tcf(&self) -> TCFR {
927        TCFR::_from({
928            const MASK: bool = true;
929            const OFFSET: u8 = 31;
930            ((self.bits >> OFFSET) & MASK as u32) != 0
931        })
932    }
933}
934impl W {
935    #[doc = r" Reset value of the register"]
936    #[inline]
937    pub fn reset_value() -> W {
938        W { bits: 33554432 }
939    }
940    #[doc = r" Writes raw bits to the register"]
941    #[inline]
942    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
943        self.bits = bits;
944        self
945    }
946    #[doc = "Bit 17 - Receive FIFO Drain Flag"]
947    #[inline]
948    pub fn rfdf(&mut self) -> _RFDFW {
949        _RFDFW { w: self }
950    }
951    #[doc = "Bit 19 - Receive FIFO Overflow Flag"]
952    #[inline]
953    pub fn rfof(&mut self) -> _RFOFW {
954        _RFOFW { w: self }
955    }
956    #[doc = "Bit 25 - Transmit FIFO Fill Flag"]
957    #[inline]
958    pub fn tfff(&mut self) -> _TFFFW {
959        _TFFFW { w: self }
960    }
961    #[doc = "Bit 27 - Transmit FIFO Underflow Flag"]
962    #[inline]
963    pub fn tfuf(&mut self) -> _TFUFW {
964        _TFUFW { w: self }
965    }
966    #[doc = "Bit 28 - End of Queue Flag"]
967    #[inline]
968    pub fn eoqf(&mut self) -> _EOQFW {
969        _EOQFW { w: self }
970    }
971    #[doc = "Bit 30 - TX and RX Status"]
972    #[inline]
973    pub fn txrxs(&mut self) -> _TXRXSW {
974        _TXRXSW { w: self }
975    }
976    #[doc = "Bit 31 - Transfer Complete Flag"]
977    #[inline]
978    pub fn tcf(&mut self) -> _TCFW {
979        _TCFW { w: self }
980    }
981}