ra4m2 0.2.0

Peripheral access API for ra4m2 microcontrollers (generated using svd2rust)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
#[doc = "Register `SD_OPTION` reader"]
pub struct R(crate::R<SD_OPTION_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<SD_OPTION_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl From<crate::R<SD_OPTION_SPEC>> for R {
    #[inline(always)]
    fn from(reader: crate::R<SD_OPTION_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `SD_OPTION` writer"]
pub struct W(crate::W<SD_OPTION_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<SD_OPTION_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::ops::DerefMut for W {
    #[inline(always)]
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}
impl From<crate::W<SD_OPTION_SPEC>> for W {
    #[inline(always)]
    fn from(writer: crate::W<SD_OPTION_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Field `CTOP` reader - Card Detection Time Counter"]
pub type CTOP_R = crate::FieldReader<u8, CTOP_A>;
#[doc = "Card Detection Time Counter\n\nValue on reset: 14"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum CTOP_A {
    #[doc = "0: PCLKB × 210"]
    _0X0 = 0,
    #[doc = "1: PCLKB × 211"]
    _0X1 = 1,
    #[doc = "2: PCLKB × 212"]
    _0X2 = 2,
    #[doc = "3: PCLKB × 213"]
    _0X3 = 3,
    #[doc = "4: PCLKB × 214"]
    _0X4 = 4,
    #[doc = "5: PCLKB × 215"]
    _0X5 = 5,
    #[doc = "6: PCLKB × 216"]
    _0X6 = 6,
    #[doc = "7: PCLKB × 217"]
    _0X7 = 7,
    #[doc = "8: PCLKB × 218"]
    _0X8 = 8,
    #[doc = "9: PCLKB × 219"]
    _0X9 = 9,
    #[doc = "10: PCLKB × 220"]
    _0X_A = 10,
    #[doc = "11: PCLKB × 221"]
    _0X_B = 11,
    #[doc = "12: PCLKB × 222"]
    _0X_C = 12,
    #[doc = "13: PCLKB × 223"]
    _0X_D = 13,
    #[doc = "14: PCLKB × 224"]
    _0X_E = 14,
    #[doc = "15: Setting prohibited"]
    _0X_F = 15,
}
impl From<CTOP_A> for u8 {
    #[inline(always)]
    fn from(variant: CTOP_A) -> Self {
        variant as _
    }
}
impl CTOP_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> CTOP_A {
        match self.bits {
            0 => CTOP_A::_0X0,
            1 => CTOP_A::_0X1,
            2 => CTOP_A::_0X2,
            3 => CTOP_A::_0X3,
            4 => CTOP_A::_0X4,
            5 => CTOP_A::_0X5,
            6 => CTOP_A::_0X6,
            7 => CTOP_A::_0X7,
            8 => CTOP_A::_0X8,
            9 => CTOP_A::_0X9,
            10 => CTOP_A::_0X_A,
            11 => CTOP_A::_0X_B,
            12 => CTOP_A::_0X_C,
            13 => CTOP_A::_0X_D,
            14 => CTOP_A::_0X_E,
            15 => CTOP_A::_0X_F,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `_0X0`"]
    #[inline(always)]
    pub fn is_0x0(&self) -> bool {
        *self == CTOP_A::_0X0
    }
    #[doc = "Checks if the value of the field is `_0X1`"]
    #[inline(always)]
    pub fn is_0x1(&self) -> bool {
        *self == CTOP_A::_0X1
    }
    #[doc = "Checks if the value of the field is `_0X2`"]
    #[inline(always)]
    pub fn is_0x2(&self) -> bool {
        *self == CTOP_A::_0X2
    }
    #[doc = "Checks if the value of the field is `_0X3`"]
    #[inline(always)]
    pub fn is_0x3(&self) -> bool {
        *self == CTOP_A::_0X3
    }
    #[doc = "Checks if the value of the field is `_0X4`"]
    #[inline(always)]
    pub fn is_0x4(&self) -> bool {
        *self == CTOP_A::_0X4
    }
    #[doc = "Checks if the value of the field is `_0X5`"]
    #[inline(always)]
    pub fn is_0x5(&self) -> bool {
        *self == CTOP_A::_0X5
    }
    #[doc = "Checks if the value of the field is `_0X6`"]
    #[inline(always)]
    pub fn is_0x6(&self) -> bool {
        *self == CTOP_A::_0X6
    }
    #[doc = "Checks if the value of the field is `_0X7`"]
    #[inline(always)]
    pub fn is_0x7(&self) -> bool {
        *self == CTOP_A::_0X7
    }
    #[doc = "Checks if the value of the field is `_0X8`"]
    #[inline(always)]
    pub fn is_0x8(&self) -> bool {
        *self == CTOP_A::_0X8
    }
    #[doc = "Checks if the value of the field is `_0X9`"]
    #[inline(always)]
    pub fn is_0x9(&self) -> bool {
        *self == CTOP_A::_0X9
    }
    #[doc = "Checks if the value of the field is `_0X_A`"]
    #[inline(always)]
    pub fn is_0x_a(&self) -> bool {
        *self == CTOP_A::_0X_A
    }
    #[doc = "Checks if the value of the field is `_0X_B`"]
    #[inline(always)]
    pub fn is_0x_b(&self) -> bool {
        *self == CTOP_A::_0X_B
    }
    #[doc = "Checks if the value of the field is `_0X_C`"]
    #[inline(always)]
    pub fn is_0x_c(&self) -> bool {
        *self == CTOP_A::_0X_C
    }
    #[doc = "Checks if the value of the field is `_0X_D`"]
    #[inline(always)]
    pub fn is_0x_d(&self) -> bool {
        *self == CTOP_A::_0X_D
    }
    #[doc = "Checks if the value of the field is `_0X_E`"]
    #[inline(always)]
    pub fn is_0x_e(&self) -> bool {
        *self == CTOP_A::_0X_E
    }
    #[doc = "Checks if the value of the field is `_0X_F`"]
    #[inline(always)]
    pub fn is_0x_f(&self) -> bool {
        *self == CTOP_A::_0X_F
    }
}
#[doc = "Field `CTOP` writer - Card Detection Time Counter"]
pub type CTOP_W<'a, const O: u8> =
    crate::FieldWriterSafe<'a, u32, SD_OPTION_SPEC, u8, CTOP_A, 4, O>;
impl<'a, const O: u8> CTOP_W<'a, O> {
    #[doc = "PCLKB × 210"]
    #[inline(always)]
    pub fn _0x0(self) -> &'a mut W {
        self.variant(CTOP_A::_0X0)
    }
    #[doc = "PCLKB × 211"]
    #[inline(always)]
    pub fn _0x1(self) -> &'a mut W {
        self.variant(CTOP_A::_0X1)
    }
    #[doc = "PCLKB × 212"]
    #[inline(always)]
    pub fn _0x2(self) -> &'a mut W {
        self.variant(CTOP_A::_0X2)
    }
    #[doc = "PCLKB × 213"]
    #[inline(always)]
    pub fn _0x3(self) -> &'a mut W {
        self.variant(CTOP_A::_0X3)
    }
    #[doc = "PCLKB × 214"]
    #[inline(always)]
    pub fn _0x4(self) -> &'a mut W {
        self.variant(CTOP_A::_0X4)
    }
    #[doc = "PCLKB × 215"]
    #[inline(always)]
    pub fn _0x5(self) -> &'a mut W {
        self.variant(CTOP_A::_0X5)
    }
    #[doc = "PCLKB × 216"]
    #[inline(always)]
    pub fn _0x6(self) -> &'a mut W {
        self.variant(CTOP_A::_0X6)
    }
    #[doc = "PCLKB × 217"]
    #[inline(always)]
    pub fn _0x7(self) -> &'a mut W {
        self.variant(CTOP_A::_0X7)
    }
    #[doc = "PCLKB × 218"]
    #[inline(always)]
    pub fn _0x8(self) -> &'a mut W {
        self.variant(CTOP_A::_0X8)
    }
    #[doc = "PCLKB × 219"]
    #[inline(always)]
    pub fn _0x9(self) -> &'a mut W {
        self.variant(CTOP_A::_0X9)
    }
    #[doc = "PCLKB × 220"]
    #[inline(always)]
    pub fn _0x_a(self) -> &'a mut W {
        self.variant(CTOP_A::_0X_A)
    }
    #[doc = "PCLKB × 221"]
    #[inline(always)]
    pub fn _0x_b(self) -> &'a mut W {
        self.variant(CTOP_A::_0X_B)
    }
    #[doc = "PCLKB × 222"]
    #[inline(always)]
    pub fn _0x_c(self) -> &'a mut W {
        self.variant(CTOP_A::_0X_C)
    }
    #[doc = "PCLKB × 223"]
    #[inline(always)]
    pub fn _0x_d(self) -> &'a mut W {
        self.variant(CTOP_A::_0X_D)
    }
    #[doc = "PCLKB × 224"]
    #[inline(always)]
    pub fn _0x_e(self) -> &'a mut W {
        self.variant(CTOP_A::_0X_E)
    }
    #[doc = "Setting prohibited"]
    #[inline(always)]
    pub fn _0x_f(self) -> &'a mut W {
        self.variant(CTOP_A::_0X_F)
    }
}
#[doc = "Field `TOP` reader - Timeout Counter"]
pub type TOP_R = crate::FieldReader<u8, TOP_A>;
#[doc = "Timeout Counter\n\nValue on reset: 14"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum TOP_A {
    #[doc = "0: SDHI clock × 213"]
    _0X0 = 0,
    #[doc = "1: SDHI clock × 214"]
    _0X1 = 1,
    #[doc = "2: SDHI clock × 215"]
    _0X2 = 2,
    #[doc = "3: SDHI clock × 216"]
    _0X3 = 3,
    #[doc = "4: SDHI clock × 217"]
    _0X4 = 4,
    #[doc = "5: SDHI clock × 218"]
    _0X5 = 5,
    #[doc = "6: SDHI clock × 219"]
    _0X6 = 6,
    #[doc = "7: SDHI clock × 220"]
    _0X7 = 7,
    #[doc = "8: SDHI clock × 221"]
    _0X8 = 8,
    #[doc = "9: SDHI clock × 222"]
    _0X9 = 9,
    #[doc = "10: SDHI clock × 223"]
    _0X_A = 10,
    #[doc = "11: SDHI clock × 224"]
    _0X_B = 11,
    #[doc = "12: SDHI clock × 225"]
    _0X_C = 12,
    #[doc = "13: SDHI clock × 226"]
    _0X_D = 13,
    #[doc = "14: SDHI clock × 227"]
    _0X_E = 14,
    #[doc = "15: Setting prohibited"]
    _0X_F = 15,
}
impl From<TOP_A> for u8 {
    #[inline(always)]
    fn from(variant: TOP_A) -> Self {
        variant as _
    }
}
impl TOP_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> TOP_A {
        match self.bits {
            0 => TOP_A::_0X0,
            1 => TOP_A::_0X1,
            2 => TOP_A::_0X2,
            3 => TOP_A::_0X3,
            4 => TOP_A::_0X4,
            5 => TOP_A::_0X5,
            6 => TOP_A::_0X6,
            7 => TOP_A::_0X7,
            8 => TOP_A::_0X8,
            9 => TOP_A::_0X9,
            10 => TOP_A::_0X_A,
            11 => TOP_A::_0X_B,
            12 => TOP_A::_0X_C,
            13 => TOP_A::_0X_D,
            14 => TOP_A::_0X_E,
            15 => TOP_A::_0X_F,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `_0X0`"]
    #[inline(always)]
    pub fn is_0x0(&self) -> bool {
        *self == TOP_A::_0X0
    }
    #[doc = "Checks if the value of the field is `_0X1`"]
    #[inline(always)]
    pub fn is_0x1(&self) -> bool {
        *self == TOP_A::_0X1
    }
    #[doc = "Checks if the value of the field is `_0X2`"]
    #[inline(always)]
    pub fn is_0x2(&self) -> bool {
        *self == TOP_A::_0X2
    }
    #[doc = "Checks if the value of the field is `_0X3`"]
    #[inline(always)]
    pub fn is_0x3(&self) -> bool {
        *self == TOP_A::_0X3
    }
    #[doc = "Checks if the value of the field is `_0X4`"]
    #[inline(always)]
    pub fn is_0x4(&self) -> bool {
        *self == TOP_A::_0X4
    }
    #[doc = "Checks if the value of the field is `_0X5`"]
    #[inline(always)]
    pub fn is_0x5(&self) -> bool {
        *self == TOP_A::_0X5
    }
    #[doc = "Checks if the value of the field is `_0X6`"]
    #[inline(always)]
    pub fn is_0x6(&self) -> bool {
        *self == TOP_A::_0X6
    }
    #[doc = "Checks if the value of the field is `_0X7`"]
    #[inline(always)]
    pub fn is_0x7(&self) -> bool {
        *self == TOP_A::_0X7
    }
    #[doc = "Checks if the value of the field is `_0X8`"]
    #[inline(always)]
    pub fn is_0x8(&self) -> bool {
        *self == TOP_A::_0X8
    }
    #[doc = "Checks if the value of the field is `_0X9`"]
    #[inline(always)]
    pub fn is_0x9(&self) -> bool {
        *self == TOP_A::_0X9
    }
    #[doc = "Checks if the value of the field is `_0X_A`"]
    #[inline(always)]
    pub fn is_0x_a(&self) -> bool {
        *self == TOP_A::_0X_A
    }
    #[doc = "Checks if the value of the field is `_0X_B`"]
    #[inline(always)]
    pub fn is_0x_b(&self) -> bool {
        *self == TOP_A::_0X_B
    }
    #[doc = "Checks if the value of the field is `_0X_C`"]
    #[inline(always)]
    pub fn is_0x_c(&self) -> bool {
        *self == TOP_A::_0X_C
    }
    #[doc = "Checks if the value of the field is `_0X_D`"]
    #[inline(always)]
    pub fn is_0x_d(&self) -> bool {
        *self == TOP_A::_0X_D
    }
    #[doc = "Checks if the value of the field is `_0X_E`"]
    #[inline(always)]
    pub fn is_0x_e(&self) -> bool {
        *self == TOP_A::_0X_E
    }
    #[doc = "Checks if the value of the field is `_0X_F`"]
    #[inline(always)]
    pub fn is_0x_f(&self) -> bool {
        *self == TOP_A::_0X_F
    }
}
#[doc = "Field `TOP` writer - Timeout Counter"]
pub type TOP_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, SD_OPTION_SPEC, u8, TOP_A, 4, O>;
impl<'a, const O: u8> TOP_W<'a, O> {
    #[doc = "SDHI clock × 213"]
    #[inline(always)]
    pub fn _0x0(self) -> &'a mut W {
        self.variant(TOP_A::_0X0)
    }
    #[doc = "SDHI clock × 214"]
    #[inline(always)]
    pub fn _0x1(self) -> &'a mut W {
        self.variant(TOP_A::_0X1)
    }
    #[doc = "SDHI clock × 215"]
    #[inline(always)]
    pub fn _0x2(self) -> &'a mut W {
        self.variant(TOP_A::_0X2)
    }
    #[doc = "SDHI clock × 216"]
    #[inline(always)]
    pub fn _0x3(self) -> &'a mut W {
        self.variant(TOP_A::_0X3)
    }
    #[doc = "SDHI clock × 217"]
    #[inline(always)]
    pub fn _0x4(self) -> &'a mut W {
        self.variant(TOP_A::_0X4)
    }
    #[doc = "SDHI clock × 218"]
    #[inline(always)]
    pub fn _0x5(self) -> &'a mut W {
        self.variant(TOP_A::_0X5)
    }
    #[doc = "SDHI clock × 219"]
    #[inline(always)]
    pub fn _0x6(self) -> &'a mut W {
        self.variant(TOP_A::_0X6)
    }
    #[doc = "SDHI clock × 220"]
    #[inline(always)]
    pub fn _0x7(self) -> &'a mut W {
        self.variant(TOP_A::_0X7)
    }
    #[doc = "SDHI clock × 221"]
    #[inline(always)]
    pub fn _0x8(self) -> &'a mut W {
        self.variant(TOP_A::_0X8)
    }
    #[doc = "SDHI clock × 222"]
    #[inline(always)]
    pub fn _0x9(self) -> &'a mut W {
        self.variant(TOP_A::_0X9)
    }
    #[doc = "SDHI clock × 223"]
    #[inline(always)]
    pub fn _0x_a(self) -> &'a mut W {
        self.variant(TOP_A::_0X_A)
    }
    #[doc = "SDHI clock × 224"]
    #[inline(always)]
    pub fn _0x_b(self) -> &'a mut W {
        self.variant(TOP_A::_0X_B)
    }
    #[doc = "SDHI clock × 225"]
    #[inline(always)]
    pub fn _0x_c(self) -> &'a mut W {
        self.variant(TOP_A::_0X_C)
    }
    #[doc = "SDHI clock × 226"]
    #[inline(always)]
    pub fn _0x_d(self) -> &'a mut W {
        self.variant(TOP_A::_0X_D)
    }
    #[doc = "SDHI clock × 227"]
    #[inline(always)]
    pub fn _0x_e(self) -> &'a mut W {
        self.variant(TOP_A::_0X_E)
    }
    #[doc = "Setting prohibited"]
    #[inline(always)]
    pub fn _0x_f(self) -> &'a mut W {
        self.variant(TOP_A::_0X_F)
    }
}
#[doc = "Field `TOUTMASK` reader - Timeout Mask"]
pub type TOUTMASK_R = crate::BitReader<TOUTMASK_A>;
#[doc = "Timeout Mask\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TOUTMASK_A {
    #[doc = "0: Activate timeout"]
    _0 = 0,
    #[doc = "1: Inactivate timeout (do not set RSPTO and DTO bits of SD_INFO2 or CRCBSYTO, CRCTO, RDTO, BSYTO1, BSYTO0, RSPTO1 and RSPTO0 bits of SD_ERR_STS2) When timeout occurs because of an inactivated timeout, execute a software reset to terminate the command sequence."]
    _1 = 1,
}
impl From<TOUTMASK_A> for bool {
    #[inline(always)]
    fn from(variant: TOUTMASK_A) -> Self {
        variant as u8 != 0
    }
}
impl TOUTMASK_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> TOUTMASK_A {
        match self.bits {
            false => TOUTMASK_A::_0,
            true => TOUTMASK_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == TOUTMASK_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == TOUTMASK_A::_1
    }
}
#[doc = "Field `TOUTMASK` writer - Timeout Mask"]
pub type TOUTMASK_W<'a, const O: u8> = crate::BitWriter<'a, u32, SD_OPTION_SPEC, TOUTMASK_A, O>;
impl<'a, const O: u8> TOUTMASK_W<'a, O> {
    #[doc = "Activate timeout"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(TOUTMASK_A::_0)
    }
    #[doc = "Inactivate timeout (do not set RSPTO and DTO bits of SD_INFO2 or CRCBSYTO, CRCTO, RDTO, BSYTO1, BSYTO0, RSPTO1 and RSPTO0 bits of SD_ERR_STS2) When timeout occurs because of an inactivated timeout, execute a software reset to terminate the command sequence."]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(TOUTMASK_A::_1)
    }
}
#[doc = "Field `WIDTH8` reader - Bus Width"]
pub type WIDTH8_R = crate::BitReader<bool>;
#[doc = "Field `WIDTH8` writer - Bus Width"]
pub type WIDTH8_W<'a, const O: u8> = crate::BitWriter<'a, u32, SD_OPTION_SPEC, bool, O>;
#[doc = "Field `WIDTH` reader - Bus Width"]
pub type WIDTH_R = crate::BitReader<bool>;
#[doc = "Field `WIDTH` writer - Bus Width"]
pub type WIDTH_W<'a, const O: u8> = crate::BitWriter<'a, u32, SD_OPTION_SPEC, bool, O>;
impl R {
    #[doc = "Bits 0:3 - Card Detection Time Counter"]
    #[inline(always)]
    pub fn ctop(&self) -> CTOP_R {
        CTOP_R::new((self.bits & 0x0f) as u8)
    }
    #[doc = "Bits 4:7 - Timeout Counter"]
    #[inline(always)]
    pub fn top(&self) -> TOP_R {
        TOP_R::new(((self.bits >> 4) & 0x0f) as u8)
    }
    #[doc = "Bit 8 - Timeout Mask"]
    #[inline(always)]
    pub fn toutmask(&self) -> TOUTMASK_R {
        TOUTMASK_R::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "Bit 13 - Bus Width"]
    #[inline(always)]
    pub fn width8(&self) -> WIDTH8_R {
        WIDTH8_R::new(((self.bits >> 13) & 1) != 0)
    }
    #[doc = "Bit 15 - Bus Width"]
    #[inline(always)]
    pub fn width(&self) -> WIDTH_R {
        WIDTH_R::new(((self.bits >> 15) & 1) != 0)
    }
}
impl W {
    #[doc = "Bits 0:3 - Card Detection Time Counter"]
    #[inline(always)]
    #[must_use]
    pub fn ctop(&mut self) -> CTOP_W<0> {
        CTOP_W::new(self)
    }
    #[doc = "Bits 4:7 - Timeout Counter"]
    #[inline(always)]
    #[must_use]
    pub fn top(&mut self) -> TOP_W<4> {
        TOP_W::new(self)
    }
    #[doc = "Bit 8 - Timeout Mask"]
    #[inline(always)]
    #[must_use]
    pub fn toutmask(&mut self) -> TOUTMASK_W<8> {
        TOUTMASK_W::new(self)
    }
    #[doc = "Bit 13 - Bus Width"]
    #[inline(always)]
    #[must_use]
    pub fn width8(&mut self) -> WIDTH8_W<13> {
        WIDTH8_W::new(self)
    }
    #[doc = "Bit 15 - Bus Width"]
    #[inline(always)]
    #[must_use]
    pub fn width(&mut self) -> WIDTH_W<15> {
        WIDTH_W::new(self)
    }
    #[doc = "Writes raw bits to the register."]
    #[inline(always)]
    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
        self.0.bits(bits);
        self
    }
}
#[doc = "SD Card Access Control Option 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 [sd_option](index.html) module"]
pub struct SD_OPTION_SPEC;
impl crate::RegisterSpec for SD_OPTION_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [sd_option::R](R) reader structure"]
impl crate::Readable for SD_OPTION_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [sd_option::W](W) writer structure"]
impl crate::Writable for SD_OPTION_SPEC {
    type Writer = W;
    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
}
#[doc = "`reset()` method sets SD_OPTION to value 0x40ee"]
impl crate::Resettable for SD_OPTION_SPEC {
    const RESET_VALUE: Self::Ux = 0x40ee;
}