ra6m1/sdhi0/
sd_info2.rs

1#[doc = "Register `SD_INFO2` reader"]
2pub struct R(crate::R<SD_INFO2_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<SD_INFO2_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<SD_INFO2_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<SD_INFO2_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `SD_INFO2` writer"]
17pub struct W(crate::W<SD_INFO2_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<SD_INFO2_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<SD_INFO2_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<SD_INFO2_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `CMDE` reader - Command Error\n\nThe field is **modified** in some way after a read operation."]
38pub type CMDE_R = crate::BitReader<CMDE_A>;
39#[doc = "Command Error\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41pub enum CMDE_A {
42    #[doc = "0: Command error not detected"]
43    _0 = 0,
44    #[doc = "1: Command error detected"]
45    _1 = 1,
46}
47impl From<CMDE_A> for bool {
48    #[inline(always)]
49    fn from(variant: CMDE_A) -> Self {
50        variant as u8 != 0
51    }
52}
53impl CMDE_R {
54    #[doc = "Get enumerated values variant"]
55    #[inline(always)]
56    pub fn variant(&self) -> CMDE_A {
57        match self.bits {
58            false => CMDE_A::_0,
59            true => CMDE_A::_1,
60        }
61    }
62    #[doc = "Checks if the value of the field is `_0`"]
63    #[inline(always)]
64    pub fn is_0(&self) -> bool {
65        *self == CMDE_A::_0
66    }
67    #[doc = "Checks if the value of the field is `_1`"]
68    #[inline(always)]
69    pub fn is_1(&self) -> bool {
70        *self == CMDE_A::_1
71    }
72}
73#[doc = "Field `CMDE` writer - Command Error"]
74pub type CMDE_W<'a, const O: u8> = crate::BitWriter0C<'a, u32, SD_INFO2_SPEC, CMDE_A, O>;
75impl<'a, const O: u8> CMDE_W<'a, O> {
76    #[doc = "Command error not detected"]
77    #[inline(always)]
78    pub fn _0(self) -> &'a mut W {
79        self.variant(CMDE_A::_0)
80    }
81    #[doc = "Command error detected"]
82    #[inline(always)]
83    pub fn _1(self) -> &'a mut W {
84        self.variant(CMDE_A::_1)
85    }
86}
87#[doc = "Field `CRCE` reader - CRC Error\n\nThe field is **modified** in some way after a read operation."]
88pub type CRCE_R = crate::BitReader<CRCE_A>;
89#[doc = "CRC Error\n\nValue on reset: 0"]
90#[derive(Clone, Copy, Debug, PartialEq, Eq)]
91pub enum CRCE_A {
92    #[doc = "0: CRC error not detected"]
93    _0 = 0,
94    #[doc = "1: CRC error detected"]
95    _1 = 1,
96}
97impl From<CRCE_A> for bool {
98    #[inline(always)]
99    fn from(variant: CRCE_A) -> Self {
100        variant as u8 != 0
101    }
102}
103impl CRCE_R {
104    #[doc = "Get enumerated values variant"]
105    #[inline(always)]
106    pub fn variant(&self) -> CRCE_A {
107        match self.bits {
108            false => CRCE_A::_0,
109            true => CRCE_A::_1,
110        }
111    }
112    #[doc = "Checks if the value of the field is `_0`"]
113    #[inline(always)]
114    pub fn is_0(&self) -> bool {
115        *self == CRCE_A::_0
116    }
117    #[doc = "Checks if the value of the field is `_1`"]
118    #[inline(always)]
119    pub fn is_1(&self) -> bool {
120        *self == CRCE_A::_1
121    }
122}
123#[doc = "Field `CRCE` writer - CRC Error"]
124pub type CRCE_W<'a, const O: u8> = crate::BitWriter0C<'a, u32, SD_INFO2_SPEC, CRCE_A, O>;
125impl<'a, const O: u8> CRCE_W<'a, O> {
126    #[doc = "CRC error not detected"]
127    #[inline(always)]
128    pub fn _0(self) -> &'a mut W {
129        self.variant(CRCE_A::_0)
130    }
131    #[doc = "CRC error detected"]
132    #[inline(always)]
133    pub fn _1(self) -> &'a mut W {
134        self.variant(CRCE_A::_1)
135    }
136}
137#[doc = "Field `ENDE` reader - END Error\n\nThe field is **modified** in some way after a read operation."]
138pub type ENDE_R = crate::BitReader<ENDE_A>;
139#[doc = "END Error\n\nValue on reset: 0"]
140#[derive(Clone, Copy, Debug, PartialEq, Eq)]
141pub enum ENDE_A {
142    #[doc = "0: End bit error not detected"]
143    _0 = 0,
144    #[doc = "1: End bit error detected"]
145    _1 = 1,
146}
147impl From<ENDE_A> for bool {
148    #[inline(always)]
149    fn from(variant: ENDE_A) -> Self {
150        variant as u8 != 0
151    }
152}
153impl ENDE_R {
154    #[doc = "Get enumerated values variant"]
155    #[inline(always)]
156    pub fn variant(&self) -> ENDE_A {
157        match self.bits {
158            false => ENDE_A::_0,
159            true => ENDE_A::_1,
160        }
161    }
162    #[doc = "Checks if the value of the field is `_0`"]
163    #[inline(always)]
164    pub fn is_0(&self) -> bool {
165        *self == ENDE_A::_0
166    }
167    #[doc = "Checks if the value of the field is `_1`"]
168    #[inline(always)]
169    pub fn is_1(&self) -> bool {
170        *self == ENDE_A::_1
171    }
172}
173#[doc = "Field `ENDE` writer - END Error"]
174pub type ENDE_W<'a, const O: u8> = crate::BitWriter0C<'a, u32, SD_INFO2_SPEC, ENDE_A, O>;
175impl<'a, const O: u8> ENDE_W<'a, O> {
176    #[doc = "End bit error not detected"]
177    #[inline(always)]
178    pub fn _0(self) -> &'a mut W {
179        self.variant(ENDE_A::_0)
180    }
181    #[doc = "End bit error detected"]
182    #[inline(always)]
183    pub fn _1(self) -> &'a mut W {
184        self.variant(ENDE_A::_1)
185    }
186}
187#[doc = "Field `DTO` reader - Data Timeout\n\nThe field is **modified** in some way after a read operation."]
188pub type DTO_R = crate::BitReader<DTO_A>;
189#[doc = "Data Timeout\n\nValue on reset: 0"]
190#[derive(Clone, Copy, Debug, PartialEq, Eq)]
191pub enum DTO_A {
192    #[doc = "0: Data timeout not detected"]
193    _0 = 0,
194    #[doc = "1: Data timeout detected"]
195    _1 = 1,
196}
197impl From<DTO_A> for bool {
198    #[inline(always)]
199    fn from(variant: DTO_A) -> Self {
200        variant as u8 != 0
201    }
202}
203impl DTO_R {
204    #[doc = "Get enumerated values variant"]
205    #[inline(always)]
206    pub fn variant(&self) -> DTO_A {
207        match self.bits {
208            false => DTO_A::_0,
209            true => DTO_A::_1,
210        }
211    }
212    #[doc = "Checks if the value of the field is `_0`"]
213    #[inline(always)]
214    pub fn is_0(&self) -> bool {
215        *self == DTO_A::_0
216    }
217    #[doc = "Checks if the value of the field is `_1`"]
218    #[inline(always)]
219    pub fn is_1(&self) -> bool {
220        *self == DTO_A::_1
221    }
222}
223#[doc = "Field `DTO` writer - Data Timeout"]
224pub type DTO_W<'a, const O: u8> = crate::BitWriter0C<'a, u32, SD_INFO2_SPEC, DTO_A, O>;
225impl<'a, const O: u8> DTO_W<'a, O> {
226    #[doc = "Data timeout not detected"]
227    #[inline(always)]
228    pub fn _0(self) -> &'a mut W {
229        self.variant(DTO_A::_0)
230    }
231    #[doc = "Data timeout detected"]
232    #[inline(always)]
233    pub fn _1(self) -> &'a mut W {
234        self.variant(DTO_A::_1)
235    }
236}
237#[doc = "Field `ILW` reader - SD_BUF Illegal Write Access\n\nThe field is **modified** in some way after a read operation."]
238pub type ILW_R = crate::BitReader<ILW_A>;
239#[doc = "SD_BUF Illegal Write Access\n\nValue on reset: 0"]
240#[derive(Clone, Copy, Debug, PartialEq, Eq)]
241pub enum ILW_A {
242    #[doc = "0: Illegal write access to the SD_BUF register not detected"]
243    _0 = 0,
244    #[doc = "1: Illegal write access to the SD_BUF register detected"]
245    _1 = 1,
246}
247impl From<ILW_A> for bool {
248    #[inline(always)]
249    fn from(variant: ILW_A) -> Self {
250        variant as u8 != 0
251    }
252}
253impl ILW_R {
254    #[doc = "Get enumerated values variant"]
255    #[inline(always)]
256    pub fn variant(&self) -> ILW_A {
257        match self.bits {
258            false => ILW_A::_0,
259            true => ILW_A::_1,
260        }
261    }
262    #[doc = "Checks if the value of the field is `_0`"]
263    #[inline(always)]
264    pub fn is_0(&self) -> bool {
265        *self == ILW_A::_0
266    }
267    #[doc = "Checks if the value of the field is `_1`"]
268    #[inline(always)]
269    pub fn is_1(&self) -> bool {
270        *self == ILW_A::_1
271    }
272}
273#[doc = "Field `ILW` writer - SD_BUF Illegal Write Access"]
274pub type ILW_W<'a, const O: u8> = crate::BitWriter0C<'a, u32, SD_INFO2_SPEC, ILW_A, O>;
275impl<'a, const O: u8> ILW_W<'a, O> {
276    #[doc = "Illegal write access to the SD_BUF register not detected"]
277    #[inline(always)]
278    pub fn _0(self) -> &'a mut W {
279        self.variant(ILW_A::_0)
280    }
281    #[doc = "Illegal write access to the SD_BUF register detected"]
282    #[inline(always)]
283    pub fn _1(self) -> &'a mut W {
284        self.variant(ILW_A::_1)
285    }
286}
287#[doc = "Field `ILR` reader - SD_BUF Illegal Read Access\n\nThe field is **modified** in some way after a read operation."]
288pub type ILR_R = crate::BitReader<ILR_A>;
289#[doc = "SD_BUF Illegal Read Access\n\nValue on reset: 0"]
290#[derive(Clone, Copy, Debug, PartialEq, Eq)]
291pub enum ILR_A {
292    #[doc = "0: Illegal read access to the SD_BUF register not detected"]
293    _0 = 0,
294    #[doc = "1: Illegal read access to the SD_BUF register detected"]
295    _1 = 1,
296}
297impl From<ILR_A> for bool {
298    #[inline(always)]
299    fn from(variant: ILR_A) -> Self {
300        variant as u8 != 0
301    }
302}
303impl ILR_R {
304    #[doc = "Get enumerated values variant"]
305    #[inline(always)]
306    pub fn variant(&self) -> ILR_A {
307        match self.bits {
308            false => ILR_A::_0,
309            true => ILR_A::_1,
310        }
311    }
312    #[doc = "Checks if the value of the field is `_0`"]
313    #[inline(always)]
314    pub fn is_0(&self) -> bool {
315        *self == ILR_A::_0
316    }
317    #[doc = "Checks if the value of the field is `_1`"]
318    #[inline(always)]
319    pub fn is_1(&self) -> bool {
320        *self == ILR_A::_1
321    }
322}
323#[doc = "Field `ILR` writer - SD_BUF Illegal Read Access"]
324pub type ILR_W<'a, const O: u8> = crate::BitWriter0C<'a, u32, SD_INFO2_SPEC, ILR_A, O>;
325impl<'a, const O: u8> ILR_W<'a, O> {
326    #[doc = "Illegal read access to the SD_BUF register not detected"]
327    #[inline(always)]
328    pub fn _0(self) -> &'a mut W {
329        self.variant(ILR_A::_0)
330    }
331    #[doc = "Illegal read access to the SD_BUF register detected"]
332    #[inline(always)]
333    pub fn _1(self) -> &'a mut W {
334        self.variant(ILR_A::_1)
335    }
336}
337#[doc = "Field `RSPTO` reader - Response Timeout\n\nThe field is **modified** in some way after a read operation."]
338pub type RSPTO_R = crate::BitReader<RSPTO_A>;
339#[doc = "Response Timeout\n\nValue on reset: 0"]
340#[derive(Clone, Copy, Debug, PartialEq, Eq)]
341pub enum RSPTO_A {
342    #[doc = "0: Response timeout not detected"]
343    _0 = 0,
344    #[doc = "1: Response timeout detected"]
345    _1 = 1,
346}
347impl From<RSPTO_A> for bool {
348    #[inline(always)]
349    fn from(variant: RSPTO_A) -> Self {
350        variant as u8 != 0
351    }
352}
353impl RSPTO_R {
354    #[doc = "Get enumerated values variant"]
355    #[inline(always)]
356    pub fn variant(&self) -> RSPTO_A {
357        match self.bits {
358            false => RSPTO_A::_0,
359            true => RSPTO_A::_1,
360        }
361    }
362    #[doc = "Checks if the value of the field is `_0`"]
363    #[inline(always)]
364    pub fn is_0(&self) -> bool {
365        *self == RSPTO_A::_0
366    }
367    #[doc = "Checks if the value of the field is `_1`"]
368    #[inline(always)]
369    pub fn is_1(&self) -> bool {
370        *self == RSPTO_A::_1
371    }
372}
373#[doc = "Field `RSPTO` writer - Response Timeout"]
374pub type RSPTO_W<'a, const O: u8> = crate::BitWriter0C<'a, u32, SD_INFO2_SPEC, RSPTO_A, O>;
375impl<'a, const O: u8> RSPTO_W<'a, O> {
376    #[doc = "Response timeout not detected"]
377    #[inline(always)]
378    pub fn _0(self) -> &'a mut W {
379        self.variant(RSPTO_A::_0)
380    }
381    #[doc = "Response timeout detected"]
382    #[inline(always)]
383    pub fn _1(self) -> &'a mut W {
384        self.variant(RSPTO_A::_1)
385    }
386}
387#[doc = "Field `SDD0MON` reader - SDDAT0 Indicates the SDDAT0 state of the port specified by SD_PORTSEL."]
388pub type SDD0MON_R = crate::BitReader<SDD0MON_A>;
389#[doc = "SDDAT0 Indicates the SDDAT0 state of the port specified by SD_PORTSEL.\n\nValue on reset: 0"]
390#[derive(Clone, Copy, Debug, PartialEq, Eq)]
391pub enum SDD0MON_A {
392    #[doc = "1: SDDAT0 is set to 1."]
393    _1 = 1,
394    #[doc = "0: SDDAT0 is set to 0."]
395    _0 = 0,
396}
397impl From<SDD0MON_A> for bool {
398    #[inline(always)]
399    fn from(variant: SDD0MON_A) -> Self {
400        variant as u8 != 0
401    }
402}
403impl SDD0MON_R {
404    #[doc = "Get enumerated values variant"]
405    #[inline(always)]
406    pub fn variant(&self) -> SDD0MON_A {
407        match self.bits {
408            true => SDD0MON_A::_1,
409            false => SDD0MON_A::_0,
410        }
411    }
412    #[doc = "Checks if the value of the field is `_1`"]
413    #[inline(always)]
414    pub fn is_1(&self) -> bool {
415        *self == SDD0MON_A::_1
416    }
417    #[doc = "Checks if the value of the field is `_0`"]
418    #[inline(always)]
419    pub fn is_0(&self) -> bool {
420        *self == SDD0MON_A::_0
421    }
422}
423#[doc = "Field `BRE` reader - SD_BUF Read Enable\n\nThe field is **modified** in some way after a read operation."]
424pub type BRE_R = crate::BitReader<BRE_A>;
425#[doc = "SD_BUF Read Enable\n\nValue on reset: 0"]
426#[derive(Clone, Copy, Debug, PartialEq, Eq)]
427pub enum BRE_A {
428    #[doc = "1: Data can be read from SD_BUF0."]
429    _1 = 1,
430    #[doc = "0: Data cannot be read from SD_BUF0."]
431    _0 = 0,
432}
433impl From<BRE_A> for bool {
434    #[inline(always)]
435    fn from(variant: BRE_A) -> Self {
436        variant as u8 != 0
437    }
438}
439impl BRE_R {
440    #[doc = "Get enumerated values variant"]
441    #[inline(always)]
442    pub fn variant(&self) -> BRE_A {
443        match self.bits {
444            true => BRE_A::_1,
445            false => BRE_A::_0,
446        }
447    }
448    #[doc = "Checks if the value of the field is `_1`"]
449    #[inline(always)]
450    pub fn is_1(&self) -> bool {
451        *self == BRE_A::_1
452    }
453    #[doc = "Checks if the value of the field is `_0`"]
454    #[inline(always)]
455    pub fn is_0(&self) -> bool {
456        *self == BRE_A::_0
457    }
458}
459#[doc = "Field `BRE` writer - SD_BUF Read Enable"]
460pub type BRE_W<'a, const O: u8> = crate::BitWriter0C<'a, u32, SD_INFO2_SPEC, BRE_A, O>;
461impl<'a, const O: u8> BRE_W<'a, O> {
462    #[doc = "Data can be read from SD_BUF0."]
463    #[inline(always)]
464    pub fn _1(self) -> &'a mut W {
465        self.variant(BRE_A::_1)
466    }
467    #[doc = "Data cannot be read from SD_BUF0."]
468    #[inline(always)]
469    pub fn _0(self) -> &'a mut W {
470        self.variant(BRE_A::_0)
471    }
472}
473#[doc = "Field `BWE` reader - SD_BUF Write Enable\n\nThe field is **modified** in some way after a read operation."]
474pub type BWE_R = crate::BitReader<BWE_A>;
475#[doc = "SD_BUF Write Enable\n\nValue on reset: 0"]
476#[derive(Clone, Copy, Debug, PartialEq, Eq)]
477pub enum BWE_A {
478    #[doc = "1: Data can be written in SD_BUF0."]
479    _1 = 1,
480    #[doc = "0: Data cannot be written in SD_BUF0."]
481    _0 = 0,
482}
483impl From<BWE_A> for bool {
484    #[inline(always)]
485    fn from(variant: BWE_A) -> Self {
486        variant as u8 != 0
487    }
488}
489impl BWE_R {
490    #[doc = "Get enumerated values variant"]
491    #[inline(always)]
492    pub fn variant(&self) -> BWE_A {
493        match self.bits {
494            true => BWE_A::_1,
495            false => BWE_A::_0,
496        }
497    }
498    #[doc = "Checks if the value of the field is `_1`"]
499    #[inline(always)]
500    pub fn is_1(&self) -> bool {
501        *self == BWE_A::_1
502    }
503    #[doc = "Checks if the value of the field is `_0`"]
504    #[inline(always)]
505    pub fn is_0(&self) -> bool {
506        *self == BWE_A::_0
507    }
508}
509#[doc = "Field `BWE` writer - SD_BUF Write Enable"]
510pub type BWE_W<'a, const O: u8> = crate::BitWriter0C<'a, u32, SD_INFO2_SPEC, BWE_A, O>;
511impl<'a, const O: u8> BWE_W<'a, O> {
512    #[doc = "Data can be written in SD_BUF0."]
513    #[inline(always)]
514    pub fn _1(self) -> &'a mut W {
515        self.variant(BWE_A::_1)
516    }
517    #[doc = "Data cannot be written in SD_BUF0."]
518    #[inline(always)]
519    pub fn _0(self) -> &'a mut W {
520        self.variant(BWE_A::_0)
521    }
522}
523#[doc = "Field `SD_CLK_CTRLEN` reader - When a command sequence is started by writing to SD_CMD, the CBSY bit is set to 1 and, at the same time, the SCLKDIVEN bit is set to 0. The SCLKDIVEN bit is set to 1 after 8 cycles of SDCLK have elapsed after setting of the CBSY bit to 0 due to completion of the command sequence."]
524pub type SD_CLK_CTRLEN_R = crate::BitReader<SD_CLK_CTRLEN_A>;
525#[doc = "When a command sequence is started by writing to SD_CMD, the CBSY bit is set to 1 and, at the same time, the SCLKDIVEN bit is set to 0. The SCLKDIVEN bit is set to 1 after 8 cycles of SDCLK have elapsed after setting of the CBSY bit to 0 due to completion of the command sequence.\n\nValue on reset: 1"]
526#[derive(Clone, Copy, Debug, PartialEq, Eq)]
527pub enum SD_CLK_CTRLEN_A {
528    #[doc = "0: The SD/MMC bus (CMD, DAT) is busy. Writing to the SCLKEN and DIV bits in SD_CLK_CTRL is not possible."]
529    _0 = 0,
530    #[doc = "1: The SD/MMC bus (CMD, DAT) is not busy."]
531    _1 = 1,
532}
533impl From<SD_CLK_CTRLEN_A> for bool {
534    #[inline(always)]
535    fn from(variant: SD_CLK_CTRLEN_A) -> Self {
536        variant as u8 != 0
537    }
538}
539impl SD_CLK_CTRLEN_R {
540    #[doc = "Get enumerated values variant"]
541    #[inline(always)]
542    pub fn variant(&self) -> SD_CLK_CTRLEN_A {
543        match self.bits {
544            false => SD_CLK_CTRLEN_A::_0,
545            true => SD_CLK_CTRLEN_A::_1,
546        }
547    }
548    #[doc = "Checks if the value of the field is `_0`"]
549    #[inline(always)]
550    pub fn is_0(&self) -> bool {
551        *self == SD_CLK_CTRLEN_A::_0
552    }
553    #[doc = "Checks if the value of the field is `_1`"]
554    #[inline(always)]
555    pub fn is_1(&self) -> bool {
556        *self == SD_CLK_CTRLEN_A::_1
557    }
558}
559#[doc = "Field `CBSY` reader - Command Type Register Busy"]
560pub type CBSY_R = crate::BitReader<CBSY_A>;
561#[doc = "Command Type Register Busy\n\nValue on reset: 0"]
562#[derive(Clone, Copy, Debug, PartialEq, Eq)]
563pub enum CBSY_A {
564    #[doc = "0: A command sequence is being executed."]
565    _0 = 0,
566    #[doc = "1: A command sequence has been completed."]
567    _1 = 1,
568}
569impl From<CBSY_A> for bool {
570    #[inline(always)]
571    fn from(variant: CBSY_A) -> Self {
572        variant as u8 != 0
573    }
574}
575impl CBSY_R {
576    #[doc = "Get enumerated values variant"]
577    #[inline(always)]
578    pub fn variant(&self) -> CBSY_A {
579        match self.bits {
580            false => CBSY_A::_0,
581            true => CBSY_A::_1,
582        }
583    }
584    #[doc = "Checks if the value of the field is `_0`"]
585    #[inline(always)]
586    pub fn is_0(&self) -> bool {
587        *self == CBSY_A::_0
588    }
589    #[doc = "Checks if the value of the field is `_1`"]
590    #[inline(always)]
591    pub fn is_1(&self) -> bool {
592        *self == CBSY_A::_1
593    }
594}
595#[doc = "Field `ILA` reader - Illegal Access Error\n\nThe field is **modified** in some way after a read operation."]
596pub type ILA_R = crate::BitReader<ILA_A>;
597#[doc = "Illegal Access Error\n\nValue on reset: 0"]
598#[derive(Clone, Copy, Debug, PartialEq, Eq)]
599pub enum ILA_A {
600    #[doc = "0: Illegal access error not detected"]
601    _0 = 0,
602    #[doc = "1: Illegal access error detected"]
603    _1 = 1,
604}
605impl From<ILA_A> for bool {
606    #[inline(always)]
607    fn from(variant: ILA_A) -> Self {
608        variant as u8 != 0
609    }
610}
611impl ILA_R {
612    #[doc = "Get enumerated values variant"]
613    #[inline(always)]
614    pub fn variant(&self) -> ILA_A {
615        match self.bits {
616            false => ILA_A::_0,
617            true => ILA_A::_1,
618        }
619    }
620    #[doc = "Checks if the value of the field is `_0`"]
621    #[inline(always)]
622    pub fn is_0(&self) -> bool {
623        *self == ILA_A::_0
624    }
625    #[doc = "Checks if the value of the field is `_1`"]
626    #[inline(always)]
627    pub fn is_1(&self) -> bool {
628        *self == ILA_A::_1
629    }
630}
631#[doc = "Field `ILA` writer - Illegal Access Error"]
632pub type ILA_W<'a, const O: u8> = crate::BitWriter0C<'a, u32, SD_INFO2_SPEC, ILA_A, O>;
633impl<'a, const O: u8> ILA_W<'a, O> {
634    #[doc = "Illegal access error not detected"]
635    #[inline(always)]
636    pub fn _0(self) -> &'a mut W {
637        self.variant(ILA_A::_0)
638    }
639    #[doc = "Illegal access error detected"]
640    #[inline(always)]
641    pub fn _1(self) -> &'a mut W {
642        self.variant(ILA_A::_1)
643    }
644}
645impl R {
646    #[doc = "Bit 0 - Command Error"]
647    #[inline(always)]
648    pub fn cmde(&self) -> CMDE_R {
649        CMDE_R::new((self.bits & 1) != 0)
650    }
651    #[doc = "Bit 1 - CRC Error"]
652    #[inline(always)]
653    pub fn crce(&self) -> CRCE_R {
654        CRCE_R::new(((self.bits >> 1) & 1) != 0)
655    }
656    #[doc = "Bit 2 - END Error"]
657    #[inline(always)]
658    pub fn ende(&self) -> ENDE_R {
659        ENDE_R::new(((self.bits >> 2) & 1) != 0)
660    }
661    #[doc = "Bit 3 - Data Timeout"]
662    #[inline(always)]
663    pub fn dto(&self) -> DTO_R {
664        DTO_R::new(((self.bits >> 3) & 1) != 0)
665    }
666    #[doc = "Bit 4 - SD_BUF Illegal Write Access"]
667    #[inline(always)]
668    pub fn ilw(&self) -> ILW_R {
669        ILW_R::new(((self.bits >> 4) & 1) != 0)
670    }
671    #[doc = "Bit 5 - SD_BUF Illegal Read Access"]
672    #[inline(always)]
673    pub fn ilr(&self) -> ILR_R {
674        ILR_R::new(((self.bits >> 5) & 1) != 0)
675    }
676    #[doc = "Bit 6 - Response Timeout"]
677    #[inline(always)]
678    pub fn rspto(&self) -> RSPTO_R {
679        RSPTO_R::new(((self.bits >> 6) & 1) != 0)
680    }
681    #[doc = "Bit 7 - SDDAT0 Indicates the SDDAT0 state of the port specified by SD_PORTSEL."]
682    #[inline(always)]
683    pub fn sdd0mon(&self) -> SDD0MON_R {
684        SDD0MON_R::new(((self.bits >> 7) & 1) != 0)
685    }
686    #[doc = "Bit 8 - SD_BUF Read Enable"]
687    #[inline(always)]
688    pub fn bre(&self) -> BRE_R {
689        BRE_R::new(((self.bits >> 8) & 1) != 0)
690    }
691    #[doc = "Bit 9 - SD_BUF Write Enable"]
692    #[inline(always)]
693    pub fn bwe(&self) -> BWE_R {
694        BWE_R::new(((self.bits >> 9) & 1) != 0)
695    }
696    #[doc = "Bit 13 - When a command sequence is started by writing to SD_CMD, the CBSY bit is set to 1 and, at the same time, the SCLKDIVEN bit is set to 0. The SCLKDIVEN bit is set to 1 after 8 cycles of SDCLK have elapsed after setting of the CBSY bit to 0 due to completion of the command sequence."]
697    #[inline(always)]
698    pub fn sd_clk_ctrlen(&self) -> SD_CLK_CTRLEN_R {
699        SD_CLK_CTRLEN_R::new(((self.bits >> 13) & 1) != 0)
700    }
701    #[doc = "Bit 14 - Command Type Register Busy"]
702    #[inline(always)]
703    pub fn cbsy(&self) -> CBSY_R {
704        CBSY_R::new(((self.bits >> 14) & 1) != 0)
705    }
706    #[doc = "Bit 15 - Illegal Access Error"]
707    #[inline(always)]
708    pub fn ila(&self) -> ILA_R {
709        ILA_R::new(((self.bits >> 15) & 1) != 0)
710    }
711}
712impl W {
713    #[doc = "Bit 0 - Command Error"]
714    #[inline(always)]
715    #[must_use]
716    pub fn cmde(&mut self) -> CMDE_W<0> {
717        CMDE_W::new(self)
718    }
719    #[doc = "Bit 1 - CRC Error"]
720    #[inline(always)]
721    #[must_use]
722    pub fn crce(&mut self) -> CRCE_W<1> {
723        CRCE_W::new(self)
724    }
725    #[doc = "Bit 2 - END Error"]
726    #[inline(always)]
727    #[must_use]
728    pub fn ende(&mut self) -> ENDE_W<2> {
729        ENDE_W::new(self)
730    }
731    #[doc = "Bit 3 - Data Timeout"]
732    #[inline(always)]
733    #[must_use]
734    pub fn dto(&mut self) -> DTO_W<3> {
735        DTO_W::new(self)
736    }
737    #[doc = "Bit 4 - SD_BUF Illegal Write Access"]
738    #[inline(always)]
739    #[must_use]
740    pub fn ilw(&mut self) -> ILW_W<4> {
741        ILW_W::new(self)
742    }
743    #[doc = "Bit 5 - SD_BUF Illegal Read Access"]
744    #[inline(always)]
745    #[must_use]
746    pub fn ilr(&mut self) -> ILR_W<5> {
747        ILR_W::new(self)
748    }
749    #[doc = "Bit 6 - Response Timeout"]
750    #[inline(always)]
751    #[must_use]
752    pub fn rspto(&mut self) -> RSPTO_W<6> {
753        RSPTO_W::new(self)
754    }
755    #[doc = "Bit 8 - SD_BUF Read Enable"]
756    #[inline(always)]
757    #[must_use]
758    pub fn bre(&mut self) -> BRE_W<8> {
759        BRE_W::new(self)
760    }
761    #[doc = "Bit 9 - SD_BUF Write Enable"]
762    #[inline(always)]
763    #[must_use]
764    pub fn bwe(&mut self) -> BWE_W<9> {
765        BWE_W::new(self)
766    }
767    #[doc = "Bit 15 - Illegal Access Error"]
768    #[inline(always)]
769    #[must_use]
770    pub fn ila(&mut self) -> ILA_W<15> {
771        ILA_W::new(self)
772    }
773    #[doc = "Writes raw bits to the register."]
774    #[inline(always)]
775    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
776        self.0.bits(bits);
777        self
778    }
779}
780#[doc = "SD Card Interrupt Flag Register 2\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 [sd_info2](index.html) module"]
781pub struct SD_INFO2_SPEC;
782impl crate::RegisterSpec for SD_INFO2_SPEC {
783    type Ux = u32;
784}
785#[doc = "`read()` method returns [sd_info2::R](R) reader structure"]
786impl crate::Readable for SD_INFO2_SPEC {
787    type Reader = R;
788}
789#[doc = "`write(|w| ..)` method takes [sd_info2::W](W) writer structure"]
790impl crate::Writable for SD_INFO2_SPEC {
791    type Writer = W;
792    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0x837f;
793    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
794}
795#[doc = "`reset()` method sets SD_INFO2 to value 0x2000"]
796impl crate::Resettable for SD_INFO2_SPEC {
797    const RESET_VALUE: Self::Ux = 0x2000;
798}