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 = "Field `MAINOUTEN` reader - Output Enable"]
512pub type MAINOUTEN_R = crate::BitReader<bool>;
513#[doc = "Field `MAINOUTEN` writer - Output Enable"]
514pub type MAINOUTEN_W<'a> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, 18>;
515#[doc = "Field `MAINOUTENPRS` reader - PRS Controlled Main Pad Output Enable"]
516pub type MAINOUTENPRS_R = crate::BitReader<bool>;
517#[doc = "Field `MAINOUTENPRS` writer - PRS Controlled Main Pad Output Enable"]
518pub type MAINOUTENPRS_W<'a> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, 19>;
519#[doc = "IDAC Output Enable PRS Channel Select\n\nValue on reset: 0"]
520#[derive(Clone, Copy, Debug, PartialEq)]
521#[repr(u8)]
522pub enum PRSSEL_A {
523 #[doc = "0: PRS Channel 0 selected."]
524 PRSCH0 = 0,
525 #[doc = "1: PRS Channel 1 selected."]
526 PRSCH1 = 1,
527 #[doc = "2: PRS Channel 2 selected."]
528 PRSCH2 = 2,
529 #[doc = "3: PRS Channel 3 selected."]
530 PRSCH3 = 3,
531 #[doc = "4: PRS Channel 4 selected."]
532 PRSCH4 = 4,
533 #[doc = "5: PRS Channel 5 selected."]
534 PRSCH5 = 5,
535 #[doc = "6: PRS Channel 6 selected."]
536 PRSCH6 = 6,
537 #[doc = "7: PRS Channel 7 selected."]
538 PRSCH7 = 7,
539 #[doc = "8: PRS Channel 8 selected."]
540 PRSCH8 = 8,
541 #[doc = "9: PRS Channel 9 selected."]
542 PRSCH9 = 9,
543 #[doc = "10: PRS Channel 10 selected."]
544 PRSCH10 = 10,
545 #[doc = "11: PRS Channel 11 selected."]
546 PRSCH11 = 11,
547}
548impl From<PRSSEL_A> for u8 {
549 #[inline(always)]
550 fn from(variant: PRSSEL_A) -> Self {
551 variant as _
552 }
553}
554#[doc = "Field `PRSSEL` reader - IDAC Output Enable PRS Channel Select"]
555pub type PRSSEL_R = crate::FieldReader<u8, PRSSEL_A>;
556impl PRSSEL_R {
557 #[doc = "Get enumerated values variant"]
558 #[inline(always)]
559 pub fn variant(&self) -> Option<PRSSEL_A> {
560 match self.bits {
561 0 => Some(PRSSEL_A::PRSCH0),
562 1 => Some(PRSSEL_A::PRSCH1),
563 2 => Some(PRSSEL_A::PRSCH2),
564 3 => Some(PRSSEL_A::PRSCH3),
565 4 => Some(PRSSEL_A::PRSCH4),
566 5 => Some(PRSSEL_A::PRSCH5),
567 6 => Some(PRSSEL_A::PRSCH6),
568 7 => Some(PRSSEL_A::PRSCH7),
569 8 => Some(PRSSEL_A::PRSCH8),
570 9 => Some(PRSSEL_A::PRSCH9),
571 10 => Some(PRSSEL_A::PRSCH10),
572 11 => Some(PRSSEL_A::PRSCH11),
573 _ => None,
574 }
575 }
576 #[doc = "Checks if the value of the field is `PRSCH0`"]
577 #[inline(always)]
578 pub fn is_prsch0(&self) -> bool {
579 *self == PRSSEL_A::PRSCH0
580 }
581 #[doc = "Checks if the value of the field is `PRSCH1`"]
582 #[inline(always)]
583 pub fn is_prsch1(&self) -> bool {
584 *self == PRSSEL_A::PRSCH1
585 }
586 #[doc = "Checks if the value of the field is `PRSCH2`"]
587 #[inline(always)]
588 pub fn is_prsch2(&self) -> bool {
589 *self == PRSSEL_A::PRSCH2
590 }
591 #[doc = "Checks if the value of the field is `PRSCH3`"]
592 #[inline(always)]
593 pub fn is_prsch3(&self) -> bool {
594 *self == PRSSEL_A::PRSCH3
595 }
596 #[doc = "Checks if the value of the field is `PRSCH4`"]
597 #[inline(always)]
598 pub fn is_prsch4(&self) -> bool {
599 *self == PRSSEL_A::PRSCH4
600 }
601 #[doc = "Checks if the value of the field is `PRSCH5`"]
602 #[inline(always)]
603 pub fn is_prsch5(&self) -> bool {
604 *self == PRSSEL_A::PRSCH5
605 }
606 #[doc = "Checks if the value of the field is `PRSCH6`"]
607 #[inline(always)]
608 pub fn is_prsch6(&self) -> bool {
609 *self == PRSSEL_A::PRSCH6
610 }
611 #[doc = "Checks if the value of the field is `PRSCH7`"]
612 #[inline(always)]
613 pub fn is_prsch7(&self) -> bool {
614 *self == PRSSEL_A::PRSCH7
615 }
616 #[doc = "Checks if the value of the field is `PRSCH8`"]
617 #[inline(always)]
618 pub fn is_prsch8(&self) -> bool {
619 *self == PRSSEL_A::PRSCH8
620 }
621 #[doc = "Checks if the value of the field is `PRSCH9`"]
622 #[inline(always)]
623 pub fn is_prsch9(&self) -> bool {
624 *self == PRSSEL_A::PRSCH9
625 }
626 #[doc = "Checks if the value of the field is `PRSCH10`"]
627 #[inline(always)]
628 pub fn is_prsch10(&self) -> bool {
629 *self == PRSSEL_A::PRSCH10
630 }
631 #[doc = "Checks if the value of the field is `PRSCH11`"]
632 #[inline(always)]
633 pub fn is_prsch11(&self) -> bool {
634 *self == PRSSEL_A::PRSCH11
635 }
636}
637#[doc = "Field `PRSSEL` writer - IDAC Output Enable PRS Channel Select"]
638pub type PRSSEL_W<'a> = crate::FieldWriter<'a, u32, CTRL_SPEC, u8, PRSSEL_A, 4, 20>;
639impl<'a> PRSSEL_W<'a> {
640 #[doc = "PRS Channel 0 selected."]
641 #[inline(always)]
642 pub fn prsch0(self) -> &'a mut W {
643 self.variant(PRSSEL_A::PRSCH0)
644 }
645 #[doc = "PRS Channel 1 selected."]
646 #[inline(always)]
647 pub fn prsch1(self) -> &'a mut W {
648 self.variant(PRSSEL_A::PRSCH1)
649 }
650 #[doc = "PRS Channel 2 selected."]
651 #[inline(always)]
652 pub fn prsch2(self) -> &'a mut W {
653 self.variant(PRSSEL_A::PRSCH2)
654 }
655 #[doc = "PRS Channel 3 selected."]
656 #[inline(always)]
657 pub fn prsch3(self) -> &'a mut W {
658 self.variant(PRSSEL_A::PRSCH3)
659 }
660 #[doc = "PRS Channel 4 selected."]
661 #[inline(always)]
662 pub fn prsch4(self) -> &'a mut W {
663 self.variant(PRSSEL_A::PRSCH4)
664 }
665 #[doc = "PRS Channel 5 selected."]
666 #[inline(always)]
667 pub fn prsch5(self) -> &'a mut W {
668 self.variant(PRSSEL_A::PRSCH5)
669 }
670 #[doc = "PRS Channel 6 selected."]
671 #[inline(always)]
672 pub fn prsch6(self) -> &'a mut W {
673 self.variant(PRSSEL_A::PRSCH6)
674 }
675 #[doc = "PRS Channel 7 selected."]
676 #[inline(always)]
677 pub fn prsch7(self) -> &'a mut W {
678 self.variant(PRSSEL_A::PRSCH7)
679 }
680 #[doc = "PRS Channel 8 selected."]
681 #[inline(always)]
682 pub fn prsch8(self) -> &'a mut W {
683 self.variant(PRSSEL_A::PRSCH8)
684 }
685 #[doc = "PRS Channel 9 selected."]
686 #[inline(always)]
687 pub fn prsch9(self) -> &'a mut W {
688 self.variant(PRSSEL_A::PRSCH9)
689 }
690 #[doc = "PRS Channel 10 selected."]
691 #[inline(always)]
692 pub fn prsch10(self) -> &'a mut W {
693 self.variant(PRSSEL_A::PRSCH10)
694 }
695 #[doc = "PRS Channel 11 selected."]
696 #[inline(always)]
697 pub fn prsch11(self) -> &'a mut W {
698 self.variant(PRSSEL_A::PRSCH11)
699 }
700}
701impl R {
702 #[doc = "Bit 0 - Current DAC Enable"]
703 #[inline(always)]
704 pub fn en(&self) -> EN_R {
705 EN_R::new((self.bits & 1) != 0)
706 }
707 #[doc = "Bit 1 - Current Sink Enable"]
708 #[inline(always)]
709 pub fn cursink(&self) -> CURSINK_R {
710 CURSINK_R::new(((self.bits >> 1) & 1) != 0)
711 }
712 #[doc = "Bit 2 - Minimum Output Transition Enable"]
713 #[inline(always)]
714 pub fn minouttrans(&self) -> MINOUTTRANS_R {
715 MINOUTTRANS_R::new(((self.bits >> 2) & 1) != 0)
716 }
717 #[doc = "Bit 3 - APORT Output Enable"]
718 #[inline(always)]
719 pub fn aportouten(&self) -> APORTOUTEN_R {
720 APORTOUTEN_R::new(((self.bits >> 3) & 1) != 0)
721 }
722 #[doc = "Bits 4:11 - APORT Output Select"]
723 #[inline(always)]
724 pub fn aportoutsel(&self) -> APORTOUTSEL_R {
725 APORTOUTSEL_R::new(((self.bits >> 4) & 0xff) as u8)
726 }
727 #[doc = "Bit 12 - Power Select"]
728 #[inline(always)]
729 pub fn pwrsel(&self) -> PWRSEL_R {
730 PWRSEL_R::new(((self.bits >> 12) & 1) != 0)
731 }
732 #[doc = "Bit 13 - EM2 Delay"]
733 #[inline(always)]
734 pub fn em2delay(&self) -> EM2DELAY_R {
735 EM2DELAY_R::new(((self.bits >> 13) & 1) != 0)
736 }
737 #[doc = "Bit 14 - APORT Bus Master Disable"]
738 #[inline(always)]
739 pub fn aportmasterdis(&self) -> APORTMASTERDIS_R {
740 APORTMASTERDIS_R::new(((self.bits >> 14) & 1) != 0)
741 }
742 #[doc = "Bit 16 - PRS Controlled APORT Output Enable"]
743 #[inline(always)]
744 pub fn aportoutenprs(&self) -> APORTOUTENPRS_R {
745 APORTOUTENPRS_R::new(((self.bits >> 16) & 1) != 0)
746 }
747 #[doc = "Bit 18 - Output Enable"]
748 #[inline(always)]
749 pub fn mainouten(&self) -> MAINOUTEN_R {
750 MAINOUTEN_R::new(((self.bits >> 18) & 1) != 0)
751 }
752 #[doc = "Bit 19 - PRS Controlled Main Pad Output Enable"]
753 #[inline(always)]
754 pub fn mainoutenprs(&self) -> MAINOUTENPRS_R {
755 MAINOUTENPRS_R::new(((self.bits >> 19) & 1) != 0)
756 }
757 #[doc = "Bits 20:23 - IDAC Output Enable PRS Channel Select"]
758 #[inline(always)]
759 pub fn prssel(&self) -> PRSSEL_R {
760 PRSSEL_R::new(((self.bits >> 20) & 0x0f) as u8)
761 }
762}
763impl W {
764 #[doc = "Bit 0 - Current DAC Enable"]
765 #[inline(always)]
766 pub fn en(&mut self) -> EN_W {
767 EN_W::new(self)
768 }
769 #[doc = "Bit 1 - Current Sink Enable"]
770 #[inline(always)]
771 pub fn cursink(&mut self) -> CURSINK_W {
772 CURSINK_W::new(self)
773 }
774 #[doc = "Bit 2 - Minimum Output Transition Enable"]
775 #[inline(always)]
776 pub fn minouttrans(&mut self) -> MINOUTTRANS_W {
777 MINOUTTRANS_W::new(self)
778 }
779 #[doc = "Bit 3 - APORT Output Enable"]
780 #[inline(always)]
781 pub fn aportouten(&mut self) -> APORTOUTEN_W {
782 APORTOUTEN_W::new(self)
783 }
784 #[doc = "Bits 4:11 - APORT Output Select"]
785 #[inline(always)]
786 pub fn aportoutsel(&mut self) -> APORTOUTSEL_W {
787 APORTOUTSEL_W::new(self)
788 }
789 #[doc = "Bit 12 - Power Select"]
790 #[inline(always)]
791 pub fn pwrsel(&mut self) -> PWRSEL_W {
792 PWRSEL_W::new(self)
793 }
794 #[doc = "Bit 13 - EM2 Delay"]
795 #[inline(always)]
796 pub fn em2delay(&mut self) -> EM2DELAY_W {
797 EM2DELAY_W::new(self)
798 }
799 #[doc = "Bit 14 - APORT Bus Master Disable"]
800 #[inline(always)]
801 pub fn aportmasterdis(&mut self) -> APORTMASTERDIS_W {
802 APORTMASTERDIS_W::new(self)
803 }
804 #[doc = "Bit 16 - PRS Controlled APORT Output Enable"]
805 #[inline(always)]
806 pub fn aportoutenprs(&mut self) -> APORTOUTENPRS_W {
807 APORTOUTENPRS_W::new(self)
808 }
809 #[doc = "Bit 18 - Output Enable"]
810 #[inline(always)]
811 pub fn mainouten(&mut self) -> MAINOUTEN_W {
812 MAINOUTEN_W::new(self)
813 }
814 #[doc = "Bit 19 - PRS Controlled Main Pad Output Enable"]
815 #[inline(always)]
816 pub fn mainoutenprs(&mut self) -> MAINOUTENPRS_W {
817 MAINOUTENPRS_W::new(self)
818 }
819 #[doc = "Bits 20:23 - IDAC Output Enable PRS Channel Select"]
820 #[inline(always)]
821 pub fn prssel(&mut self) -> PRSSEL_W {
822 PRSSEL_W::new(self)
823 }
824 #[doc = "Writes raw bits to the register."]
825 #[inline(always)]
826 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
827 self.0.bits(bits);
828 self
829 }
830}
831#[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"]
832pub struct CTRL_SPEC;
833impl crate::RegisterSpec for CTRL_SPEC {
834 type Ux = u32;
835}
836#[doc = "`read()` method returns [ctrl::R](R) reader structure"]
837impl crate::Readable for CTRL_SPEC {
838 type Reader = R;
839}
840#[doc = "`write(|w| ..)` method takes [ctrl::W](W) writer structure"]
841impl crate::Writable for CTRL_SPEC {
842 type Writer = W;
843}
844#[doc = "`reset()` method sets CTRL to value 0"]
845impl crate::Resettable for CTRL_SPEC {
846 #[inline(always)]
847 fn reset_value() -> Self::Ux {
848 0
849 }
850}