1#[doc = "Register `CA0R` reader"]
2pub type R = crate::R<Ca0rSpec>;
3#[doc = "Timeout Clock Frequency\n\nValue on reset: 0"]
4#[derive(Clone, Copy, Debug, PartialEq, Eq)]
5#[repr(u8)]
6pub enum Teoclkfselect {
7 #[doc = "0: Get information via another method"]
8 Other = 0,
9}
10impl From<Teoclkfselect> for u8 {
11 #[inline(always)]
12 fn from(variant: Teoclkfselect) -> Self {
13 variant as _
14 }
15}
16impl crate::FieldSpec for Teoclkfselect {
17 type Ux = u8;
18}
19impl crate::IsEnum for Teoclkfselect {}
20#[doc = "Field `TEOCLKF` reader - Timeout Clock Frequency"]
21pub type TeoclkfR = crate::FieldReader<Teoclkfselect>;
22impl TeoclkfR {
23 #[doc = "Get enumerated values variant"]
24 #[inline(always)]
25 pub const fn variant(&self) -> Option<Teoclkfselect> {
26 match self.bits {
27 0 => Some(Teoclkfselect::Other),
28 _ => None,
29 }
30 }
31 #[doc = "Get information via another method"]
32 #[inline(always)]
33 pub fn is_other(&self) -> bool {
34 *self == Teoclkfselect::Other
35 }
36}
37#[doc = "Timeout Clock Unit\n\nValue on reset: 1"]
38#[derive(Clone, Copy, Debug, PartialEq, Eq)]
39pub enum Teoclkuselect {
40 #[doc = "0: KHz"]
41 Khz = 0,
42 #[doc = "1: MHz"]
43 Mhz = 1,
44}
45impl From<Teoclkuselect> for bool {
46 #[inline(always)]
47 fn from(variant: Teoclkuselect) -> Self {
48 variant as u8 != 0
49 }
50}
51#[doc = "Field `TEOCLKU` reader - Timeout Clock Unit"]
52pub type TeoclkuR = crate::BitReader<Teoclkuselect>;
53impl TeoclkuR {
54 #[doc = "Get enumerated values variant"]
55 #[inline(always)]
56 pub const fn variant(&self) -> Teoclkuselect {
57 match self.bits {
58 false => Teoclkuselect::Khz,
59 true => Teoclkuselect::Mhz,
60 }
61 }
62 #[doc = "KHz"]
63 #[inline(always)]
64 pub fn is_khz(&self) -> bool {
65 *self == Teoclkuselect::Khz
66 }
67 #[doc = "MHz"]
68 #[inline(always)]
69 pub fn is_mhz(&self) -> bool {
70 *self == Teoclkuselect::Mhz
71 }
72}
73#[doc = "Base Clock Frequency\n\nValue on reset: 0"]
74#[derive(Clone, Copy, Debug, PartialEq, Eq)]
75#[repr(u8)]
76pub enum Baseclkfselect {
77 #[doc = "0: Get information via another method"]
78 Other = 0,
79}
80impl From<Baseclkfselect> for u8 {
81 #[inline(always)]
82 fn from(variant: Baseclkfselect) -> Self {
83 variant as _
84 }
85}
86impl crate::FieldSpec for Baseclkfselect {
87 type Ux = u8;
88}
89impl crate::IsEnum for Baseclkfselect {}
90#[doc = "Field `BASECLKF` reader - Base Clock Frequency"]
91pub type BaseclkfR = crate::FieldReader<Baseclkfselect>;
92impl BaseclkfR {
93 #[doc = "Get enumerated values variant"]
94 #[inline(always)]
95 pub const fn variant(&self) -> Option<Baseclkfselect> {
96 match self.bits {
97 0 => Some(Baseclkfselect::Other),
98 _ => None,
99 }
100 }
101 #[doc = "Get information via another method"]
102 #[inline(always)]
103 pub fn is_other(&self) -> bool {
104 *self == Baseclkfselect::Other
105 }
106}
107#[doc = "Max Block Length\n\nValue on reset: 0"]
108#[derive(Clone, Copy, Debug, PartialEq, Eq)]
109#[repr(u8)]
110pub enum Maxblklselect {
111 #[doc = "0: 512 bytes"]
112 _512 = 0,
113}
114impl From<Maxblklselect> for u8 {
115 #[inline(always)]
116 fn from(variant: Maxblklselect) -> Self {
117 variant as _
118 }
119}
120impl crate::FieldSpec for Maxblklselect {
121 type Ux = u8;
122}
123impl crate::IsEnum for Maxblklselect {}
124#[doc = "Field `MAXBLKL` reader - Max Block Length"]
125pub type MaxblklR = crate::FieldReader<Maxblklselect>;
126impl MaxblklR {
127 #[doc = "Get enumerated values variant"]
128 #[inline(always)]
129 pub const fn variant(&self) -> Option<Maxblklselect> {
130 match self.bits {
131 0 => Some(Maxblklselect::_512),
132 _ => None,
133 }
134 }
135 #[doc = "512 bytes"]
136 #[inline(always)]
137 pub fn is_512(&self) -> bool {
138 *self == Maxblklselect::_512
139 }
140}
141#[doc = "8-bit Support for Embedded Device\n\nValue on reset: 0"]
142#[derive(Clone, Copy, Debug, PartialEq, Eq)]
143pub enum Ed8supselect {
144 #[doc = "0: 8-bit Bus Width not Supported"]
145 No = 0,
146 #[doc = "1: 8-bit Bus Width Supported"]
147 Yes = 1,
148}
149impl From<Ed8supselect> for bool {
150 #[inline(always)]
151 fn from(variant: Ed8supselect) -> Self {
152 variant as u8 != 0
153 }
154}
155#[doc = "Field `ED8SUP` reader - 8-bit Support for Embedded Device"]
156pub type Ed8supR = crate::BitReader<Ed8supselect>;
157impl Ed8supR {
158 #[doc = "Get enumerated values variant"]
159 #[inline(always)]
160 pub const fn variant(&self) -> Ed8supselect {
161 match self.bits {
162 false => Ed8supselect::No,
163 true => Ed8supselect::Yes,
164 }
165 }
166 #[doc = "8-bit Bus Width not Supported"]
167 #[inline(always)]
168 pub fn is_no(&self) -> bool {
169 *self == Ed8supselect::No
170 }
171 #[doc = "8-bit Bus Width Supported"]
172 #[inline(always)]
173 pub fn is_yes(&self) -> bool {
174 *self == Ed8supselect::Yes
175 }
176}
177#[doc = "ADMA2 Support\n\nValue on reset: 1"]
178#[derive(Clone, Copy, Debug, PartialEq, Eq)]
179pub enum Adma2supselect {
180 #[doc = "0: ADMA2 not Supported"]
181 No = 0,
182 #[doc = "1: ADMA2 Supported"]
183 Yes = 1,
184}
185impl From<Adma2supselect> for bool {
186 #[inline(always)]
187 fn from(variant: Adma2supselect) -> Self {
188 variant as u8 != 0
189 }
190}
191#[doc = "Field `ADMA2SUP` reader - ADMA2 Support"]
192pub type Adma2supR = crate::BitReader<Adma2supselect>;
193impl Adma2supR {
194 #[doc = "Get enumerated values variant"]
195 #[inline(always)]
196 pub const fn variant(&self) -> Adma2supselect {
197 match self.bits {
198 false => Adma2supselect::No,
199 true => Adma2supselect::Yes,
200 }
201 }
202 #[doc = "ADMA2 not Supported"]
203 #[inline(always)]
204 pub fn is_no(&self) -> bool {
205 *self == Adma2supselect::No
206 }
207 #[doc = "ADMA2 Supported"]
208 #[inline(always)]
209 pub fn is_yes(&self) -> bool {
210 *self == Adma2supselect::Yes
211 }
212}
213#[doc = "High Speed Support\n\nValue on reset: 1"]
214#[derive(Clone, Copy, Debug, PartialEq, Eq)]
215pub enum Hssupselect {
216 #[doc = "0: High Speed not Supported"]
217 No = 0,
218 #[doc = "1: High Speed Supported"]
219 Yes = 1,
220}
221impl From<Hssupselect> for bool {
222 #[inline(always)]
223 fn from(variant: Hssupselect) -> Self {
224 variant as u8 != 0
225 }
226}
227#[doc = "Field `HSSUP` reader - High Speed Support"]
228pub type HssupR = crate::BitReader<Hssupselect>;
229impl HssupR {
230 #[doc = "Get enumerated values variant"]
231 #[inline(always)]
232 pub const fn variant(&self) -> Hssupselect {
233 match self.bits {
234 false => Hssupselect::No,
235 true => Hssupselect::Yes,
236 }
237 }
238 #[doc = "High Speed not Supported"]
239 #[inline(always)]
240 pub fn is_no(&self) -> bool {
241 *self == Hssupselect::No
242 }
243 #[doc = "High Speed Supported"]
244 #[inline(always)]
245 pub fn is_yes(&self) -> bool {
246 *self == Hssupselect::Yes
247 }
248}
249#[doc = "SDMA Support\n\nValue on reset: 1"]
250#[derive(Clone, Copy, Debug, PartialEq, Eq)]
251pub enum Sdmasupselect {
252 #[doc = "0: SDMA not Supported"]
253 No = 0,
254 #[doc = "1: SDMA Supported"]
255 Yes = 1,
256}
257impl From<Sdmasupselect> for bool {
258 #[inline(always)]
259 fn from(variant: Sdmasupselect) -> Self {
260 variant as u8 != 0
261 }
262}
263#[doc = "Field `SDMASUP` reader - SDMA Support"]
264pub type SdmasupR = crate::BitReader<Sdmasupselect>;
265impl SdmasupR {
266 #[doc = "Get enumerated values variant"]
267 #[inline(always)]
268 pub const fn variant(&self) -> Sdmasupselect {
269 match self.bits {
270 false => Sdmasupselect::No,
271 true => Sdmasupselect::Yes,
272 }
273 }
274 #[doc = "SDMA not Supported"]
275 #[inline(always)]
276 pub fn is_no(&self) -> bool {
277 *self == Sdmasupselect::No
278 }
279 #[doc = "SDMA Supported"]
280 #[inline(always)]
281 pub fn is_yes(&self) -> bool {
282 *self == Sdmasupselect::Yes
283 }
284}
285#[doc = "Suspend/Resume Support\n\nValue on reset: 1"]
286#[derive(Clone, Copy, Debug, PartialEq, Eq)]
287pub enum Srsupselect {
288 #[doc = "0: Suspend/Resume not Supported"]
289 No = 0,
290 #[doc = "1: Suspend/Resume Supported"]
291 Yes = 1,
292}
293impl From<Srsupselect> for bool {
294 #[inline(always)]
295 fn from(variant: Srsupselect) -> Self {
296 variant as u8 != 0
297 }
298}
299#[doc = "Field `SRSUP` reader - Suspend/Resume Support"]
300pub type SrsupR = crate::BitReader<Srsupselect>;
301impl SrsupR {
302 #[doc = "Get enumerated values variant"]
303 #[inline(always)]
304 pub const fn variant(&self) -> Srsupselect {
305 match self.bits {
306 false => Srsupselect::No,
307 true => Srsupselect::Yes,
308 }
309 }
310 #[doc = "Suspend/Resume not Supported"]
311 #[inline(always)]
312 pub fn is_no(&self) -> bool {
313 *self == Srsupselect::No
314 }
315 #[doc = "Suspend/Resume Supported"]
316 #[inline(always)]
317 pub fn is_yes(&self) -> bool {
318 *self == Srsupselect::Yes
319 }
320}
321#[doc = "Voltage Support 3.3V\n\nValue on reset: 1"]
322#[derive(Clone, Copy, Debug, PartialEq, Eq)]
323pub enum V33vsupselect {
324 #[doc = "0: 3.3V Not Supported"]
325 No = 0,
326 #[doc = "1: 3.3V Supported"]
327 Yes = 1,
328}
329impl From<V33vsupselect> for bool {
330 #[inline(always)]
331 fn from(variant: V33vsupselect) -> Self {
332 variant as u8 != 0
333 }
334}
335#[doc = "Field `V33VSUP` reader - Voltage Support 3.3V"]
336pub type V33vsupR = crate::BitReader<V33vsupselect>;
337impl V33vsupR {
338 #[doc = "Get enumerated values variant"]
339 #[inline(always)]
340 pub const fn variant(&self) -> V33vsupselect {
341 match self.bits {
342 false => V33vsupselect::No,
343 true => V33vsupselect::Yes,
344 }
345 }
346 #[doc = "3.3V Not Supported"]
347 #[inline(always)]
348 pub fn is_no(&self) -> bool {
349 *self == V33vsupselect::No
350 }
351 #[doc = "3.3V Supported"]
352 #[inline(always)]
353 pub fn is_yes(&self) -> bool {
354 *self == V33vsupselect::Yes
355 }
356}
357#[doc = "Voltage Support 3.0V\n\nValue on reset: 1"]
358#[derive(Clone, Copy, Debug, PartialEq, Eq)]
359pub enum V30vsupselect {
360 #[doc = "0: 3.0V Not Supported"]
361 No = 0,
362 #[doc = "1: 3.0V Supported"]
363 Yes = 1,
364}
365impl From<V30vsupselect> for bool {
366 #[inline(always)]
367 fn from(variant: V30vsupselect) -> Self {
368 variant as u8 != 0
369 }
370}
371#[doc = "Field `V30VSUP` reader - Voltage Support 3.0V"]
372pub type V30vsupR = crate::BitReader<V30vsupselect>;
373impl V30vsupR {
374 #[doc = "Get enumerated values variant"]
375 #[inline(always)]
376 pub const fn variant(&self) -> V30vsupselect {
377 match self.bits {
378 false => V30vsupselect::No,
379 true => V30vsupselect::Yes,
380 }
381 }
382 #[doc = "3.0V Not Supported"]
383 #[inline(always)]
384 pub fn is_no(&self) -> bool {
385 *self == V30vsupselect::No
386 }
387 #[doc = "3.0V Supported"]
388 #[inline(always)]
389 pub fn is_yes(&self) -> bool {
390 *self == V30vsupselect::Yes
391 }
392}
393#[doc = "Voltage Support 1.8V\n\nValue on reset: 1"]
394#[derive(Clone, Copy, Debug, PartialEq, Eq)]
395pub enum V18vsupselect {
396 #[doc = "0: 1.8V Not Supported"]
397 No = 0,
398 #[doc = "1: 1.8V Supported"]
399 Yes = 1,
400}
401impl From<V18vsupselect> for bool {
402 #[inline(always)]
403 fn from(variant: V18vsupselect) -> Self {
404 variant as u8 != 0
405 }
406}
407#[doc = "Field `V18VSUP` reader - Voltage Support 1.8V"]
408pub type V18vsupR = crate::BitReader<V18vsupselect>;
409impl V18vsupR {
410 #[doc = "Get enumerated values variant"]
411 #[inline(always)]
412 pub const fn variant(&self) -> V18vsupselect {
413 match self.bits {
414 false => V18vsupselect::No,
415 true => V18vsupselect::Yes,
416 }
417 }
418 #[doc = "1.8V Not Supported"]
419 #[inline(always)]
420 pub fn is_no(&self) -> bool {
421 *self == V18vsupselect::No
422 }
423 #[doc = "1.8V Supported"]
424 #[inline(always)]
425 pub fn is_yes(&self) -> bool {
426 *self == V18vsupselect::Yes
427 }
428}
429#[doc = "64-Bit System Bus Support\n\nValue on reset: 0"]
430#[derive(Clone, Copy, Debug, PartialEq, Eq)]
431pub enum Sb64supselect {
432 #[doc = "0: 32-bit Address Descriptors and System Bus"]
433 No = 0,
434 #[doc = "1: 64-bit Address Descriptors and System Bus"]
435 Yes = 1,
436}
437impl From<Sb64supselect> for bool {
438 #[inline(always)]
439 fn from(variant: Sb64supselect) -> Self {
440 variant as u8 != 0
441 }
442}
443#[doc = "Field `SB64SUP` reader - 64-Bit System Bus Support"]
444pub type Sb64supR = crate::BitReader<Sb64supselect>;
445impl Sb64supR {
446 #[doc = "Get enumerated values variant"]
447 #[inline(always)]
448 pub const fn variant(&self) -> Sb64supselect {
449 match self.bits {
450 false => Sb64supselect::No,
451 true => Sb64supselect::Yes,
452 }
453 }
454 #[doc = "32-bit Address Descriptors and System Bus"]
455 #[inline(always)]
456 pub fn is_no(&self) -> bool {
457 *self == Sb64supselect::No
458 }
459 #[doc = "64-bit Address Descriptors and System Bus"]
460 #[inline(always)]
461 pub fn is_yes(&self) -> bool {
462 *self == Sb64supselect::Yes
463 }
464}
465#[doc = "Asynchronous Interrupt Support\n\nValue on reset: 1"]
466#[derive(Clone, Copy, Debug, PartialEq, Eq)]
467pub enum Asintsupselect {
468 #[doc = "0: Asynchronous Interrupt not Supported"]
469 No = 0,
470 #[doc = "1: Asynchronous Interrupt supported"]
471 Yes = 1,
472}
473impl From<Asintsupselect> for bool {
474 #[inline(always)]
475 fn from(variant: Asintsupselect) -> Self {
476 variant as u8 != 0
477 }
478}
479#[doc = "Field `ASINTSUP` reader - Asynchronous Interrupt Support"]
480pub type AsintsupR = crate::BitReader<Asintsupselect>;
481impl AsintsupR {
482 #[doc = "Get enumerated values variant"]
483 #[inline(always)]
484 pub const fn variant(&self) -> Asintsupselect {
485 match self.bits {
486 false => Asintsupselect::No,
487 true => Asintsupselect::Yes,
488 }
489 }
490 #[doc = "Asynchronous Interrupt not Supported"]
491 #[inline(always)]
492 pub fn is_no(&self) -> bool {
493 *self == Asintsupselect::No
494 }
495 #[doc = "Asynchronous Interrupt supported"]
496 #[inline(always)]
497 pub fn is_yes(&self) -> bool {
498 *self == Asintsupselect::Yes
499 }
500}
501#[doc = "Slot Type\n\nValue on reset: 0"]
502#[derive(Clone, Copy, Debug, PartialEq, Eq)]
503#[repr(u8)]
504pub enum Sltypeselect {
505 #[doc = "0: Removable Card Slot"]
506 Removable = 0,
507 #[doc = "1: Embedded Slot for One Device"]
508 Embedded = 1,
509}
510impl From<Sltypeselect> for u8 {
511 #[inline(always)]
512 fn from(variant: Sltypeselect) -> Self {
513 variant as _
514 }
515}
516impl crate::FieldSpec for Sltypeselect {
517 type Ux = u8;
518}
519impl crate::IsEnum for Sltypeselect {}
520#[doc = "Field `SLTYPE` reader - Slot Type"]
521pub type SltypeR = crate::FieldReader<Sltypeselect>;
522impl SltypeR {
523 #[doc = "Get enumerated values variant"]
524 #[inline(always)]
525 pub const fn variant(&self) -> Option<Sltypeselect> {
526 match self.bits {
527 0 => Some(Sltypeselect::Removable),
528 1 => Some(Sltypeselect::Embedded),
529 _ => None,
530 }
531 }
532 #[doc = "Removable Card Slot"]
533 #[inline(always)]
534 pub fn is_removable(&self) -> bool {
535 *self == Sltypeselect::Removable
536 }
537 #[doc = "Embedded Slot for One Device"]
538 #[inline(always)]
539 pub fn is_embedded(&self) -> bool {
540 *self == Sltypeselect::Embedded
541 }
542}
543impl R {
544 #[doc = "Bits 0:5 - Timeout Clock Frequency"]
545 #[inline(always)]
546 pub fn teoclkf(&self) -> TeoclkfR {
547 TeoclkfR::new((self.bits & 0x3f) as u8)
548 }
549 #[doc = "Bit 7 - Timeout Clock Unit"]
550 #[inline(always)]
551 pub fn teoclku(&self) -> TeoclkuR {
552 TeoclkuR::new(((self.bits >> 7) & 1) != 0)
553 }
554 #[doc = "Bits 8:15 - Base Clock Frequency"]
555 #[inline(always)]
556 pub fn baseclkf(&self) -> BaseclkfR {
557 BaseclkfR::new(((self.bits >> 8) & 0xff) as u8)
558 }
559 #[doc = "Bits 16:17 - Max Block Length"]
560 #[inline(always)]
561 pub fn maxblkl(&self) -> MaxblklR {
562 MaxblklR::new(((self.bits >> 16) & 3) as u8)
563 }
564 #[doc = "Bit 18 - 8-bit Support for Embedded Device"]
565 #[inline(always)]
566 pub fn ed8sup(&self) -> Ed8supR {
567 Ed8supR::new(((self.bits >> 18) & 1) != 0)
568 }
569 #[doc = "Bit 19 - ADMA2 Support"]
570 #[inline(always)]
571 pub fn adma2sup(&self) -> Adma2supR {
572 Adma2supR::new(((self.bits >> 19) & 1) != 0)
573 }
574 #[doc = "Bit 21 - High Speed Support"]
575 #[inline(always)]
576 pub fn hssup(&self) -> HssupR {
577 HssupR::new(((self.bits >> 21) & 1) != 0)
578 }
579 #[doc = "Bit 22 - SDMA Support"]
580 #[inline(always)]
581 pub fn sdmasup(&self) -> SdmasupR {
582 SdmasupR::new(((self.bits >> 22) & 1) != 0)
583 }
584 #[doc = "Bit 23 - Suspend/Resume Support"]
585 #[inline(always)]
586 pub fn srsup(&self) -> SrsupR {
587 SrsupR::new(((self.bits >> 23) & 1) != 0)
588 }
589 #[doc = "Bit 24 - Voltage Support 3.3V"]
590 #[inline(always)]
591 pub fn v33vsup(&self) -> V33vsupR {
592 V33vsupR::new(((self.bits >> 24) & 1) != 0)
593 }
594 #[doc = "Bit 25 - Voltage Support 3.0V"]
595 #[inline(always)]
596 pub fn v30vsup(&self) -> V30vsupR {
597 V30vsupR::new(((self.bits >> 25) & 1) != 0)
598 }
599 #[doc = "Bit 26 - Voltage Support 1.8V"]
600 #[inline(always)]
601 pub fn v18vsup(&self) -> V18vsupR {
602 V18vsupR::new(((self.bits >> 26) & 1) != 0)
603 }
604 #[doc = "Bit 28 - 64-Bit System Bus Support"]
605 #[inline(always)]
606 pub fn sb64sup(&self) -> Sb64supR {
607 Sb64supR::new(((self.bits >> 28) & 1) != 0)
608 }
609 #[doc = "Bit 29 - Asynchronous Interrupt Support"]
610 #[inline(always)]
611 pub fn asintsup(&self) -> AsintsupR {
612 AsintsupR::new(((self.bits >> 29) & 1) != 0)
613 }
614 #[doc = "Bits 30:31 - Slot Type"]
615 #[inline(always)]
616 pub fn sltype(&self) -> SltypeR {
617 SltypeR::new(((self.bits >> 30) & 3) as u8)
618 }
619}
620#[doc = "Capabilities 0\n\nYou can [`read`](crate::Reg::read) this register and get [`ca0r::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
621pub struct Ca0rSpec;
622impl crate::RegisterSpec for Ca0rSpec {
623 type Ux = u32;
624}
625#[doc = "`read()` method returns [`ca0r::R`](R) reader structure"]
626impl crate::Readable for Ca0rSpec {}
627#[doc = "`reset()` method sets CA0R to value 0x27e8_0080"]
628impl crate::Resettable for Ca0rSpec {
629 const RESET_VALUE: u32 = 0x27e8_0080;
630}