atsam4ls2c_pac/usart0/
spi_slave_mode_csr_spi.rs

1#[doc = "Register `CSR_SPI` reader"]
2pub struct R(crate::R<SPI_SLAVE_MODE_CSR_SPI_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<SPI_SLAVE_MODE_CSR_SPI_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<SPI_SLAVE_MODE_CSR_SPI_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<SPI_SLAVE_MODE_CSR_SPI_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `RXRDY` reader - Receiver Ready"]
17pub type RXRDY_R = crate::BitReader<RXRDYSELECT_A>;
18#[doc = "Receiver Ready\n\nValue on reset: 0"]
19#[derive(Clone, Copy, Debug, PartialEq, Eq)]
20pub enum RXRDYSELECT_A {
21    #[doc = "0: No complete character has been received since the last read of RHR or the receiver is disabled. If characters werebeing received when the receiver was disabled, RXRDY changes to 1 when the receiver is enabled"]
22    _0 = 0,
23    #[doc = "1: At least one complete character has been received and RHR has not yet been read"]
24    _1 = 1,
25}
26impl From<RXRDYSELECT_A> for bool {
27    #[inline(always)]
28    fn from(variant: RXRDYSELECT_A) -> Self {
29        variant as u8 != 0
30    }
31}
32impl RXRDY_R {
33    #[doc = "Get enumerated values variant"]
34    #[inline(always)]
35    pub fn variant(&self) -> RXRDYSELECT_A {
36        match self.bits {
37            false => RXRDYSELECT_A::_0,
38            true => RXRDYSELECT_A::_1,
39        }
40    }
41    #[doc = "Checks if the value of the field is `_0`"]
42    #[inline(always)]
43    pub fn is_0(&self) -> bool {
44        *self == RXRDYSELECT_A::_0
45    }
46    #[doc = "Checks if the value of the field is `_1`"]
47    #[inline(always)]
48    pub fn is_1(&self) -> bool {
49        *self == RXRDYSELECT_A::_1
50    }
51}
52#[doc = "Field `TXRDY` reader - Transmitter Ready"]
53pub type TXRDY_R = crate::BitReader<TXRDYSELECT_A>;
54#[doc = "Transmitter Ready\n\nValue on reset: 0"]
55#[derive(Clone, Copy, Debug, PartialEq, Eq)]
56pub enum TXRDYSELECT_A {
57    #[doc = "0: A character is in the THR waiting to be transferred to the Transmit Shift Register, or an STTBRK command has been requested, or the transmitter is disabled. As soon as the transmitter is enabled, TXRDY becomes 1"]
58    _0 = 0,
59    #[doc = "1: There is no character in the THR"]
60    _1 = 1,
61}
62impl From<TXRDYSELECT_A> for bool {
63    #[inline(always)]
64    fn from(variant: TXRDYSELECT_A) -> Self {
65        variant as u8 != 0
66    }
67}
68impl TXRDY_R {
69    #[doc = "Get enumerated values variant"]
70    #[inline(always)]
71    pub fn variant(&self) -> TXRDYSELECT_A {
72        match self.bits {
73            false => TXRDYSELECT_A::_0,
74            true => TXRDYSELECT_A::_1,
75        }
76    }
77    #[doc = "Checks if the value of the field is `_0`"]
78    #[inline(always)]
79    pub fn is_0(&self) -> bool {
80        *self == TXRDYSELECT_A::_0
81    }
82    #[doc = "Checks if the value of the field is `_1`"]
83    #[inline(always)]
84    pub fn is_1(&self) -> bool {
85        *self == TXRDYSELECT_A::_1
86    }
87}
88#[doc = "Field `RXBRK` reader - Break Received/End of Break"]
89pub type RXBRK_R = crate::BitReader<RXBRKSELECT_A>;
90#[doc = "Break Received/End of Break\n\nValue on reset: 0"]
91#[derive(Clone, Copy, Debug, PartialEq, Eq)]
92pub enum RXBRKSELECT_A {
93    #[doc = "0: No Break received or End of Break detected since the last RSTSTA"]
94    _0 = 0,
95    #[doc = "1: Break Received or End of Break detected since the last RSTSTA"]
96    _1 = 1,
97}
98impl From<RXBRKSELECT_A> for bool {
99    #[inline(always)]
100    fn from(variant: RXBRKSELECT_A) -> Self {
101        variant as u8 != 0
102    }
103}
104impl RXBRK_R {
105    #[doc = "Get enumerated values variant"]
106    #[inline(always)]
107    pub fn variant(&self) -> RXBRKSELECT_A {
108        match self.bits {
109            false => RXBRKSELECT_A::_0,
110            true => RXBRKSELECT_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 == RXBRKSELECT_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 == RXBRKSELECT_A::_1
122    }
123}
124#[doc = "Field `OVRE` reader - Overrun Error"]
125pub type OVRE_R = crate::BitReader<OVRESELECT_A>;
126#[doc = "Overrun Error\n\nValue on reset: 0"]
127#[derive(Clone, Copy, Debug, PartialEq, Eq)]
128pub enum OVRESELECT_A {
129    #[doc = "0: No overrun error has occurred since since the last RSTSTA"]
130    _0 = 0,
131    #[doc = "1: At least one overrun error has occurred since the last RSTSTA"]
132    _1 = 1,
133}
134impl From<OVRESELECT_A> for bool {
135    #[inline(always)]
136    fn from(variant: OVRESELECT_A) -> Self {
137        variant as u8 != 0
138    }
139}
140impl OVRE_R {
141    #[doc = "Get enumerated values variant"]
142    #[inline(always)]
143    pub fn variant(&self) -> OVRESELECT_A {
144        match self.bits {
145            false => OVRESELECT_A::_0,
146            true => OVRESELECT_A::_1,
147        }
148    }
149    #[doc = "Checks if the value of the field is `_0`"]
150    #[inline(always)]
151    pub fn is_0(&self) -> bool {
152        *self == OVRESELECT_A::_0
153    }
154    #[doc = "Checks if the value of the field is `_1`"]
155    #[inline(always)]
156    pub fn is_1(&self) -> bool {
157        *self == OVRESELECT_A::_1
158    }
159}
160#[doc = "Field `FRAME` reader - Framing Error"]
161pub type FRAME_R = crate::BitReader<FRAMESELECT_A>;
162#[doc = "Framing Error\n\nValue on reset: 0"]
163#[derive(Clone, Copy, Debug, PartialEq, Eq)]
164pub enum FRAMESELECT_A {
165    #[doc = "0: No stop bit has been detected low since the last RSTSTA"]
166    _0 = 0,
167    #[doc = "1: At least one stop bit has been detected low since the last RSTSTA"]
168    _1 = 1,
169}
170impl From<FRAMESELECT_A> for bool {
171    #[inline(always)]
172    fn from(variant: FRAMESELECT_A) -> Self {
173        variant as u8 != 0
174    }
175}
176impl FRAME_R {
177    #[doc = "Get enumerated values variant"]
178    #[inline(always)]
179    pub fn variant(&self) -> FRAMESELECT_A {
180        match self.bits {
181            false => FRAMESELECT_A::_0,
182            true => FRAMESELECT_A::_1,
183        }
184    }
185    #[doc = "Checks if the value of the field is `_0`"]
186    #[inline(always)]
187    pub fn is_0(&self) -> bool {
188        *self == FRAMESELECT_A::_0
189    }
190    #[doc = "Checks if the value of the field is `_1`"]
191    #[inline(always)]
192    pub fn is_1(&self) -> bool {
193        *self == FRAMESELECT_A::_1
194    }
195}
196#[doc = "Field `PARE` reader - Parity Error"]
197pub type PARE_R = crate::BitReader<PARESELECT_A>;
198#[doc = "Parity Error\n\nValue on reset: 0"]
199#[derive(Clone, Copy, Debug, PartialEq, Eq)]
200pub enum PARESELECT_A {
201    #[doc = "0: No parity error has been detected since the last RSTSTA"]
202    _0 = 0,
203    #[doc = "1: At least one parity error has been detected since the last RSTSTA"]
204    _1 = 1,
205}
206impl From<PARESELECT_A> for bool {
207    #[inline(always)]
208    fn from(variant: PARESELECT_A) -> Self {
209        variant as u8 != 0
210    }
211}
212impl PARE_R {
213    #[doc = "Get enumerated values variant"]
214    #[inline(always)]
215    pub fn variant(&self) -> PARESELECT_A {
216        match self.bits {
217            false => PARESELECT_A::_0,
218            true => PARESELECT_A::_1,
219        }
220    }
221    #[doc = "Checks if the value of the field is `_0`"]
222    #[inline(always)]
223    pub fn is_0(&self) -> bool {
224        *self == PARESELECT_A::_0
225    }
226    #[doc = "Checks if the value of the field is `_1`"]
227    #[inline(always)]
228    pub fn is_1(&self) -> bool {
229        *self == PARESELECT_A::_1
230    }
231}
232#[doc = "Field `TIMEOUT` reader - Receiver Time-out"]
233pub type TIMEOUT_R = crate::BitReader<TIMEOUTSELECT_A>;
234#[doc = "Receiver Time-out\n\nValue on reset: 0"]
235#[derive(Clone, Copy, Debug, PartialEq, Eq)]
236pub enum TIMEOUTSELECT_A {
237    #[doc = "0: There has not been a time-out since the last Start Time-out command or the Time-out Register is 0"]
238    _0 = 0,
239    #[doc = "1: There has been a time-out since the last Start Time-out command"]
240    _1 = 1,
241}
242impl From<TIMEOUTSELECT_A> for bool {
243    #[inline(always)]
244    fn from(variant: TIMEOUTSELECT_A) -> Self {
245        variant as u8 != 0
246    }
247}
248impl TIMEOUT_R {
249    #[doc = "Get enumerated values variant"]
250    #[inline(always)]
251    pub fn variant(&self) -> TIMEOUTSELECT_A {
252        match self.bits {
253            false => TIMEOUTSELECT_A::_0,
254            true => TIMEOUTSELECT_A::_1,
255        }
256    }
257    #[doc = "Checks if the value of the field is `_0`"]
258    #[inline(always)]
259    pub fn is_0(&self) -> bool {
260        *self == TIMEOUTSELECT_A::_0
261    }
262    #[doc = "Checks if the value of the field is `_1`"]
263    #[inline(always)]
264    pub fn is_1(&self) -> bool {
265        *self == TIMEOUTSELECT_A::_1
266    }
267}
268#[doc = "Field `TXEMPTY` reader - Transmitter Empty"]
269pub type TXEMPTY_R = crate::BitReader<TXEMPTYSELECT_A>;
270#[doc = "Transmitter Empty\n\nValue on reset: 0"]
271#[derive(Clone, Copy, Debug, PartialEq, Eq)]
272pub enum TXEMPTYSELECT_A {
273    #[doc = "0: There are characters in either THR or the Transmit Shift Register, or the transmitter is disabled"]
274    _0 = 0,
275    #[doc = "1: There is at least one character in either THR or the Transmit Shift Register"]
276    _1 = 1,
277}
278impl From<TXEMPTYSELECT_A> for bool {
279    #[inline(always)]
280    fn from(variant: TXEMPTYSELECT_A) -> Self {
281        variant as u8 != 0
282    }
283}
284impl TXEMPTY_R {
285    #[doc = "Get enumerated values variant"]
286    #[inline(always)]
287    pub fn variant(&self) -> TXEMPTYSELECT_A {
288        match self.bits {
289            false => TXEMPTYSELECT_A::_0,
290            true => TXEMPTYSELECT_A::_1,
291        }
292    }
293    #[doc = "Checks if the value of the field is `_0`"]
294    #[inline(always)]
295    pub fn is_0(&self) -> bool {
296        *self == TXEMPTYSELECT_A::_0
297    }
298    #[doc = "Checks if the value of the field is `_1`"]
299    #[inline(always)]
300    pub fn is_1(&self) -> bool {
301        *self == TXEMPTYSELECT_A::_1
302    }
303}
304#[doc = "Field `UNRE` reader - SPI Underrun Error"]
305pub type UNRE_R = crate::BitReader<UNRESELECT_A>;
306#[doc = "SPI Underrun Error\n\nValue on reset: 0"]
307#[derive(Clone, Copy, Debug, PartialEq, Eq)]
308pub enum UNRESELECT_A {
309    #[doc = "0: No SPI underrun error has occurred since the last RSTSTA"]
310    _0 = 0,
311    #[doc = "1: At least one SPI underrun error has occurred since the last RSTSTA"]
312    _1 = 1,
313}
314impl From<UNRESELECT_A> for bool {
315    #[inline(always)]
316    fn from(variant: UNRESELECT_A) -> Self {
317        variant as u8 != 0
318    }
319}
320impl UNRE_R {
321    #[doc = "Get enumerated values variant"]
322    #[inline(always)]
323    pub fn variant(&self) -> UNRESELECT_A {
324        match self.bits {
325            false => UNRESELECT_A::_0,
326            true => UNRESELECT_A::_1,
327        }
328    }
329    #[doc = "Checks if the value of the field is `_0`"]
330    #[inline(always)]
331    pub fn is_0(&self) -> bool {
332        *self == UNRESELECT_A::_0
333    }
334    #[doc = "Checks if the value of the field is `_1`"]
335    #[inline(always)]
336    pub fn is_1(&self) -> bool {
337        *self == UNRESELECT_A::_1
338    }
339}
340#[doc = "Field `TXBUFE` reader - Transmission Buffer Empty"]
341pub type TXBUFE_R = crate::BitReader<TXBUFESELECT_A>;
342#[doc = "Transmission Buffer Empty\n\nValue on reset: 0"]
343#[derive(Clone, Copy, Debug, PartialEq, Eq)]
344pub enum TXBUFESELECT_A {
345    #[doc = "0: The signal Buffer Empty from the Transmit PDC channel is inactive"]
346    _0 = 0,
347    #[doc = "1: The signal Buffer Empty from the Transmit PDC channel is active"]
348    _1 = 1,
349}
350impl From<TXBUFESELECT_A> for bool {
351    #[inline(always)]
352    fn from(variant: TXBUFESELECT_A) -> Self {
353        variant as u8 != 0
354    }
355}
356impl TXBUFE_R {
357    #[doc = "Get enumerated values variant"]
358    #[inline(always)]
359    pub fn variant(&self) -> TXBUFESELECT_A {
360        match self.bits {
361            false => TXBUFESELECT_A::_0,
362            true => TXBUFESELECT_A::_1,
363        }
364    }
365    #[doc = "Checks if the value of the field is `_0`"]
366    #[inline(always)]
367    pub fn is_0(&self) -> bool {
368        *self == TXBUFESELECT_A::_0
369    }
370    #[doc = "Checks if the value of the field is `_1`"]
371    #[inline(always)]
372    pub fn is_1(&self) -> bool {
373        *self == TXBUFESELECT_A::_1
374    }
375}
376#[doc = "Field `RXBUFF` reader - Reception Buffer Full"]
377pub type RXBUFF_R = crate::BitReader<RXBUFFSELECT_A>;
378#[doc = "Reception Buffer Full\n\nValue on reset: 0"]
379#[derive(Clone, Copy, Debug, PartialEq, Eq)]
380pub enum RXBUFFSELECT_A {
381    #[doc = "0: The signal Buffer Full from the Receive PDC channel is inactive"]
382    _0 = 0,
383    #[doc = "1: The signal Buffer Full from the Receive PDC channel is active"]
384    _1 = 1,
385}
386impl From<RXBUFFSELECT_A> for bool {
387    #[inline(always)]
388    fn from(variant: RXBUFFSELECT_A) -> Self {
389        variant as u8 != 0
390    }
391}
392impl RXBUFF_R {
393    #[doc = "Get enumerated values variant"]
394    #[inline(always)]
395    pub fn variant(&self) -> RXBUFFSELECT_A {
396        match self.bits {
397            false => RXBUFFSELECT_A::_0,
398            true => RXBUFFSELECT_A::_1,
399        }
400    }
401    #[doc = "Checks if the value of the field is `_0`"]
402    #[inline(always)]
403    pub fn is_0(&self) -> bool {
404        *self == RXBUFFSELECT_A::_0
405    }
406    #[doc = "Checks if the value of the field is `_1`"]
407    #[inline(always)]
408    pub fn is_1(&self) -> bool {
409        *self == RXBUFFSELECT_A::_1
410    }
411}
412#[doc = "Field `NACK` reader - Non Acknowledge"]
413pub type NACK_R = crate::BitReader<NACKSELECT_A>;
414#[doc = "Non Acknowledge\n\nValue on reset: 0"]
415#[derive(Clone, Copy, Debug, PartialEq, Eq)]
416pub enum NACKSELECT_A {
417    #[doc = "0: No Non Acknowledge has not been detected since the last RSTNACK"]
418    _0 = 0,
419    #[doc = "1: At least one Non Acknowledge has been detected since the last RSTNACK"]
420    _1 = 1,
421}
422impl From<NACKSELECT_A> for bool {
423    #[inline(always)]
424    fn from(variant: NACKSELECT_A) -> Self {
425        variant as u8 != 0
426    }
427}
428impl NACK_R {
429    #[doc = "Get enumerated values variant"]
430    #[inline(always)]
431    pub fn variant(&self) -> NACKSELECT_A {
432        match self.bits {
433            false => NACKSELECT_A::_0,
434            true => NACKSELECT_A::_1,
435        }
436    }
437    #[doc = "Checks if the value of the field is `_0`"]
438    #[inline(always)]
439    pub fn is_0(&self) -> bool {
440        *self == NACKSELECT_A::_0
441    }
442    #[doc = "Checks if the value of the field is `_1`"]
443    #[inline(always)]
444    pub fn is_1(&self) -> bool {
445        *self == NACKSELECT_A::_1
446    }
447}
448#[doc = "Field `RIIC` reader - Ring Indicator Input Change Flag"]
449pub type RIIC_R = crate::BitReader<RIICSELECT_A>;
450#[doc = "Ring Indicator Input Change Flag\n\nValue on reset: 0"]
451#[derive(Clone, Copy, Debug, PartialEq, Eq)]
452pub enum RIICSELECT_A {
453    #[doc = "0: No input change has been detected on the RI pin since the last read of CSR"]
454    _0 = 0,
455    #[doc = "1: At least one input change has been detected on the RI pin since the last read of CSR"]
456    _1 = 1,
457}
458impl From<RIICSELECT_A> for bool {
459    #[inline(always)]
460    fn from(variant: RIICSELECT_A) -> Self {
461        variant as u8 != 0
462    }
463}
464impl RIIC_R {
465    #[doc = "Get enumerated values variant"]
466    #[inline(always)]
467    pub fn variant(&self) -> RIICSELECT_A {
468        match self.bits {
469            false => RIICSELECT_A::_0,
470            true => RIICSELECT_A::_1,
471        }
472    }
473    #[doc = "Checks if the value of the field is `_0`"]
474    #[inline(always)]
475    pub fn is_0(&self) -> bool {
476        *self == RIICSELECT_A::_0
477    }
478    #[doc = "Checks if the value of the field is `_1`"]
479    #[inline(always)]
480    pub fn is_1(&self) -> bool {
481        *self == RIICSELECT_A::_1
482    }
483}
484#[doc = "Field `DSRIC` reader - Data Set Ready Input Change Flag"]
485pub type DSRIC_R = crate::BitReader<DSRICSELECT_A>;
486#[doc = "Data Set Ready Input Change Flag\n\nValue on reset: 0"]
487#[derive(Clone, Copy, Debug, PartialEq, Eq)]
488pub enum DSRICSELECT_A {
489    #[doc = "0: No input change has been detected on the DSR pin since the last read of CSR"]
490    _0 = 0,
491    #[doc = "1: At least one input change has been detected on the DSR pin since the last read of CSR"]
492    _1 = 1,
493}
494impl From<DSRICSELECT_A> for bool {
495    #[inline(always)]
496    fn from(variant: DSRICSELECT_A) -> Self {
497        variant as u8 != 0
498    }
499}
500impl DSRIC_R {
501    #[doc = "Get enumerated values variant"]
502    #[inline(always)]
503    pub fn variant(&self) -> DSRICSELECT_A {
504        match self.bits {
505            false => DSRICSELECT_A::_0,
506            true => DSRICSELECT_A::_1,
507        }
508    }
509    #[doc = "Checks if the value of the field is `_0`"]
510    #[inline(always)]
511    pub fn is_0(&self) -> bool {
512        *self == DSRICSELECT_A::_0
513    }
514    #[doc = "Checks if the value of the field is `_1`"]
515    #[inline(always)]
516    pub fn is_1(&self) -> bool {
517        *self == DSRICSELECT_A::_1
518    }
519}
520#[doc = "Field `DCDIC` reader - Data Carrier Detect Input Change Flag"]
521pub type DCDIC_R = crate::BitReader<DCDICSELECT_A>;
522#[doc = "Data Carrier Detect Input Change Flag\n\nValue on reset: 0"]
523#[derive(Clone, Copy, Debug, PartialEq, Eq)]
524pub enum DCDICSELECT_A {
525    #[doc = "0: No input change has been detected on the DCD pin since the last read of CSR"]
526    _0 = 0,
527    #[doc = "1: At least one input change has been detected on the DCD pin since the last read of CSR"]
528    _1 = 1,
529}
530impl From<DCDICSELECT_A> for bool {
531    #[inline(always)]
532    fn from(variant: DCDICSELECT_A) -> Self {
533        variant as u8 != 0
534    }
535}
536impl DCDIC_R {
537    #[doc = "Get enumerated values variant"]
538    #[inline(always)]
539    pub fn variant(&self) -> DCDICSELECT_A {
540        match self.bits {
541            false => DCDICSELECT_A::_0,
542            true => DCDICSELECT_A::_1,
543        }
544    }
545    #[doc = "Checks if the value of the field is `_0`"]
546    #[inline(always)]
547    pub fn is_0(&self) -> bool {
548        *self == DCDICSELECT_A::_0
549    }
550    #[doc = "Checks if the value of the field is `_1`"]
551    #[inline(always)]
552    pub fn is_1(&self) -> bool {
553        *self == DCDICSELECT_A::_1
554    }
555}
556#[doc = "Field `CTSIC` reader - Clear to Send Input Change Flag"]
557pub type CTSIC_R = crate::BitReader<CTSICSELECT_A>;
558#[doc = "Clear to Send Input Change Flag\n\nValue on reset: 0"]
559#[derive(Clone, Copy, Debug, PartialEq, Eq)]
560pub enum CTSICSELECT_A {
561    #[doc = "0: No input change has been detected on the CTS pin since the last read of CSR"]
562    _0 = 0,
563    #[doc = "1: At least one input change has been detected on the CTS pin since the last read of CSR"]
564    _1 = 1,
565}
566impl From<CTSICSELECT_A> for bool {
567    #[inline(always)]
568    fn from(variant: CTSICSELECT_A) -> Self {
569        variant as u8 != 0
570    }
571}
572impl CTSIC_R {
573    #[doc = "Get enumerated values variant"]
574    #[inline(always)]
575    pub fn variant(&self) -> CTSICSELECT_A {
576        match self.bits {
577            false => CTSICSELECT_A::_0,
578            true => CTSICSELECT_A::_1,
579        }
580    }
581    #[doc = "Checks if the value of the field is `_0`"]
582    #[inline(always)]
583    pub fn is_0(&self) -> bool {
584        *self == CTSICSELECT_A::_0
585    }
586    #[doc = "Checks if the value of the field is `_1`"]
587    #[inline(always)]
588    pub fn is_1(&self) -> bool {
589        *self == CTSICSELECT_A::_1
590    }
591}
592#[doc = "Field `RI` reader - Image of RI Input"]
593pub type RI_R = crate::BitReader<RISELECT_A>;
594#[doc = "Image of RI Input\n\nValue on reset: 0"]
595#[derive(Clone, Copy, Debug, PartialEq, Eq)]
596pub enum RISELECT_A {
597    #[doc = "0: RI is at 0"]
598    _0 = 0,
599    #[doc = "1: RI is at 1"]
600    _1 = 1,
601}
602impl From<RISELECT_A> for bool {
603    #[inline(always)]
604    fn from(variant: RISELECT_A) -> Self {
605        variant as u8 != 0
606    }
607}
608impl RI_R {
609    #[doc = "Get enumerated values variant"]
610    #[inline(always)]
611    pub fn variant(&self) -> RISELECT_A {
612        match self.bits {
613            false => RISELECT_A::_0,
614            true => RISELECT_A::_1,
615        }
616    }
617    #[doc = "Checks if the value of the field is `_0`"]
618    #[inline(always)]
619    pub fn is_0(&self) -> bool {
620        *self == RISELECT_A::_0
621    }
622    #[doc = "Checks if the value of the field is `_1`"]
623    #[inline(always)]
624    pub fn is_1(&self) -> bool {
625        *self == RISELECT_A::_1
626    }
627}
628#[doc = "Field `DSR` reader - Image of DSR Input"]
629pub type DSR_R = crate::BitReader<DSRSELECT_A>;
630#[doc = "Image of DSR Input\n\nValue on reset: 0"]
631#[derive(Clone, Copy, Debug, PartialEq, Eq)]
632pub enum DSRSELECT_A {
633    #[doc = "0: DSR is at 0"]
634    _0 = 0,
635    #[doc = "1: DSR is at 1"]
636    _1 = 1,
637}
638impl From<DSRSELECT_A> for bool {
639    #[inline(always)]
640    fn from(variant: DSRSELECT_A) -> Self {
641        variant as u8 != 0
642    }
643}
644impl DSR_R {
645    #[doc = "Get enumerated values variant"]
646    #[inline(always)]
647    pub fn variant(&self) -> DSRSELECT_A {
648        match self.bits {
649            false => DSRSELECT_A::_0,
650            true => DSRSELECT_A::_1,
651        }
652    }
653    #[doc = "Checks if the value of the field is `_0`"]
654    #[inline(always)]
655    pub fn is_0(&self) -> bool {
656        *self == DSRSELECT_A::_0
657    }
658    #[doc = "Checks if the value of the field is `_1`"]
659    #[inline(always)]
660    pub fn is_1(&self) -> bool {
661        *self == DSRSELECT_A::_1
662    }
663}
664#[doc = "Field `DCD` reader - Image of DCD Input"]
665pub type DCD_R = crate::BitReader<DCDSELECT_A>;
666#[doc = "Image of DCD Input\n\nValue on reset: 0"]
667#[derive(Clone, Copy, Debug, PartialEq, Eq)]
668pub enum DCDSELECT_A {
669    #[doc = "0: DCD is at 0"]
670    _0 = 0,
671    #[doc = "1: DCD is at 1"]
672    _1 = 1,
673}
674impl From<DCDSELECT_A> for bool {
675    #[inline(always)]
676    fn from(variant: DCDSELECT_A) -> Self {
677        variant as u8 != 0
678    }
679}
680impl DCD_R {
681    #[doc = "Get enumerated values variant"]
682    #[inline(always)]
683    pub fn variant(&self) -> DCDSELECT_A {
684        match self.bits {
685            false => DCDSELECT_A::_0,
686            true => DCDSELECT_A::_1,
687        }
688    }
689    #[doc = "Checks if the value of the field is `_0`"]
690    #[inline(always)]
691    pub fn is_0(&self) -> bool {
692        *self == DCDSELECT_A::_0
693    }
694    #[doc = "Checks if the value of the field is `_1`"]
695    #[inline(always)]
696    pub fn is_1(&self) -> bool {
697        *self == DCDSELECT_A::_1
698    }
699}
700#[doc = "Field `CTS` reader - Image of CTS Input"]
701pub type CTS_R = crate::BitReader<CTSSELECT_A>;
702#[doc = "Image of CTS Input\n\nValue on reset: 0"]
703#[derive(Clone, Copy, Debug, PartialEq, Eq)]
704pub enum CTSSELECT_A {
705    #[doc = "0: CTS is at 0"]
706    _0 = 0,
707    #[doc = "1: CTS is at 1"]
708    _1 = 1,
709}
710impl From<CTSSELECT_A> for bool {
711    #[inline(always)]
712    fn from(variant: CTSSELECT_A) -> Self {
713        variant as u8 != 0
714    }
715}
716impl CTS_R {
717    #[doc = "Get enumerated values variant"]
718    #[inline(always)]
719    pub fn variant(&self) -> CTSSELECT_A {
720        match self.bits {
721            false => CTSSELECT_A::_0,
722            true => CTSSELECT_A::_1,
723        }
724    }
725    #[doc = "Checks if the value of the field is `_0`"]
726    #[inline(always)]
727    pub fn is_0(&self) -> bool {
728        *self == CTSSELECT_A::_0
729    }
730    #[doc = "Checks if the value of the field is `_1`"]
731    #[inline(always)]
732    pub fn is_1(&self) -> bool {
733        *self == CTSSELECT_A::_1
734    }
735}
736impl R {
737    #[doc = "Bit 0 - Receiver Ready"]
738    #[inline(always)]
739    pub fn rxrdy(&self) -> RXRDY_R {
740        RXRDY_R::new((self.bits & 1) != 0)
741    }
742    #[doc = "Bit 1 - Transmitter Ready"]
743    #[inline(always)]
744    pub fn txrdy(&self) -> TXRDY_R {
745        TXRDY_R::new(((self.bits >> 1) & 1) != 0)
746    }
747    #[doc = "Bit 2 - Break Received/End of Break"]
748    #[inline(always)]
749    pub fn rxbrk(&self) -> RXBRK_R {
750        RXBRK_R::new(((self.bits >> 2) & 1) != 0)
751    }
752    #[doc = "Bit 5 - Overrun Error"]
753    #[inline(always)]
754    pub fn ovre(&self) -> OVRE_R {
755        OVRE_R::new(((self.bits >> 5) & 1) != 0)
756    }
757    #[doc = "Bit 6 - Framing Error"]
758    #[inline(always)]
759    pub fn frame(&self) -> FRAME_R {
760        FRAME_R::new(((self.bits >> 6) & 1) != 0)
761    }
762    #[doc = "Bit 7 - Parity Error"]
763    #[inline(always)]
764    pub fn pare(&self) -> PARE_R {
765        PARE_R::new(((self.bits >> 7) & 1) != 0)
766    }
767    #[doc = "Bit 8 - Receiver Time-out"]
768    #[inline(always)]
769    pub fn timeout(&self) -> TIMEOUT_R {
770        TIMEOUT_R::new(((self.bits >> 8) & 1) != 0)
771    }
772    #[doc = "Bit 9 - Transmitter Empty"]
773    #[inline(always)]
774    pub fn txempty(&self) -> TXEMPTY_R {
775        TXEMPTY_R::new(((self.bits >> 9) & 1) != 0)
776    }
777    #[doc = "Bit 10 - SPI Underrun Error"]
778    #[inline(always)]
779    pub fn unre(&self) -> UNRE_R {
780        UNRE_R::new(((self.bits >> 10) & 1) != 0)
781    }
782    #[doc = "Bit 11 - Transmission Buffer Empty"]
783    #[inline(always)]
784    pub fn txbufe(&self) -> TXBUFE_R {
785        TXBUFE_R::new(((self.bits >> 11) & 1) != 0)
786    }
787    #[doc = "Bit 12 - Reception Buffer Full"]
788    #[inline(always)]
789    pub fn rxbuff(&self) -> RXBUFF_R {
790        RXBUFF_R::new(((self.bits >> 12) & 1) != 0)
791    }
792    #[doc = "Bit 13 - Non Acknowledge"]
793    #[inline(always)]
794    pub fn nack(&self) -> NACK_R {
795        NACK_R::new(((self.bits >> 13) & 1) != 0)
796    }
797    #[doc = "Bit 16 - Ring Indicator Input Change Flag"]
798    #[inline(always)]
799    pub fn riic(&self) -> RIIC_R {
800        RIIC_R::new(((self.bits >> 16) & 1) != 0)
801    }
802    #[doc = "Bit 17 - Data Set Ready Input Change Flag"]
803    #[inline(always)]
804    pub fn dsric(&self) -> DSRIC_R {
805        DSRIC_R::new(((self.bits >> 17) & 1) != 0)
806    }
807    #[doc = "Bit 18 - Data Carrier Detect Input Change Flag"]
808    #[inline(always)]
809    pub fn dcdic(&self) -> DCDIC_R {
810        DCDIC_R::new(((self.bits >> 18) & 1) != 0)
811    }
812    #[doc = "Bit 19 - Clear to Send Input Change Flag"]
813    #[inline(always)]
814    pub fn ctsic(&self) -> CTSIC_R {
815        CTSIC_R::new(((self.bits >> 19) & 1) != 0)
816    }
817    #[doc = "Bit 20 - Image of RI Input"]
818    #[inline(always)]
819    pub fn ri(&self) -> RI_R {
820        RI_R::new(((self.bits >> 20) & 1) != 0)
821    }
822    #[doc = "Bit 21 - Image of DSR Input"]
823    #[inline(always)]
824    pub fn dsr(&self) -> DSR_R {
825        DSR_R::new(((self.bits >> 21) & 1) != 0)
826    }
827    #[doc = "Bit 22 - Image of DCD Input"]
828    #[inline(always)]
829    pub fn dcd(&self) -> DCD_R {
830        DCD_R::new(((self.bits >> 22) & 1) != 0)
831    }
832    #[doc = "Bit 23 - Image of CTS Input"]
833    #[inline(always)]
834    pub fn cts(&self) -> CTS_R {
835        CTS_R::new(((self.bits >> 23) & 1) != 0)
836    }
837}
838#[doc = "Channel Status Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [spi_slave_mode_csr_spi](index.html) module"]
839pub struct SPI_SLAVE_MODE_CSR_SPI_SPEC;
840impl crate::RegisterSpec for SPI_SLAVE_MODE_CSR_SPI_SPEC {
841    type Ux = u32;
842}
843#[doc = "`read()` method returns [spi_slave_mode_csr_spi::R](R) reader structure"]
844impl crate::Readable for SPI_SLAVE_MODE_CSR_SPI_SPEC {
845    type Reader = R;
846}
847#[doc = "`reset()` method sets CSR_SPI to value 0"]
848impl crate::Resettable for SPI_SLAVE_MODE_CSR_SPI_SPEC {
849    const RESET_VALUE: Self::Ux = 0;
850}