1#[doc = "Register `CA1R` reader"]
2pub type R = crate::R<Ca1rSpec>;
3#[doc = "SDR50 Support\n\nValue on reset: 0"]
4#[derive(Clone, Copy, Debug, PartialEq, Eq)]
5pub enum Sdr50supselect {
6 #[doc = "0: SDR50 is Not Supported"]
7 No = 0,
8 #[doc = "1: SDR50 is Supported"]
9 Yes = 1,
10}
11impl From<Sdr50supselect> for bool {
12 #[inline(always)]
13 fn from(variant: Sdr50supselect) -> Self {
14 variant as u8 != 0
15 }
16}
17#[doc = "Field `SDR50SUP` reader - SDR50 Support"]
18pub type Sdr50supR = crate::BitReader<Sdr50supselect>;
19impl Sdr50supR {
20 #[doc = "Get enumerated values variant"]
21 #[inline(always)]
22 pub const fn variant(&self) -> Sdr50supselect {
23 match self.bits {
24 false => Sdr50supselect::No,
25 true => Sdr50supselect::Yes,
26 }
27 }
28 #[doc = "SDR50 is Not Supported"]
29 #[inline(always)]
30 pub fn is_no(&self) -> bool {
31 *self == Sdr50supselect::No
32 }
33 #[doc = "SDR50 is Supported"]
34 #[inline(always)]
35 pub fn is_yes(&self) -> bool {
36 *self == Sdr50supselect::Yes
37 }
38}
39#[doc = "SDR104 Support\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41pub enum Sdr104supselect {
42 #[doc = "0: SDR104 is Not Supported"]
43 No = 0,
44 #[doc = "1: SDR104 is Supported"]
45 Yes = 1,
46}
47impl From<Sdr104supselect> for bool {
48 #[inline(always)]
49 fn from(variant: Sdr104supselect) -> Self {
50 variant as u8 != 0
51 }
52}
53#[doc = "Field `SDR104SUP` reader - SDR104 Support"]
54pub type Sdr104supR = crate::BitReader<Sdr104supselect>;
55impl Sdr104supR {
56 #[doc = "Get enumerated values variant"]
57 #[inline(always)]
58 pub const fn variant(&self) -> Sdr104supselect {
59 match self.bits {
60 false => Sdr104supselect::No,
61 true => Sdr104supselect::Yes,
62 }
63 }
64 #[doc = "SDR104 is Not Supported"]
65 #[inline(always)]
66 pub fn is_no(&self) -> bool {
67 *self == Sdr104supselect::No
68 }
69 #[doc = "SDR104 is Supported"]
70 #[inline(always)]
71 pub fn is_yes(&self) -> bool {
72 *self == Sdr104supselect::Yes
73 }
74}
75#[doc = "DDR50 Support\n\nValue on reset: 0"]
76#[derive(Clone, Copy, Debug, PartialEq, Eq)]
77pub enum Ddr50supselect {
78 #[doc = "0: DDR50 is Not Supported"]
79 No = 0,
80 #[doc = "1: DDR50 is Supported"]
81 Yes = 1,
82}
83impl From<Ddr50supselect> for bool {
84 #[inline(always)]
85 fn from(variant: Ddr50supselect) -> Self {
86 variant as u8 != 0
87 }
88}
89#[doc = "Field `DDR50SUP` reader - DDR50 Support"]
90pub type Ddr50supR = crate::BitReader<Ddr50supselect>;
91impl Ddr50supR {
92 #[doc = "Get enumerated values variant"]
93 #[inline(always)]
94 pub const fn variant(&self) -> Ddr50supselect {
95 match self.bits {
96 false => Ddr50supselect::No,
97 true => Ddr50supselect::Yes,
98 }
99 }
100 #[doc = "DDR50 is Not Supported"]
101 #[inline(always)]
102 pub fn is_no(&self) -> bool {
103 *self == Ddr50supselect::No
104 }
105 #[doc = "DDR50 is Supported"]
106 #[inline(always)]
107 pub fn is_yes(&self) -> bool {
108 *self == Ddr50supselect::Yes
109 }
110}
111#[doc = "Driver Type A Support\n\nValue on reset: 1"]
112#[derive(Clone, Copy, Debug, PartialEq, Eq)]
113pub enum Drvasupselect {
114 #[doc = "0: Driver Type A is Not Supported"]
115 No = 0,
116 #[doc = "1: Driver Type A is Supported"]
117 Yes = 1,
118}
119impl From<Drvasupselect> for bool {
120 #[inline(always)]
121 fn from(variant: Drvasupselect) -> Self {
122 variant as u8 != 0
123 }
124}
125#[doc = "Field `DRVASUP` reader - Driver Type A Support"]
126pub type DrvasupR = crate::BitReader<Drvasupselect>;
127impl DrvasupR {
128 #[doc = "Get enumerated values variant"]
129 #[inline(always)]
130 pub const fn variant(&self) -> Drvasupselect {
131 match self.bits {
132 false => Drvasupselect::No,
133 true => Drvasupselect::Yes,
134 }
135 }
136 #[doc = "Driver Type A is Not Supported"]
137 #[inline(always)]
138 pub fn is_no(&self) -> bool {
139 *self == Drvasupselect::No
140 }
141 #[doc = "Driver Type A is Supported"]
142 #[inline(always)]
143 pub fn is_yes(&self) -> bool {
144 *self == Drvasupselect::Yes
145 }
146}
147#[doc = "Driver Type C Support\n\nValue on reset: 1"]
148#[derive(Clone, Copy, Debug, PartialEq, Eq)]
149pub enum Drvcsupselect {
150 #[doc = "0: Driver Type C is Not Supported"]
151 No = 0,
152 #[doc = "1: Driver Type C is Supported"]
153 Yes = 1,
154}
155impl From<Drvcsupselect> for bool {
156 #[inline(always)]
157 fn from(variant: Drvcsupselect) -> Self {
158 variant as u8 != 0
159 }
160}
161#[doc = "Field `DRVCSUP` reader - Driver Type C Support"]
162pub type DrvcsupR = crate::BitReader<Drvcsupselect>;
163impl DrvcsupR {
164 #[doc = "Get enumerated values variant"]
165 #[inline(always)]
166 pub const fn variant(&self) -> Drvcsupselect {
167 match self.bits {
168 false => Drvcsupselect::No,
169 true => Drvcsupselect::Yes,
170 }
171 }
172 #[doc = "Driver Type C is Not Supported"]
173 #[inline(always)]
174 pub fn is_no(&self) -> bool {
175 *self == Drvcsupselect::No
176 }
177 #[doc = "Driver Type C is Supported"]
178 #[inline(always)]
179 pub fn is_yes(&self) -> bool {
180 *self == Drvcsupselect::Yes
181 }
182}
183#[doc = "Driver Type D Support\n\nValue on reset: 1"]
184#[derive(Clone, Copy, Debug, PartialEq, Eq)]
185pub enum Drvdsupselect {
186 #[doc = "0: Driver Type D is Not Supported"]
187 No = 0,
188 #[doc = "1: Driver Type D is Supported"]
189 Yes = 1,
190}
191impl From<Drvdsupselect> for bool {
192 #[inline(always)]
193 fn from(variant: Drvdsupselect) -> Self {
194 variant as u8 != 0
195 }
196}
197#[doc = "Field `DRVDSUP` reader - Driver Type D Support"]
198pub type DrvdsupR = crate::BitReader<Drvdsupselect>;
199impl DrvdsupR {
200 #[doc = "Get enumerated values variant"]
201 #[inline(always)]
202 pub const fn variant(&self) -> Drvdsupselect {
203 match self.bits {
204 false => Drvdsupselect::No,
205 true => Drvdsupselect::Yes,
206 }
207 }
208 #[doc = "Driver Type D is Not Supported"]
209 #[inline(always)]
210 pub fn is_no(&self) -> bool {
211 *self == Drvdsupselect::No
212 }
213 #[doc = "Driver Type D is Supported"]
214 #[inline(always)]
215 pub fn is_yes(&self) -> bool {
216 *self == Drvdsupselect::Yes
217 }
218}
219#[doc = "Timer Count for Re-Tuning\n\nValue on reset: 0"]
220#[derive(Clone, Copy, Debug, PartialEq, Eq)]
221#[repr(u8)]
222pub enum Tcntrtselect {
223 #[doc = "0: Re-Tuning Timer disabled"]
224 Disabled = 0,
225 #[doc = "1: 1 second"]
226 _1s = 1,
227 #[doc = "2: 2 seconds"]
228 _2s = 2,
229 #[doc = "3: 4 seconds"]
230 _4s = 3,
231 #[doc = "4: 8 seconds"]
232 _8s = 4,
233 #[doc = "5: 16 seconds"]
234 _16s = 5,
235 #[doc = "6: 32 seconds"]
236 _32s = 6,
237 #[doc = "7: 64 seconds"]
238 _64s = 7,
239 #[doc = "8: 128 seconds"]
240 _128s = 8,
241 #[doc = "9: 256 seconds"]
242 _256s = 9,
243 #[doc = "10: 512 seconds"]
244 _512s = 10,
245 #[doc = "11: 1024 seconds"]
246 _1024s = 11,
247 #[doc = "15: Get information from other source"]
248 Other = 15,
249}
250impl From<Tcntrtselect> for u8 {
251 #[inline(always)]
252 fn from(variant: Tcntrtselect) -> Self {
253 variant as _
254 }
255}
256impl crate::FieldSpec for Tcntrtselect {
257 type Ux = u8;
258}
259impl crate::IsEnum for Tcntrtselect {}
260#[doc = "Field `TCNTRT` reader - Timer Count for Re-Tuning"]
261pub type TcntrtR = crate::FieldReader<Tcntrtselect>;
262impl TcntrtR {
263 #[doc = "Get enumerated values variant"]
264 #[inline(always)]
265 pub const fn variant(&self) -> Option<Tcntrtselect> {
266 match self.bits {
267 0 => Some(Tcntrtselect::Disabled),
268 1 => Some(Tcntrtselect::_1s),
269 2 => Some(Tcntrtselect::_2s),
270 3 => Some(Tcntrtselect::_4s),
271 4 => Some(Tcntrtselect::_8s),
272 5 => Some(Tcntrtselect::_16s),
273 6 => Some(Tcntrtselect::_32s),
274 7 => Some(Tcntrtselect::_64s),
275 8 => Some(Tcntrtselect::_128s),
276 9 => Some(Tcntrtselect::_256s),
277 10 => Some(Tcntrtselect::_512s),
278 11 => Some(Tcntrtselect::_1024s),
279 15 => Some(Tcntrtselect::Other),
280 _ => None,
281 }
282 }
283 #[doc = "Re-Tuning Timer disabled"]
284 #[inline(always)]
285 pub fn is_disabled(&self) -> bool {
286 *self == Tcntrtselect::Disabled
287 }
288 #[doc = "1 second"]
289 #[inline(always)]
290 pub fn is_1s(&self) -> bool {
291 *self == Tcntrtselect::_1s
292 }
293 #[doc = "2 seconds"]
294 #[inline(always)]
295 pub fn is_2s(&self) -> bool {
296 *self == Tcntrtselect::_2s
297 }
298 #[doc = "4 seconds"]
299 #[inline(always)]
300 pub fn is_4s(&self) -> bool {
301 *self == Tcntrtselect::_4s
302 }
303 #[doc = "8 seconds"]
304 #[inline(always)]
305 pub fn is_8s(&self) -> bool {
306 *self == Tcntrtselect::_8s
307 }
308 #[doc = "16 seconds"]
309 #[inline(always)]
310 pub fn is_16s(&self) -> bool {
311 *self == Tcntrtselect::_16s
312 }
313 #[doc = "32 seconds"]
314 #[inline(always)]
315 pub fn is_32s(&self) -> bool {
316 *self == Tcntrtselect::_32s
317 }
318 #[doc = "64 seconds"]
319 #[inline(always)]
320 pub fn is_64s(&self) -> bool {
321 *self == Tcntrtselect::_64s
322 }
323 #[doc = "128 seconds"]
324 #[inline(always)]
325 pub fn is_128s(&self) -> bool {
326 *self == Tcntrtselect::_128s
327 }
328 #[doc = "256 seconds"]
329 #[inline(always)]
330 pub fn is_256s(&self) -> bool {
331 *self == Tcntrtselect::_256s
332 }
333 #[doc = "512 seconds"]
334 #[inline(always)]
335 pub fn is_512s(&self) -> bool {
336 *self == Tcntrtselect::_512s
337 }
338 #[doc = "1024 seconds"]
339 #[inline(always)]
340 pub fn is_1024s(&self) -> bool {
341 *self == Tcntrtselect::_1024s
342 }
343 #[doc = "Get information from other source"]
344 #[inline(always)]
345 pub fn is_other(&self) -> bool {
346 *self == Tcntrtselect::Other
347 }
348}
349#[doc = "Use Tuning for SDR50\n\nValue on reset: 0"]
350#[derive(Clone, Copy, Debug, PartialEq, Eq)]
351pub enum Tsdr50select {
352 #[doc = "0: SDR50 does not require tuning"]
353 No = 0,
354 #[doc = "1: SDR50 requires tuning"]
355 Yes = 1,
356}
357impl From<Tsdr50select> for bool {
358 #[inline(always)]
359 fn from(variant: Tsdr50select) -> Self {
360 variant as u8 != 0
361 }
362}
363#[doc = "Field `TSDR50` reader - Use Tuning for SDR50"]
364pub type Tsdr50R = crate::BitReader<Tsdr50select>;
365impl Tsdr50R {
366 #[doc = "Get enumerated values variant"]
367 #[inline(always)]
368 pub const fn variant(&self) -> Tsdr50select {
369 match self.bits {
370 false => Tsdr50select::No,
371 true => Tsdr50select::Yes,
372 }
373 }
374 #[doc = "SDR50 does not require tuning"]
375 #[inline(always)]
376 pub fn is_no(&self) -> bool {
377 *self == Tsdr50select::No
378 }
379 #[doc = "SDR50 requires tuning"]
380 #[inline(always)]
381 pub fn is_yes(&self) -> bool {
382 *self == Tsdr50select::Yes
383 }
384}
385#[doc = "Clock Multiplier\n\nValue on reset: 0"]
386#[derive(Clone, Copy, Debug, PartialEq, Eq)]
387#[repr(u8)]
388pub enum Clkmultselect {
389 #[doc = "0: Clock Multiplier is Not Supported"]
390 No = 0,
391}
392impl From<Clkmultselect> for u8 {
393 #[inline(always)]
394 fn from(variant: Clkmultselect) -> Self {
395 variant as _
396 }
397}
398impl crate::FieldSpec for Clkmultselect {
399 type Ux = u8;
400}
401impl crate::IsEnum for Clkmultselect {}
402#[doc = "Field `CLKMULT` reader - Clock Multiplier"]
403pub type ClkmultR = crate::FieldReader<Clkmultselect>;
404impl ClkmultR {
405 #[doc = "Get enumerated values variant"]
406 #[inline(always)]
407 pub const fn variant(&self) -> Option<Clkmultselect> {
408 match self.bits {
409 0 => Some(Clkmultselect::No),
410 _ => None,
411 }
412 }
413 #[doc = "Clock Multiplier is Not Supported"]
414 #[inline(always)]
415 pub fn is_no(&self) -> bool {
416 *self == Clkmultselect::No
417 }
418}
419impl R {
420 #[doc = "Bit 0 - SDR50 Support"]
421 #[inline(always)]
422 pub fn sdr50sup(&self) -> Sdr50supR {
423 Sdr50supR::new((self.bits & 1) != 0)
424 }
425 #[doc = "Bit 1 - SDR104 Support"]
426 #[inline(always)]
427 pub fn sdr104sup(&self) -> Sdr104supR {
428 Sdr104supR::new(((self.bits >> 1) & 1) != 0)
429 }
430 #[doc = "Bit 2 - DDR50 Support"]
431 #[inline(always)]
432 pub fn ddr50sup(&self) -> Ddr50supR {
433 Ddr50supR::new(((self.bits >> 2) & 1) != 0)
434 }
435 #[doc = "Bit 4 - Driver Type A Support"]
436 #[inline(always)]
437 pub fn drvasup(&self) -> DrvasupR {
438 DrvasupR::new(((self.bits >> 4) & 1) != 0)
439 }
440 #[doc = "Bit 5 - Driver Type C Support"]
441 #[inline(always)]
442 pub fn drvcsup(&self) -> DrvcsupR {
443 DrvcsupR::new(((self.bits >> 5) & 1) != 0)
444 }
445 #[doc = "Bit 6 - Driver Type D Support"]
446 #[inline(always)]
447 pub fn drvdsup(&self) -> DrvdsupR {
448 DrvdsupR::new(((self.bits >> 6) & 1) != 0)
449 }
450 #[doc = "Bits 8:11 - Timer Count for Re-Tuning"]
451 #[inline(always)]
452 pub fn tcntrt(&self) -> TcntrtR {
453 TcntrtR::new(((self.bits >> 8) & 0x0f) as u8)
454 }
455 #[doc = "Bit 13 - Use Tuning for SDR50"]
456 #[inline(always)]
457 pub fn tsdr50(&self) -> Tsdr50R {
458 Tsdr50R::new(((self.bits >> 13) & 1) != 0)
459 }
460 #[doc = "Bits 16:23 - Clock Multiplier"]
461 #[inline(always)]
462 pub fn clkmult(&self) -> ClkmultR {
463 ClkmultR::new(((self.bits >> 16) & 0xff) as u8)
464 }
465}
466#[doc = "Capabilities 1\n\nYou can [`read`](crate::Reg::read) this register and get [`ca1r::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
467pub struct Ca1rSpec;
468impl crate::RegisterSpec for Ca1rSpec {
469 type Ux = u32;
470}
471#[doc = "`read()` method returns [`ca1r::R`](R) reader structure"]
472impl crate::Readable for Ca1rSpec {}
473#[doc = "`reset()` method sets CA1R to value 0x70"]
474impl crate::Resettable for Ca1rSpec {
475 const RESET_VALUE: u32 = 0x70;
476}