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