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
#[doc = "Register `CAPABILITIES_HI` reader"]
pub type R = crate::R<CapabilitiesHiSpec>;
#[doc = "SDR50 Support\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Sdr50Support {
    #[doc = "0: SDR50 is not supported"]
    Value1 = 0,
}
impl From<Sdr50Support> for bool {
    #[inline(always)]
    fn from(variant: Sdr50Support) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `SDR50_SUPPORT` reader - SDR50 Support"]
pub type Sdr50SupportR = crate::BitReader<Sdr50Support>;
impl Sdr50SupportR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<Sdr50Support> {
        match self.bits {
            false => Some(Sdr50Support::Value1),
            _ => None,
        }
    }
    #[doc = "SDR50 is not supported"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == Sdr50Support::Value1
    }
}
#[doc = "SDR104 Support\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Sdr104Support {
    #[doc = "0: SDR104 is not supported"]
    Value1 = 0,
}
impl From<Sdr104Support> for bool {
    #[inline(always)]
    fn from(variant: Sdr104Support) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `SDR104_SUPPORT` reader - SDR104 Support"]
pub type Sdr104SupportR = crate::BitReader<Sdr104Support>;
impl Sdr104SupportR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<Sdr104Support> {
        match self.bits {
            false => Some(Sdr104Support::Value1),
            _ => None,
        }
    }
    #[doc = "SDR104 is not supported"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == Sdr104Support::Value1
    }
}
#[doc = "DDR50 Support\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Ddr50Support {
    #[doc = "0: DDR50 is not supported"]
    Value1 = 0,
}
impl From<Ddr50Support> for bool {
    #[inline(always)]
    fn from(variant: Ddr50Support) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `DDR50_SUPPORT` reader - DDR50 Support"]
pub type Ddr50SupportR = crate::BitReader<Ddr50Support>;
impl Ddr50SupportR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<Ddr50Support> {
        match self.bits {
            false => Some(Ddr50Support::Value1),
            _ => None,
        }
    }
    #[doc = "DDR50 is not supported"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == Ddr50Support::Value1
    }
}
#[doc = "Driver Type A Support\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum DrvASupport {
    #[doc = "0: Driver Type A is not supported"]
    Value1 = 0,
}
impl From<DrvASupport> for bool {
    #[inline(always)]
    fn from(variant: DrvASupport) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `DRV_A_SUPPORT` reader - Driver Type A Support"]
pub type DrvASupportR = crate::BitReader<DrvASupport>;
impl DrvASupportR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<DrvASupport> {
        match self.bits {
            false => Some(DrvASupport::Value1),
            _ => None,
        }
    }
    #[doc = "Driver Type A is not supported"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == DrvASupport::Value1
    }
}
#[doc = "Driver Type C Support\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum DrvCSupport {
    #[doc = "0: Driver Type C is not supported"]
    Value1 = 0,
}
impl From<DrvCSupport> for bool {
    #[inline(always)]
    fn from(variant: DrvCSupport) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `DRV_C_SUPPORT` reader - Driver Type C Support"]
pub type DrvCSupportR = crate::BitReader<DrvCSupport>;
impl DrvCSupportR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<DrvCSupport> {
        match self.bits {
            false => Some(DrvCSupport::Value1),
            _ => None,
        }
    }
    #[doc = "Driver Type C is not supported"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == DrvCSupport::Value1
    }
}
#[doc = "Driver Type D Support\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum DrvDSupport {
    #[doc = "0: Driver Type D is not supported"]
    Value1 = 0,
}
impl From<DrvDSupport> for bool {
    #[inline(always)]
    fn from(variant: DrvDSupport) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `DRV_D_SUPPORT` reader - Driver Type D Support"]
pub type DrvDSupportR = crate::BitReader<DrvDSupport>;
impl DrvDSupportR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<DrvDSupport> {
        match self.bits {
            false => Some(DrvDSupport::Value1),
            _ => None,
        }
    }
    #[doc = "Driver Type D is not supported"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == DrvDSupport::Value1
    }
}
#[doc = "Timer count for Re-Tuning\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum TimCntRetune {
    #[doc = "0: Get information via other source"]
    Value1 = 0,
}
impl From<TimCntRetune> for u8 {
    #[inline(always)]
    fn from(variant: TimCntRetune) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for TimCntRetune {
    type Ux = u8;
}
#[doc = "Field `TIM_CNT_RETUNE` reader - Timer count for Re-Tuning"]
pub type TimCntRetuneR = crate::FieldReader<TimCntRetune>;
impl TimCntRetuneR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<TimCntRetune> {
        match self.bits {
            0 => Some(TimCntRetune::Value1),
            _ => None,
        }
    }
    #[doc = "Get information via other source"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == TimCntRetune::Value1
    }
}
#[doc = "Use Tuning for SDR50\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum UseTuningSdr50 {
    #[doc = "0: SDR50 does not require tuning"]
    Value1 = 0,
}
impl From<UseTuningSdr50> for bool {
    #[inline(always)]
    fn from(variant: UseTuningSdr50) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `USE_TUNING_SDR50` reader - Use Tuning for SDR50"]
pub type UseTuningSdr50R = crate::BitReader<UseTuningSdr50>;
impl UseTuningSdr50R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<UseTuningSdr50> {
        match self.bits {
            false => Some(UseTuningSdr50::Value1),
            _ => None,
        }
    }
    #[doc = "SDR50 does not require tuning"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == UseTuningSdr50::Value1
    }
}
#[doc = "Re-tuning modes\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum ReTuningModes {
    #[doc = "0: Mode 1"]
    Value1 = 0,
}
impl From<ReTuningModes> for u8 {
    #[inline(always)]
    fn from(variant: ReTuningModes) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for ReTuningModes {
    type Ux = u8;
}
#[doc = "Field `RE_TUNING_MODES` reader - Re-tuning modes"]
pub type ReTuningModesR = crate::FieldReader<ReTuningModes>;
impl ReTuningModesR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<ReTuningModes> {
        match self.bits {
            0 => Some(ReTuningModes::Value1),
            _ => None,
        }
    }
    #[doc = "Mode 1"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == ReTuningModes::Value1
    }
}
#[doc = "Clock Multiplier\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum ClkMult {
    #[doc = "0: Clock Multiplier not supported"]
    Value1 = 0,
}
impl From<ClkMult> for u8 {
    #[inline(always)]
    fn from(variant: ClkMult) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for ClkMult {
    type Ux = u8;
}
#[doc = "Field `CLK_MULT` reader - Clock Multiplier"]
pub type ClkMultR = crate::FieldReader<ClkMult>;
impl ClkMultR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<ClkMult> {
        match self.bits {
            0 => Some(ClkMult::Value1),
            _ => None,
        }
    }
    #[doc = "Clock Multiplier not supported"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == ClkMult::Value1
    }
}
impl R {
    #[doc = "Bit 0 - SDR50 Support"]
    #[inline(always)]
    pub fn sdr50_support(&self) -> Sdr50SupportR {
        Sdr50SupportR::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - SDR104 Support"]
    #[inline(always)]
    pub fn sdr104_support(&self) -> Sdr104SupportR {
        Sdr104SupportR::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - DDR50 Support"]
    #[inline(always)]
    pub fn ddr50_support(&self) -> Ddr50SupportR {
        Ddr50SupportR::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 4 - Driver Type A Support"]
    #[inline(always)]
    pub fn drv_a_support(&self) -> DrvASupportR {
        DrvASupportR::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bit 5 - Driver Type C Support"]
    #[inline(always)]
    pub fn drv_c_support(&self) -> DrvCSupportR {
        DrvCSupportR::new(((self.bits >> 5) & 1) != 0)
    }
    #[doc = "Bit 6 - Driver Type D Support"]
    #[inline(always)]
    pub fn drv_d_support(&self) -> DrvDSupportR {
        DrvDSupportR::new(((self.bits >> 6) & 1) != 0)
    }
    #[doc = "Bits 8:11 - Timer count for Re-Tuning"]
    #[inline(always)]
    pub fn tim_cnt_retune(&self) -> TimCntRetuneR {
        TimCntRetuneR::new(((self.bits >> 8) & 0x0f) as u8)
    }
    #[doc = "Bit 13 - Use Tuning for SDR50"]
    #[inline(always)]
    pub fn use_tuning_sdr50(&self) -> UseTuningSdr50R {
        UseTuningSdr50R::new(((self.bits >> 13) & 1) != 0)
    }
    #[doc = "Bits 14:15 - Re-tuning modes"]
    #[inline(always)]
    pub fn re_tuning_modes(&self) -> ReTuningModesR {
        ReTuningModesR::new(((self.bits >> 14) & 3) as u8)
    }
    #[doc = "Bits 16:23 - Clock Multiplier"]
    #[inline(always)]
    pub fn clk_mult(&self) -> ClkMultR {
        ClkMultR::new(((self.bits >> 16) & 0xff) as u8)
    }
}
#[doc = "Capabilities Register High\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`capabilities_hi::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct CapabilitiesHiSpec;
impl crate::RegisterSpec for CapabilitiesHiSpec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`capabilities_hi::R`](R) reader structure"]
impl crate::Readable for CapabilitiesHiSpec {}
#[doc = "`reset()` method sets CAPABILITIES_HI to value 0x0300_0000"]
impl crate::Resettable for CapabilitiesHiSpec {
    const RESET_VALUE: u32 = 0x0300_0000;
}