1#[doc = "Register `CTRL` reader"]
2pub struct R(crate::R<CTRL_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<CTRL_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<CTRL_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<CTRL_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `CTRL` writer"]
17pub struct W(crate::W<CTRL_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<CTRL_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<CTRL_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<CTRL_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `EN` reader - Current DAC Enable"]
38pub type EN_R = crate::BitReader<bool>;
39#[doc = "Field `EN` writer - Current DAC Enable"]
40pub type EN_W<'a> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, 0>;
41#[doc = "Field `CURSINK` reader - Current Sink Enable"]
42pub type CURSINK_R = crate::BitReader<bool>;
43#[doc = "Field `CURSINK` writer - Current Sink Enable"]
44pub type CURSINK_W<'a> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, 1>;
45#[doc = "Field `MINOUTTRANS` reader - Minimum Output Transition Enable"]
46pub type MINOUTTRANS_R = crate::BitReader<bool>;
47#[doc = "Field `MINOUTTRANS` writer - Minimum Output Transition Enable"]
48pub type MINOUTTRANS_W<'a> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, 2>;
49#[doc = "Field `APORTOUTEN` reader - APORT Output Enable"]
50pub type APORTOUTEN_R = crate::BitReader<bool>;
51#[doc = "Field `APORTOUTEN` writer - APORT Output Enable"]
52pub type APORTOUTEN_W<'a> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, 3>;
53#[doc = "APORT Output Select\n\nValue on reset: 0"]
54#[derive(Clone, Copy, Debug, PartialEq)]
55#[repr(u8)]
56pub enum APORTOUTSEL_A {
57 #[doc = "32: APORT1X Channel 0"]
58 APORT1XCH0 = 32,
59 #[doc = "33: APORT1Y Channel 1"]
60 APORT1YCH1 = 33,
61 #[doc = "34: APORT1X Channel 2"]
62 APORT1XCH2 = 34,
63 #[doc = "35: APORT1Y Channel 3"]
64 APORT1YCH3 = 35,
65 #[doc = "36: APORT1X Channel 4"]
66 APORT1XCH4 = 36,
67 #[doc = "37: APORT1Y Channel 5"]
68 APORT1YCH5 = 37,
69 #[doc = "38: APORT1X Channel 6"]
70 APORT1XCH6 = 38,
71 #[doc = "39: APORT1Y Channel 7"]
72 APORT1YCH7 = 39,
73 #[doc = "40: APORT1X Channel 8"]
74 APORT1XCH8 = 40,
75 #[doc = "41: APORT1Y Channel 9"]
76 APORT1YCH9 = 41,
77 #[doc = "42: APORT1X Channel 10"]
78 APORT1XCH10 = 42,
79 #[doc = "43: APORT1Y Channel 11"]
80 APORT1YCH11 = 43,
81 #[doc = "44: APORT1X Channel 12"]
82 APORT1XCH12 = 44,
83 #[doc = "45: APORT1Y Channel 13"]
84 APORT1YCH13 = 45,
85 #[doc = "46: APORT1X Channel 14"]
86 APORT1XCH14 = 46,
87 #[doc = "47: APORT1Y Channel 15"]
88 APORT1YCH15 = 47,
89 #[doc = "48: APORT1X Channel 16"]
90 APORT1XCH16 = 48,
91 #[doc = "49: APORT1Y Channel 17"]
92 APORT1YCH17 = 49,
93 #[doc = "50: APORT1X Channel 18"]
94 APORT1XCH18 = 50,
95 #[doc = "51: APORT1Y Channel 19"]
96 APORT1YCH19 = 51,
97 #[doc = "52: APORT1X Channel 20"]
98 APORT1XCH20 = 52,
99 #[doc = "53: APORT1Y Channel 21"]
100 APORT1YCH21 = 53,
101 #[doc = "54: APORT1X Channel 22"]
102 APORT1XCH22 = 54,
103 #[doc = "55: APORT1Y Channel 23"]
104 APORT1YCH23 = 55,
105 #[doc = "56: APORT1X Channel 24"]
106 APORT1XCH24 = 56,
107 #[doc = "57: APORT1Y Channel 25"]
108 APORT1YCH25 = 57,
109 #[doc = "58: APORT1X Channel 26"]
110 APORT1XCH26 = 58,
111 #[doc = "59: APORT1Y Channel 27"]
112 APORT1YCH27 = 59,
113 #[doc = "60: APORT1X Channel 28"]
114 APORT1XCH28 = 60,
115 #[doc = "61: APORT1Y Channel 29"]
116 APORT1YCH29 = 61,
117 #[doc = "62: APORT1X Channel 30"]
118 APORT1XCH30 = 62,
119 #[doc = "63: APORT1Y Channel 31"]
120 APORT1YCH31 = 63,
121}
122impl From<APORTOUTSEL_A> for u8 {
123 #[inline(always)]
124 fn from(variant: APORTOUTSEL_A) -> Self {
125 variant as _
126 }
127}
128#[doc = "Field `APORTOUTSEL` reader - APORT Output Select"]
129pub type APORTOUTSEL_R = crate::FieldReader<u8, APORTOUTSEL_A>;
130impl APORTOUTSEL_R {
131 #[doc = "Get enumerated values variant"]
132 #[inline(always)]
133 pub fn variant(&self) -> Option<APORTOUTSEL_A> {
134 match self.bits {
135 32 => Some(APORTOUTSEL_A::APORT1XCH0),
136 33 => Some(APORTOUTSEL_A::APORT1YCH1),
137 34 => Some(APORTOUTSEL_A::APORT1XCH2),
138 35 => Some(APORTOUTSEL_A::APORT1YCH3),
139 36 => Some(APORTOUTSEL_A::APORT1XCH4),
140 37 => Some(APORTOUTSEL_A::APORT1YCH5),
141 38 => Some(APORTOUTSEL_A::APORT1XCH6),
142 39 => Some(APORTOUTSEL_A::APORT1YCH7),
143 40 => Some(APORTOUTSEL_A::APORT1XCH8),
144 41 => Some(APORTOUTSEL_A::APORT1YCH9),
145 42 => Some(APORTOUTSEL_A::APORT1XCH10),
146 43 => Some(APORTOUTSEL_A::APORT1YCH11),
147 44 => Some(APORTOUTSEL_A::APORT1XCH12),
148 45 => Some(APORTOUTSEL_A::APORT1YCH13),
149 46 => Some(APORTOUTSEL_A::APORT1XCH14),
150 47 => Some(APORTOUTSEL_A::APORT1YCH15),
151 48 => Some(APORTOUTSEL_A::APORT1XCH16),
152 49 => Some(APORTOUTSEL_A::APORT1YCH17),
153 50 => Some(APORTOUTSEL_A::APORT1XCH18),
154 51 => Some(APORTOUTSEL_A::APORT1YCH19),
155 52 => Some(APORTOUTSEL_A::APORT1XCH20),
156 53 => Some(APORTOUTSEL_A::APORT1YCH21),
157 54 => Some(APORTOUTSEL_A::APORT1XCH22),
158 55 => Some(APORTOUTSEL_A::APORT1YCH23),
159 56 => Some(APORTOUTSEL_A::APORT1XCH24),
160 57 => Some(APORTOUTSEL_A::APORT1YCH25),
161 58 => Some(APORTOUTSEL_A::APORT1XCH26),
162 59 => Some(APORTOUTSEL_A::APORT1YCH27),
163 60 => Some(APORTOUTSEL_A::APORT1XCH28),
164 61 => Some(APORTOUTSEL_A::APORT1YCH29),
165 62 => Some(APORTOUTSEL_A::APORT1XCH30),
166 63 => Some(APORTOUTSEL_A::APORT1YCH31),
167 _ => None,
168 }
169 }
170 #[doc = "Checks if the value of the field is `APORT1XCH0`"]
171 #[inline(always)]
172 pub fn is_aport1xch0(&self) -> bool {
173 *self == APORTOUTSEL_A::APORT1XCH0
174 }
175 #[doc = "Checks if the value of the field is `APORT1YCH1`"]
176 #[inline(always)]
177 pub fn is_aport1ych1(&self) -> bool {
178 *self == APORTOUTSEL_A::APORT1YCH1
179 }
180 #[doc = "Checks if the value of the field is `APORT1XCH2`"]
181 #[inline(always)]
182 pub fn is_aport1xch2(&self) -> bool {
183 *self == APORTOUTSEL_A::APORT1XCH2
184 }
185 #[doc = "Checks if the value of the field is `APORT1YCH3`"]
186 #[inline(always)]
187 pub fn is_aport1ych3(&self) -> bool {
188 *self == APORTOUTSEL_A::APORT1YCH3
189 }
190 #[doc = "Checks if the value of the field is `APORT1XCH4`"]
191 #[inline(always)]
192 pub fn is_aport1xch4(&self) -> bool {
193 *self == APORTOUTSEL_A::APORT1XCH4
194 }
195 #[doc = "Checks if the value of the field is `APORT1YCH5`"]
196 #[inline(always)]
197 pub fn is_aport1ych5(&self) -> bool {
198 *self == APORTOUTSEL_A::APORT1YCH5
199 }
200 #[doc = "Checks if the value of the field is `APORT1XCH6`"]
201 #[inline(always)]
202 pub fn is_aport1xch6(&self) -> bool {
203 *self == APORTOUTSEL_A::APORT1XCH6
204 }
205 #[doc = "Checks if the value of the field is `APORT1YCH7`"]
206 #[inline(always)]
207 pub fn is_aport1ych7(&self) -> bool {
208 *self == APORTOUTSEL_A::APORT1YCH7
209 }
210 #[doc = "Checks if the value of the field is `APORT1XCH8`"]
211 #[inline(always)]
212 pub fn is_aport1xch8(&self) -> bool {
213 *self == APORTOUTSEL_A::APORT1XCH8
214 }
215 #[doc = "Checks if the value of the field is `APORT1YCH9`"]
216 #[inline(always)]
217 pub fn is_aport1ych9(&self) -> bool {
218 *self == APORTOUTSEL_A::APORT1YCH9
219 }
220 #[doc = "Checks if the value of the field is `APORT1XCH10`"]
221 #[inline(always)]
222 pub fn is_aport1xch10(&self) -> bool {
223 *self == APORTOUTSEL_A::APORT1XCH10
224 }
225 #[doc = "Checks if the value of the field is `APORT1YCH11`"]
226 #[inline(always)]
227 pub fn is_aport1ych11(&self) -> bool {
228 *self == APORTOUTSEL_A::APORT1YCH11
229 }
230 #[doc = "Checks if the value of the field is `APORT1XCH12`"]
231 #[inline(always)]
232 pub fn is_aport1xch12(&self) -> bool {
233 *self == APORTOUTSEL_A::APORT1XCH12
234 }
235 #[doc = "Checks if the value of the field is `APORT1YCH13`"]
236 #[inline(always)]
237 pub fn is_aport1ych13(&self) -> bool {
238 *self == APORTOUTSEL_A::APORT1YCH13
239 }
240 #[doc = "Checks if the value of the field is `APORT1XCH14`"]
241 #[inline(always)]
242 pub fn is_aport1xch14(&self) -> bool {
243 *self == APORTOUTSEL_A::APORT1XCH14
244 }
245 #[doc = "Checks if the value of the field is `APORT1YCH15`"]
246 #[inline(always)]
247 pub fn is_aport1ych15(&self) -> bool {
248 *self == APORTOUTSEL_A::APORT1YCH15
249 }
250 #[doc = "Checks if the value of the field is `APORT1XCH16`"]
251 #[inline(always)]
252 pub fn is_aport1xch16(&self) -> bool {
253 *self == APORTOUTSEL_A::APORT1XCH16
254 }
255 #[doc = "Checks if the value of the field is `APORT1YCH17`"]
256 #[inline(always)]
257 pub fn is_aport1ych17(&self) -> bool {
258 *self == APORTOUTSEL_A::APORT1YCH17
259 }
260 #[doc = "Checks if the value of the field is `APORT1XCH18`"]
261 #[inline(always)]
262 pub fn is_aport1xch18(&self) -> bool {
263 *self == APORTOUTSEL_A::APORT1XCH18
264 }
265 #[doc = "Checks if the value of the field is `APORT1YCH19`"]
266 #[inline(always)]
267 pub fn is_aport1ych19(&self) -> bool {
268 *self == APORTOUTSEL_A::APORT1YCH19
269 }
270 #[doc = "Checks if the value of the field is `APORT1XCH20`"]
271 #[inline(always)]
272 pub fn is_aport1xch20(&self) -> bool {
273 *self == APORTOUTSEL_A::APORT1XCH20
274 }
275 #[doc = "Checks if the value of the field is `APORT1YCH21`"]
276 #[inline(always)]
277 pub fn is_aport1ych21(&self) -> bool {
278 *self == APORTOUTSEL_A::APORT1YCH21
279 }
280 #[doc = "Checks if the value of the field is `APORT1XCH22`"]
281 #[inline(always)]
282 pub fn is_aport1xch22(&self) -> bool {
283 *self == APORTOUTSEL_A::APORT1XCH22
284 }
285 #[doc = "Checks if the value of the field is `APORT1YCH23`"]
286 #[inline(always)]
287 pub fn is_aport1ych23(&self) -> bool {
288 *self == APORTOUTSEL_A::APORT1YCH23
289 }
290 #[doc = "Checks if the value of the field is `APORT1XCH24`"]
291 #[inline(always)]
292 pub fn is_aport1xch24(&self) -> bool {
293 *self == APORTOUTSEL_A::APORT1XCH24
294 }
295 #[doc = "Checks if the value of the field is `APORT1YCH25`"]
296 #[inline(always)]
297 pub fn is_aport1ych25(&self) -> bool {
298 *self == APORTOUTSEL_A::APORT1YCH25
299 }
300 #[doc = "Checks if the value of the field is `APORT1XCH26`"]
301 #[inline(always)]
302 pub fn is_aport1xch26(&self) -> bool {
303 *self == APORTOUTSEL_A::APORT1XCH26
304 }
305 #[doc = "Checks if the value of the field is `APORT1YCH27`"]
306 #[inline(always)]
307 pub fn is_aport1ych27(&self) -> bool {
308 *self == APORTOUTSEL_A::APORT1YCH27
309 }
310 #[doc = "Checks if the value of the field is `APORT1XCH28`"]
311 #[inline(always)]
312 pub fn is_aport1xch28(&self) -> bool {
313 *self == APORTOUTSEL_A::APORT1XCH28
314 }
315 #[doc = "Checks if the value of the field is `APORT1YCH29`"]
316 #[inline(always)]
317 pub fn is_aport1ych29(&self) -> bool {
318 *self == APORTOUTSEL_A::APORT1YCH29
319 }
320 #[doc = "Checks if the value of the field is `APORT1XCH30`"]
321 #[inline(always)]
322 pub fn is_aport1xch30(&self) -> bool {
323 *self == APORTOUTSEL_A::APORT1XCH30
324 }
325 #[doc = "Checks if the value of the field is `APORT1YCH31`"]
326 #[inline(always)]
327 pub fn is_aport1ych31(&self) -> bool {
328 *self == APORTOUTSEL_A::APORT1YCH31
329 }
330}
331#[doc = "Field `APORTOUTSEL` writer - APORT Output Select"]
332pub type APORTOUTSEL_W<'a> = crate::FieldWriter<'a, u32, CTRL_SPEC, u8, APORTOUTSEL_A, 8, 4>;
333impl<'a> APORTOUTSEL_W<'a> {
334 #[doc = "APORT1X Channel 0"]
335 #[inline(always)]
336 pub fn aport1xch0(self) -> &'a mut W {
337 self.variant(APORTOUTSEL_A::APORT1XCH0)
338 }
339 #[doc = "APORT1Y Channel 1"]
340 #[inline(always)]
341 pub fn aport1ych1(self) -> &'a mut W {
342 self.variant(APORTOUTSEL_A::APORT1YCH1)
343 }
344 #[doc = "APORT1X Channel 2"]
345 #[inline(always)]
346 pub fn aport1xch2(self) -> &'a mut W {
347 self.variant(APORTOUTSEL_A::APORT1XCH2)
348 }
349 #[doc = "APORT1Y Channel 3"]
350 #[inline(always)]
351 pub fn aport1ych3(self) -> &'a mut W {
352 self.variant(APORTOUTSEL_A::APORT1YCH3)
353 }
354 #[doc = "APORT1X Channel 4"]
355 #[inline(always)]
356 pub fn aport1xch4(self) -> &'a mut W {
357 self.variant(APORTOUTSEL_A::APORT1XCH4)
358 }
359 #[doc = "APORT1Y Channel 5"]
360 #[inline(always)]
361 pub fn aport1ych5(self) -> &'a mut W {
362 self.variant(APORTOUTSEL_A::APORT1YCH5)
363 }
364 #[doc = "APORT1X Channel 6"]
365 #[inline(always)]
366 pub fn aport1xch6(self) -> &'a mut W {
367 self.variant(APORTOUTSEL_A::APORT1XCH6)
368 }
369 #[doc = "APORT1Y Channel 7"]
370 #[inline(always)]
371 pub fn aport1ych7(self) -> &'a mut W {
372 self.variant(APORTOUTSEL_A::APORT1YCH7)
373 }
374 #[doc = "APORT1X Channel 8"]
375 #[inline(always)]
376 pub fn aport1xch8(self) -> &'a mut W {
377 self.variant(APORTOUTSEL_A::APORT1XCH8)
378 }
379 #[doc = "APORT1Y Channel 9"]
380 #[inline(always)]
381 pub fn aport1ych9(self) -> &'a mut W {
382 self.variant(APORTOUTSEL_A::APORT1YCH9)
383 }
384 #[doc = "APORT1X Channel 10"]
385 #[inline(always)]
386 pub fn aport1xch10(self) -> &'a mut W {
387 self.variant(APORTOUTSEL_A::APORT1XCH10)
388 }
389 #[doc = "APORT1Y Channel 11"]
390 #[inline(always)]
391 pub fn aport1ych11(self) -> &'a mut W {
392 self.variant(APORTOUTSEL_A::APORT1YCH11)
393 }
394 #[doc = "APORT1X Channel 12"]
395 #[inline(always)]
396 pub fn aport1xch12(self) -> &'a mut W {
397 self.variant(APORTOUTSEL_A::APORT1XCH12)
398 }
399 #[doc = "APORT1Y Channel 13"]
400 #[inline(always)]
401 pub fn aport1ych13(self) -> &'a mut W {
402 self.variant(APORTOUTSEL_A::APORT1YCH13)
403 }
404 #[doc = "APORT1X Channel 14"]
405 #[inline(always)]
406 pub fn aport1xch14(self) -> &'a mut W {
407 self.variant(APORTOUTSEL_A::APORT1XCH14)
408 }
409 #[doc = "APORT1Y Channel 15"]
410 #[inline(always)]
411 pub fn aport1ych15(self) -> &'a mut W {
412 self.variant(APORTOUTSEL_A::APORT1YCH15)
413 }
414 #[doc = "APORT1X Channel 16"]
415 #[inline(always)]
416 pub fn aport1xch16(self) -> &'a mut W {
417 self.variant(APORTOUTSEL_A::APORT1XCH16)
418 }
419 #[doc = "APORT1Y Channel 17"]
420 #[inline(always)]
421 pub fn aport1ych17(self) -> &'a mut W {
422 self.variant(APORTOUTSEL_A::APORT1YCH17)
423 }
424 #[doc = "APORT1X Channel 18"]
425 #[inline(always)]
426 pub fn aport1xch18(self) -> &'a mut W {
427 self.variant(APORTOUTSEL_A::APORT1XCH18)
428 }
429 #[doc = "APORT1Y Channel 19"]
430 #[inline(always)]
431 pub fn aport1ych19(self) -> &'a mut W {
432 self.variant(APORTOUTSEL_A::APORT1YCH19)
433 }
434 #[doc = "APORT1X Channel 20"]
435 #[inline(always)]
436 pub fn aport1xch20(self) -> &'a mut W {
437 self.variant(APORTOUTSEL_A::APORT1XCH20)
438 }
439 #[doc = "APORT1Y Channel 21"]
440 #[inline(always)]
441 pub fn aport1ych21(self) -> &'a mut W {
442 self.variant(APORTOUTSEL_A::APORT1YCH21)
443 }
444 #[doc = "APORT1X Channel 22"]
445 #[inline(always)]
446 pub fn aport1xch22(self) -> &'a mut W {
447 self.variant(APORTOUTSEL_A::APORT1XCH22)
448 }
449 #[doc = "APORT1Y Channel 23"]
450 #[inline(always)]
451 pub fn aport1ych23(self) -> &'a mut W {
452 self.variant(APORTOUTSEL_A::APORT1YCH23)
453 }
454 #[doc = "APORT1X Channel 24"]
455 #[inline(always)]
456 pub fn aport1xch24(self) -> &'a mut W {
457 self.variant(APORTOUTSEL_A::APORT1XCH24)
458 }
459 #[doc = "APORT1Y Channel 25"]
460 #[inline(always)]
461 pub fn aport1ych25(self) -> &'a mut W {
462 self.variant(APORTOUTSEL_A::APORT1YCH25)
463 }
464 #[doc = "APORT1X Channel 26"]
465 #[inline(always)]
466 pub fn aport1xch26(self) -> &'a mut W {
467 self.variant(APORTOUTSEL_A::APORT1XCH26)
468 }
469 #[doc = "APORT1Y Channel 27"]
470 #[inline(always)]
471 pub fn aport1ych27(self) -> &'a mut W {
472 self.variant(APORTOUTSEL_A::APORT1YCH27)
473 }
474 #[doc = "APORT1X Channel 28"]
475 #[inline(always)]
476 pub fn aport1xch28(self) -> &'a mut W {
477 self.variant(APORTOUTSEL_A::APORT1XCH28)
478 }
479 #[doc = "APORT1Y Channel 29"]
480 #[inline(always)]
481 pub fn aport1ych29(self) -> &'a mut W {
482 self.variant(APORTOUTSEL_A::APORT1YCH29)
483 }
484 #[doc = "APORT1X Channel 30"]
485 #[inline(always)]
486 pub fn aport1xch30(self) -> &'a mut W {
487 self.variant(APORTOUTSEL_A::APORT1XCH30)
488 }
489 #[doc = "APORT1Y Channel 31"]
490 #[inline(always)]
491 pub fn aport1ych31(self) -> &'a mut W {
492 self.variant(APORTOUTSEL_A::APORT1YCH31)
493 }
494}
495#[doc = "Field `PWRSEL` reader - Power Select"]
496pub type PWRSEL_R = crate::BitReader<bool>;
497#[doc = "Field `PWRSEL` writer - Power Select"]
498pub type PWRSEL_W<'a> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, 12>;
499#[doc = "Field `EM2DELAY` reader - EM2 Delay"]
500pub type EM2DELAY_R = crate::BitReader<bool>;
501#[doc = "Field `EM2DELAY` writer - EM2 Delay"]
502pub type EM2DELAY_W<'a> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, 13>;
503#[doc = "Field `APORTMASTERDIS` reader - APORT Bus Master Disable"]
504pub type APORTMASTERDIS_R = crate::BitReader<bool>;
505#[doc = "Field `APORTMASTERDIS` writer - APORT Bus Master Disable"]
506pub type APORTMASTERDIS_W<'a> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, 14>;
507#[doc = "Field `APORTOUTENPRS` reader - PRS Controlled APORT Output Enable"]
508pub type APORTOUTENPRS_R = crate::BitReader<bool>;
509#[doc = "Field `APORTOUTENPRS` writer - PRS Controlled APORT Output Enable"]
510pub type APORTOUTENPRS_W<'a> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, 16>;
511#[doc = "IDAC Output Enable PRS Channel Select\n\nValue on reset: 0"]
512#[derive(Clone, Copy, Debug, PartialEq)]
513#[repr(u8)]
514pub enum PRSSEL_A {
515 #[doc = "0: PRS Channel 0 selected."]
516 PRSCH0 = 0,
517 #[doc = "1: PRS Channel 1 selected."]
518 PRSCH1 = 1,
519 #[doc = "2: PRS Channel 2 selected."]
520 PRSCH2 = 2,
521 #[doc = "3: PRS Channel 3 selected."]
522 PRSCH3 = 3,
523 #[doc = "4: PRS Channel 4 selected."]
524 PRSCH4 = 4,
525 #[doc = "5: PRS Channel 5 selected."]
526 PRSCH5 = 5,
527 #[doc = "6: PRS Channel 6 selected."]
528 PRSCH6 = 6,
529 #[doc = "7: PRS Channel 7 selected."]
530 PRSCH7 = 7,
531 #[doc = "8: PRS Channel 8 selected."]
532 PRSCH8 = 8,
533 #[doc = "9: PRS Channel 9 selected."]
534 PRSCH9 = 9,
535 #[doc = "10: PRS Channel 10 selected."]
536 PRSCH10 = 10,
537 #[doc = "11: PRS Channel 11 selected."]
538 PRSCH11 = 11,
539}
540impl From<PRSSEL_A> for u8 {
541 #[inline(always)]
542 fn from(variant: PRSSEL_A) -> Self {
543 variant as _
544 }
545}
546#[doc = "Field `PRSSEL` reader - IDAC Output Enable PRS Channel Select"]
547pub type PRSSEL_R = crate::FieldReader<u8, PRSSEL_A>;
548impl PRSSEL_R {
549 #[doc = "Get enumerated values variant"]
550 #[inline(always)]
551 pub fn variant(&self) -> Option<PRSSEL_A> {
552 match self.bits {
553 0 => Some(PRSSEL_A::PRSCH0),
554 1 => Some(PRSSEL_A::PRSCH1),
555 2 => Some(PRSSEL_A::PRSCH2),
556 3 => Some(PRSSEL_A::PRSCH3),
557 4 => Some(PRSSEL_A::PRSCH4),
558 5 => Some(PRSSEL_A::PRSCH5),
559 6 => Some(PRSSEL_A::PRSCH6),
560 7 => Some(PRSSEL_A::PRSCH7),
561 8 => Some(PRSSEL_A::PRSCH8),
562 9 => Some(PRSSEL_A::PRSCH9),
563 10 => Some(PRSSEL_A::PRSCH10),
564 11 => Some(PRSSEL_A::PRSCH11),
565 _ => None,
566 }
567 }
568 #[doc = "Checks if the value of the field is `PRSCH0`"]
569 #[inline(always)]
570 pub fn is_prsch0(&self) -> bool {
571 *self == PRSSEL_A::PRSCH0
572 }
573 #[doc = "Checks if the value of the field is `PRSCH1`"]
574 #[inline(always)]
575 pub fn is_prsch1(&self) -> bool {
576 *self == PRSSEL_A::PRSCH1
577 }
578 #[doc = "Checks if the value of the field is `PRSCH2`"]
579 #[inline(always)]
580 pub fn is_prsch2(&self) -> bool {
581 *self == PRSSEL_A::PRSCH2
582 }
583 #[doc = "Checks if the value of the field is `PRSCH3`"]
584 #[inline(always)]
585 pub fn is_prsch3(&self) -> bool {
586 *self == PRSSEL_A::PRSCH3
587 }
588 #[doc = "Checks if the value of the field is `PRSCH4`"]
589 #[inline(always)]
590 pub fn is_prsch4(&self) -> bool {
591 *self == PRSSEL_A::PRSCH4
592 }
593 #[doc = "Checks if the value of the field is `PRSCH5`"]
594 #[inline(always)]
595 pub fn is_prsch5(&self) -> bool {
596 *self == PRSSEL_A::PRSCH5
597 }
598 #[doc = "Checks if the value of the field is `PRSCH6`"]
599 #[inline(always)]
600 pub fn is_prsch6(&self) -> bool {
601 *self == PRSSEL_A::PRSCH6
602 }
603 #[doc = "Checks if the value of the field is `PRSCH7`"]
604 #[inline(always)]
605 pub fn is_prsch7(&self) -> bool {
606 *self == PRSSEL_A::PRSCH7
607 }
608 #[doc = "Checks if the value of the field is `PRSCH8`"]
609 #[inline(always)]
610 pub fn is_prsch8(&self) -> bool {
611 *self == PRSSEL_A::PRSCH8
612 }
613 #[doc = "Checks if the value of the field is `PRSCH9`"]
614 #[inline(always)]
615 pub fn is_prsch9(&self) -> bool {
616 *self == PRSSEL_A::PRSCH9
617 }
618 #[doc = "Checks if the value of the field is `PRSCH10`"]
619 #[inline(always)]
620 pub fn is_prsch10(&self) -> bool {
621 *self == PRSSEL_A::PRSCH10
622 }
623 #[doc = "Checks if the value of the field is `PRSCH11`"]
624 #[inline(always)]
625 pub fn is_prsch11(&self) -> bool {
626 *self == PRSSEL_A::PRSCH11
627 }
628}
629#[doc = "Field `PRSSEL` writer - IDAC Output Enable PRS Channel Select"]
630pub type PRSSEL_W<'a> = crate::FieldWriter<'a, u32, CTRL_SPEC, u8, PRSSEL_A, 4, 20>;
631impl<'a> PRSSEL_W<'a> {
632 #[doc = "PRS Channel 0 selected."]
633 #[inline(always)]
634 pub fn prsch0(self) -> &'a mut W {
635 self.variant(PRSSEL_A::PRSCH0)
636 }
637 #[doc = "PRS Channel 1 selected."]
638 #[inline(always)]
639 pub fn prsch1(self) -> &'a mut W {
640 self.variant(PRSSEL_A::PRSCH1)
641 }
642 #[doc = "PRS Channel 2 selected."]
643 #[inline(always)]
644 pub fn prsch2(self) -> &'a mut W {
645 self.variant(PRSSEL_A::PRSCH2)
646 }
647 #[doc = "PRS Channel 3 selected."]
648 #[inline(always)]
649 pub fn prsch3(self) -> &'a mut W {
650 self.variant(PRSSEL_A::PRSCH3)
651 }
652 #[doc = "PRS Channel 4 selected."]
653 #[inline(always)]
654 pub fn prsch4(self) -> &'a mut W {
655 self.variant(PRSSEL_A::PRSCH4)
656 }
657 #[doc = "PRS Channel 5 selected."]
658 #[inline(always)]
659 pub fn prsch5(self) -> &'a mut W {
660 self.variant(PRSSEL_A::PRSCH5)
661 }
662 #[doc = "PRS Channel 6 selected."]
663 #[inline(always)]
664 pub fn prsch6(self) -> &'a mut W {
665 self.variant(PRSSEL_A::PRSCH6)
666 }
667 #[doc = "PRS Channel 7 selected."]
668 #[inline(always)]
669 pub fn prsch7(self) -> &'a mut W {
670 self.variant(PRSSEL_A::PRSCH7)
671 }
672 #[doc = "PRS Channel 8 selected."]
673 #[inline(always)]
674 pub fn prsch8(self) -> &'a mut W {
675 self.variant(PRSSEL_A::PRSCH8)
676 }
677 #[doc = "PRS Channel 9 selected."]
678 #[inline(always)]
679 pub fn prsch9(self) -> &'a mut W {
680 self.variant(PRSSEL_A::PRSCH9)
681 }
682 #[doc = "PRS Channel 10 selected."]
683 #[inline(always)]
684 pub fn prsch10(self) -> &'a mut W {
685 self.variant(PRSSEL_A::PRSCH10)
686 }
687 #[doc = "PRS Channel 11 selected."]
688 #[inline(always)]
689 pub fn prsch11(self) -> &'a mut W {
690 self.variant(PRSSEL_A::PRSCH11)
691 }
692}
693impl R {
694 #[doc = "Bit 0 - Current DAC Enable"]
695 #[inline(always)]
696 pub fn en(&self) -> EN_R {
697 EN_R::new((self.bits & 1) != 0)
698 }
699 #[doc = "Bit 1 - Current Sink Enable"]
700 #[inline(always)]
701 pub fn cursink(&self) -> CURSINK_R {
702 CURSINK_R::new(((self.bits >> 1) & 1) != 0)
703 }
704 #[doc = "Bit 2 - Minimum Output Transition Enable"]
705 #[inline(always)]
706 pub fn minouttrans(&self) -> MINOUTTRANS_R {
707 MINOUTTRANS_R::new(((self.bits >> 2) & 1) != 0)
708 }
709 #[doc = "Bit 3 - APORT Output Enable"]
710 #[inline(always)]
711 pub fn aportouten(&self) -> APORTOUTEN_R {
712 APORTOUTEN_R::new(((self.bits >> 3) & 1) != 0)
713 }
714 #[doc = "Bits 4:11 - APORT Output Select"]
715 #[inline(always)]
716 pub fn aportoutsel(&self) -> APORTOUTSEL_R {
717 APORTOUTSEL_R::new(((self.bits >> 4) & 0xff) as u8)
718 }
719 #[doc = "Bit 12 - Power Select"]
720 #[inline(always)]
721 pub fn pwrsel(&self) -> PWRSEL_R {
722 PWRSEL_R::new(((self.bits >> 12) & 1) != 0)
723 }
724 #[doc = "Bit 13 - EM2 Delay"]
725 #[inline(always)]
726 pub fn em2delay(&self) -> EM2DELAY_R {
727 EM2DELAY_R::new(((self.bits >> 13) & 1) != 0)
728 }
729 #[doc = "Bit 14 - APORT Bus Master Disable"]
730 #[inline(always)]
731 pub fn aportmasterdis(&self) -> APORTMASTERDIS_R {
732 APORTMASTERDIS_R::new(((self.bits >> 14) & 1) != 0)
733 }
734 #[doc = "Bit 16 - PRS Controlled APORT Output Enable"]
735 #[inline(always)]
736 pub fn aportoutenprs(&self) -> APORTOUTENPRS_R {
737 APORTOUTENPRS_R::new(((self.bits >> 16) & 1) != 0)
738 }
739 #[doc = "Bits 20:23 - IDAC Output Enable PRS Channel Select"]
740 #[inline(always)]
741 pub fn prssel(&self) -> PRSSEL_R {
742 PRSSEL_R::new(((self.bits >> 20) & 0x0f) as u8)
743 }
744}
745impl W {
746 #[doc = "Bit 0 - Current DAC Enable"]
747 #[inline(always)]
748 pub fn en(&mut self) -> EN_W {
749 EN_W::new(self)
750 }
751 #[doc = "Bit 1 - Current Sink Enable"]
752 #[inline(always)]
753 pub fn cursink(&mut self) -> CURSINK_W {
754 CURSINK_W::new(self)
755 }
756 #[doc = "Bit 2 - Minimum Output Transition Enable"]
757 #[inline(always)]
758 pub fn minouttrans(&mut self) -> MINOUTTRANS_W {
759 MINOUTTRANS_W::new(self)
760 }
761 #[doc = "Bit 3 - APORT Output Enable"]
762 #[inline(always)]
763 pub fn aportouten(&mut self) -> APORTOUTEN_W {
764 APORTOUTEN_W::new(self)
765 }
766 #[doc = "Bits 4:11 - APORT Output Select"]
767 #[inline(always)]
768 pub fn aportoutsel(&mut self) -> APORTOUTSEL_W {
769 APORTOUTSEL_W::new(self)
770 }
771 #[doc = "Bit 12 - Power Select"]
772 #[inline(always)]
773 pub fn pwrsel(&mut self) -> PWRSEL_W {
774 PWRSEL_W::new(self)
775 }
776 #[doc = "Bit 13 - EM2 Delay"]
777 #[inline(always)]
778 pub fn em2delay(&mut self) -> EM2DELAY_W {
779 EM2DELAY_W::new(self)
780 }
781 #[doc = "Bit 14 - APORT Bus Master Disable"]
782 #[inline(always)]
783 pub fn aportmasterdis(&mut self) -> APORTMASTERDIS_W {
784 APORTMASTERDIS_W::new(self)
785 }
786 #[doc = "Bit 16 - PRS Controlled APORT Output Enable"]
787 #[inline(always)]
788 pub fn aportoutenprs(&mut self) -> APORTOUTENPRS_W {
789 APORTOUTENPRS_W::new(self)
790 }
791 #[doc = "Bits 20:23 - IDAC Output Enable PRS Channel Select"]
792 #[inline(always)]
793 pub fn prssel(&mut self) -> PRSSEL_W {
794 PRSSEL_W::new(self)
795 }
796 #[doc = "Writes raw bits to the register."]
797 #[inline(always)]
798 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
799 self.0.bits(bits);
800 self
801 }
802}
803#[doc = "Control 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 [ctrl](index.html) module"]
804pub struct CTRL_SPEC;
805impl crate::RegisterSpec for CTRL_SPEC {
806 type Ux = u32;
807}
808#[doc = "`read()` method returns [ctrl::R](R) reader structure"]
809impl crate::Readable for CTRL_SPEC {
810 type Reader = R;
811}
812#[doc = "`write(|w| ..)` method takes [ctrl::W](W) writer structure"]
813impl crate::Writable for CTRL_SPEC {
814 type Writer = W;
815}
816#[doc = "`reset()` method sets CTRL to value 0"]
817impl crate::Resettable for CTRL_SPEC {
818 #[inline(always)]
819 fn reset_value() -> Self::Ux {
820 0
821 }
822}