xmc4500/sdmmc/
capabilities_hi.rs

1#[doc = "Register `CAPABILITIES_HI` reader"]
2pub type R = crate::R<CAPABILITIES_HI_SPEC>;
3#[doc = "SDR50 Support\n\nValue on reset: 0"]
4#[derive(Clone, Copy, Debug, PartialEq, Eq)]
5pub enum SDR50_SUPPORT_A {
6    #[doc = "0: SDR50 is not supported"]
7    VALUE1 = 0,
8}
9impl From<SDR50_SUPPORT_A> for bool {
10    #[inline(always)]
11    fn from(variant: SDR50_SUPPORT_A) -> Self {
12        variant as u8 != 0
13    }
14}
15#[doc = "Field `SDR50_SUPPORT` reader - SDR50 Support"]
16pub type SDR50_SUPPORT_R = crate::BitReader<SDR50_SUPPORT_A>;
17impl SDR50_SUPPORT_R {
18    #[doc = "Get enumerated values variant"]
19    #[inline(always)]
20    pub const fn variant(&self) -> Option<SDR50_SUPPORT_A> {
21        match self.bits {
22            false => Some(SDR50_SUPPORT_A::VALUE1),
23            _ => None,
24        }
25    }
26    #[doc = "SDR50 is not supported"]
27    #[inline(always)]
28    pub fn is_value1(&self) -> bool {
29        *self == SDR50_SUPPORT_A::VALUE1
30    }
31}
32#[doc = "SDR104 Support\n\nValue on reset: 0"]
33#[derive(Clone, Copy, Debug, PartialEq, Eq)]
34pub enum SDR104_SUPPORT_A {
35    #[doc = "0: SDR104 is not supported"]
36    VALUE1 = 0,
37}
38impl From<SDR104_SUPPORT_A> for bool {
39    #[inline(always)]
40    fn from(variant: SDR104_SUPPORT_A) -> Self {
41        variant as u8 != 0
42    }
43}
44#[doc = "Field `SDR104_SUPPORT` reader - SDR104 Support"]
45pub type SDR104_SUPPORT_R = crate::BitReader<SDR104_SUPPORT_A>;
46impl SDR104_SUPPORT_R {
47    #[doc = "Get enumerated values variant"]
48    #[inline(always)]
49    pub const fn variant(&self) -> Option<SDR104_SUPPORT_A> {
50        match self.bits {
51            false => Some(SDR104_SUPPORT_A::VALUE1),
52            _ => None,
53        }
54    }
55    #[doc = "SDR104 is not supported"]
56    #[inline(always)]
57    pub fn is_value1(&self) -> bool {
58        *self == SDR104_SUPPORT_A::VALUE1
59    }
60}
61#[doc = "DDR50 Support\n\nValue on reset: 0"]
62#[derive(Clone, Copy, Debug, PartialEq, Eq)]
63pub enum DDR50_SUPPORT_A {
64    #[doc = "0: DDR50 is not supported"]
65    VALUE1 = 0,
66}
67impl From<DDR50_SUPPORT_A> for bool {
68    #[inline(always)]
69    fn from(variant: DDR50_SUPPORT_A) -> Self {
70        variant as u8 != 0
71    }
72}
73#[doc = "Field `DDR50_SUPPORT` reader - DDR50 Support"]
74pub type DDR50_SUPPORT_R = crate::BitReader<DDR50_SUPPORT_A>;
75impl DDR50_SUPPORT_R {
76    #[doc = "Get enumerated values variant"]
77    #[inline(always)]
78    pub const fn variant(&self) -> Option<DDR50_SUPPORT_A> {
79        match self.bits {
80            false => Some(DDR50_SUPPORT_A::VALUE1),
81            _ => None,
82        }
83    }
84    #[doc = "DDR50 is not supported"]
85    #[inline(always)]
86    pub fn is_value1(&self) -> bool {
87        *self == DDR50_SUPPORT_A::VALUE1
88    }
89}
90#[doc = "Driver Type A Support\n\nValue on reset: 0"]
91#[derive(Clone, Copy, Debug, PartialEq, Eq)]
92pub enum DRV_A_SUPPORT_A {
93    #[doc = "0: Driver Type A is not supported"]
94    VALUE1 = 0,
95}
96impl From<DRV_A_SUPPORT_A> for bool {
97    #[inline(always)]
98    fn from(variant: DRV_A_SUPPORT_A) -> Self {
99        variant as u8 != 0
100    }
101}
102#[doc = "Field `DRV_A_SUPPORT` reader - Driver Type A Support"]
103pub type DRV_A_SUPPORT_R = crate::BitReader<DRV_A_SUPPORT_A>;
104impl DRV_A_SUPPORT_R {
105    #[doc = "Get enumerated values variant"]
106    #[inline(always)]
107    pub const fn variant(&self) -> Option<DRV_A_SUPPORT_A> {
108        match self.bits {
109            false => Some(DRV_A_SUPPORT_A::VALUE1),
110            _ => None,
111        }
112    }
113    #[doc = "Driver Type A is not supported"]
114    #[inline(always)]
115    pub fn is_value1(&self) -> bool {
116        *self == DRV_A_SUPPORT_A::VALUE1
117    }
118}
119#[doc = "Driver Type C Support\n\nValue on reset: 0"]
120#[derive(Clone, Copy, Debug, PartialEq, Eq)]
121pub enum DRV_C_SUPPORT_A {
122    #[doc = "0: Driver Type C is not supported"]
123    VALUE1 = 0,
124}
125impl From<DRV_C_SUPPORT_A> for bool {
126    #[inline(always)]
127    fn from(variant: DRV_C_SUPPORT_A) -> Self {
128        variant as u8 != 0
129    }
130}
131#[doc = "Field `DRV_C_SUPPORT` reader - Driver Type C Support"]
132pub type DRV_C_SUPPORT_R = crate::BitReader<DRV_C_SUPPORT_A>;
133impl DRV_C_SUPPORT_R {
134    #[doc = "Get enumerated values variant"]
135    #[inline(always)]
136    pub const fn variant(&self) -> Option<DRV_C_SUPPORT_A> {
137        match self.bits {
138            false => Some(DRV_C_SUPPORT_A::VALUE1),
139            _ => None,
140        }
141    }
142    #[doc = "Driver Type C is not supported"]
143    #[inline(always)]
144    pub fn is_value1(&self) -> bool {
145        *self == DRV_C_SUPPORT_A::VALUE1
146    }
147}
148#[doc = "Driver Type D Support\n\nValue on reset: 0"]
149#[derive(Clone, Copy, Debug, PartialEq, Eq)]
150pub enum DRV_D_SUPPORT_A {
151    #[doc = "0: Driver Type D is not supported"]
152    VALUE1 = 0,
153}
154impl From<DRV_D_SUPPORT_A> for bool {
155    #[inline(always)]
156    fn from(variant: DRV_D_SUPPORT_A) -> Self {
157        variant as u8 != 0
158    }
159}
160#[doc = "Field `DRV_D_SUPPORT` reader - Driver Type D Support"]
161pub type DRV_D_SUPPORT_R = crate::BitReader<DRV_D_SUPPORT_A>;
162impl DRV_D_SUPPORT_R {
163    #[doc = "Get enumerated values variant"]
164    #[inline(always)]
165    pub const fn variant(&self) -> Option<DRV_D_SUPPORT_A> {
166        match self.bits {
167            false => Some(DRV_D_SUPPORT_A::VALUE1),
168            _ => None,
169        }
170    }
171    #[doc = "Driver Type D is not supported"]
172    #[inline(always)]
173    pub fn is_value1(&self) -> bool {
174        *self == DRV_D_SUPPORT_A::VALUE1
175    }
176}
177#[doc = "Timer count for Re-Tuning\n\nValue on reset: 0"]
178#[derive(Clone, Copy, Debug, PartialEq, Eq)]
179#[repr(u8)]
180pub enum TIM_CNT_RETUNE_A {
181    #[doc = "0: Get information via other source"]
182    VALUE1 = 0,
183}
184impl From<TIM_CNT_RETUNE_A> for u8 {
185    #[inline(always)]
186    fn from(variant: TIM_CNT_RETUNE_A) -> Self {
187        variant as _
188    }
189}
190impl crate::FieldSpec for TIM_CNT_RETUNE_A {
191    type Ux = u8;
192}
193impl crate::IsEnum for TIM_CNT_RETUNE_A {}
194#[doc = "Field `TIM_CNT_RETUNE` reader - Timer count for Re-Tuning"]
195pub type TIM_CNT_RETUNE_R = crate::FieldReader<TIM_CNT_RETUNE_A>;
196impl TIM_CNT_RETUNE_R {
197    #[doc = "Get enumerated values variant"]
198    #[inline(always)]
199    pub const fn variant(&self) -> Option<TIM_CNT_RETUNE_A> {
200        match self.bits {
201            0 => Some(TIM_CNT_RETUNE_A::VALUE1),
202            _ => None,
203        }
204    }
205    #[doc = "Get information via other source"]
206    #[inline(always)]
207    pub fn is_value1(&self) -> bool {
208        *self == TIM_CNT_RETUNE_A::VALUE1
209    }
210}
211#[doc = "Use Tuning for SDR50\n\nValue on reset: 0"]
212#[derive(Clone, Copy, Debug, PartialEq, Eq)]
213pub enum USE_TUNING_SDR50_A {
214    #[doc = "0: SDR50 does not require tuning"]
215    VALUE1 = 0,
216}
217impl From<USE_TUNING_SDR50_A> for bool {
218    #[inline(always)]
219    fn from(variant: USE_TUNING_SDR50_A) -> Self {
220        variant as u8 != 0
221    }
222}
223#[doc = "Field `USE_TUNING_SDR50` reader - Use Tuning for SDR50"]
224pub type USE_TUNING_SDR50_R = crate::BitReader<USE_TUNING_SDR50_A>;
225impl USE_TUNING_SDR50_R {
226    #[doc = "Get enumerated values variant"]
227    #[inline(always)]
228    pub const fn variant(&self) -> Option<USE_TUNING_SDR50_A> {
229        match self.bits {
230            false => Some(USE_TUNING_SDR50_A::VALUE1),
231            _ => None,
232        }
233    }
234    #[doc = "SDR50 does not require tuning"]
235    #[inline(always)]
236    pub fn is_value1(&self) -> bool {
237        *self == USE_TUNING_SDR50_A::VALUE1
238    }
239}
240#[doc = "Re-tuning modes\n\nValue on reset: 0"]
241#[derive(Clone, Copy, Debug, PartialEq, Eq)]
242#[repr(u8)]
243pub enum RE_TUNING_MODES_A {
244    #[doc = "0: Mode 1"]
245    VALUE1 = 0,
246}
247impl From<RE_TUNING_MODES_A> for u8 {
248    #[inline(always)]
249    fn from(variant: RE_TUNING_MODES_A) -> Self {
250        variant as _
251    }
252}
253impl crate::FieldSpec for RE_TUNING_MODES_A {
254    type Ux = u8;
255}
256impl crate::IsEnum for RE_TUNING_MODES_A {}
257#[doc = "Field `RE_TUNING_MODES` reader - Re-tuning modes"]
258pub type RE_TUNING_MODES_R = crate::FieldReader<RE_TUNING_MODES_A>;
259impl RE_TUNING_MODES_R {
260    #[doc = "Get enumerated values variant"]
261    #[inline(always)]
262    pub const fn variant(&self) -> Option<RE_TUNING_MODES_A> {
263        match self.bits {
264            0 => Some(RE_TUNING_MODES_A::VALUE1),
265            _ => None,
266        }
267    }
268    #[doc = "Mode 1"]
269    #[inline(always)]
270    pub fn is_value1(&self) -> bool {
271        *self == RE_TUNING_MODES_A::VALUE1
272    }
273}
274#[doc = "Clock Multiplier\n\nValue on reset: 0"]
275#[derive(Clone, Copy, Debug, PartialEq, Eq)]
276#[repr(u8)]
277pub enum CLK_MULT_A {
278    #[doc = "0: Clock Multiplier not supported"]
279    VALUE1 = 0,
280}
281impl From<CLK_MULT_A> for u8 {
282    #[inline(always)]
283    fn from(variant: CLK_MULT_A) -> Self {
284        variant as _
285    }
286}
287impl crate::FieldSpec for CLK_MULT_A {
288    type Ux = u8;
289}
290impl crate::IsEnum for CLK_MULT_A {}
291#[doc = "Field `CLK_MULT` reader - Clock Multiplier"]
292pub type CLK_MULT_R = crate::FieldReader<CLK_MULT_A>;
293impl CLK_MULT_R {
294    #[doc = "Get enumerated values variant"]
295    #[inline(always)]
296    pub const fn variant(&self) -> Option<CLK_MULT_A> {
297        match self.bits {
298            0 => Some(CLK_MULT_A::VALUE1),
299            _ => None,
300        }
301    }
302    #[doc = "Clock Multiplier not supported"]
303    #[inline(always)]
304    pub fn is_value1(&self) -> bool {
305        *self == CLK_MULT_A::VALUE1
306    }
307}
308impl R {
309    #[doc = "Bit 0 - SDR50 Support"]
310    #[inline(always)]
311    pub fn sdr50_support(&self) -> SDR50_SUPPORT_R {
312        SDR50_SUPPORT_R::new((self.bits & 1) != 0)
313    }
314    #[doc = "Bit 1 - SDR104 Support"]
315    #[inline(always)]
316    pub fn sdr104_support(&self) -> SDR104_SUPPORT_R {
317        SDR104_SUPPORT_R::new(((self.bits >> 1) & 1) != 0)
318    }
319    #[doc = "Bit 2 - DDR50 Support"]
320    #[inline(always)]
321    pub fn ddr50_support(&self) -> DDR50_SUPPORT_R {
322        DDR50_SUPPORT_R::new(((self.bits >> 2) & 1) != 0)
323    }
324    #[doc = "Bit 4 - Driver Type A Support"]
325    #[inline(always)]
326    pub fn drv_a_support(&self) -> DRV_A_SUPPORT_R {
327        DRV_A_SUPPORT_R::new(((self.bits >> 4) & 1) != 0)
328    }
329    #[doc = "Bit 5 - Driver Type C Support"]
330    #[inline(always)]
331    pub fn drv_c_support(&self) -> DRV_C_SUPPORT_R {
332        DRV_C_SUPPORT_R::new(((self.bits >> 5) & 1) != 0)
333    }
334    #[doc = "Bit 6 - Driver Type D Support"]
335    #[inline(always)]
336    pub fn drv_d_support(&self) -> DRV_D_SUPPORT_R {
337        DRV_D_SUPPORT_R::new(((self.bits >> 6) & 1) != 0)
338    }
339    #[doc = "Bits 8:11 - Timer count for Re-Tuning"]
340    #[inline(always)]
341    pub fn tim_cnt_retune(&self) -> TIM_CNT_RETUNE_R {
342        TIM_CNT_RETUNE_R::new(((self.bits >> 8) & 0x0f) as u8)
343    }
344    #[doc = "Bit 13 - Use Tuning for SDR50"]
345    #[inline(always)]
346    pub fn use_tuning_sdr50(&self) -> USE_TUNING_SDR50_R {
347        USE_TUNING_SDR50_R::new(((self.bits >> 13) & 1) != 0)
348    }
349    #[doc = "Bits 14:15 - Re-tuning modes"]
350    #[inline(always)]
351    pub fn re_tuning_modes(&self) -> RE_TUNING_MODES_R {
352        RE_TUNING_MODES_R::new(((self.bits >> 14) & 3) as u8)
353    }
354    #[doc = "Bits 16:23 - Clock Multiplier"]
355    #[inline(always)]
356    pub fn clk_mult(&self) -> CLK_MULT_R {
357        CLK_MULT_R::new(((self.bits >> 16) & 0xff) as u8)
358    }
359}
360#[doc = "Capabilities Register High\n\nYou can [`read`](crate::Reg::read) this register and get [`capabilities_hi::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
361pub struct CAPABILITIES_HI_SPEC;
362impl crate::RegisterSpec for CAPABILITIES_HI_SPEC {
363    type Ux = u32;
364}
365#[doc = "`read()` method returns [`capabilities_hi::R`](R) reader structure"]
366impl crate::Readable for CAPABILITIES_HI_SPEC {}
367#[doc = "`reset()` method sets CAPABILITIES_HI to value 0x0300_0000"]
368impl crate::Resettable for CAPABILITIES_HI_SPEC {
369    const RESET_VALUE: u32 = 0x0300_0000;
370}