1#[doc = "Register `TCTRL[%s]` reader"]
2pub struct R(crate::R<TCTRL_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<TCTRL_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<TCTRL_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<TCTRL_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `TCTRL[%s]` writer"]
17pub struct W(crate::W<TCTRL_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<TCTRL_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<TCTRL_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<TCTRL_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `HTEN` reader - Trigger enable."]
38pub type HTEN_R = crate::BitReader<HTEN_A>;
39#[doc = "Trigger enable.\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41pub enum HTEN_A {
42 #[doc = "0: Hardware trigger source disabled."]
43 HTEN_0 = 0,
44 #[doc = "1: Hardware trigger source enabled."]
45 HTEN_1 = 1,
46}
47impl From<HTEN_A> for bool {
48 #[inline(always)]
49 fn from(variant: HTEN_A) -> Self {
50 variant as u8 != 0
51 }
52}
53impl HTEN_R {
54 #[doc = "Get enumerated values variant"]
55 #[inline(always)]
56 pub fn variant(&self) -> HTEN_A {
57 match self.bits {
58 false => HTEN_A::HTEN_0,
59 true => HTEN_A::HTEN_1,
60 }
61 }
62 #[doc = "Checks if the value of the field is `HTEN_0`"]
63 #[inline(always)]
64 pub fn is_hten_0(&self) -> bool {
65 *self == HTEN_A::HTEN_0
66 }
67 #[doc = "Checks if the value of the field is `HTEN_1`"]
68 #[inline(always)]
69 pub fn is_hten_1(&self) -> bool {
70 *self == HTEN_A::HTEN_1
71 }
72}
73#[doc = "Field `HTEN` writer - Trigger enable."]
74pub type HTEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, TCTRL_SPEC, HTEN_A, O>;
75impl<'a, const O: u8> HTEN_W<'a, O> {
76 #[doc = "Hardware trigger source disabled."]
77 #[inline(always)]
78 pub fn hten_0(self) -> &'a mut W {
79 self.variant(HTEN_A::HTEN_0)
80 }
81 #[doc = "Hardware trigger source enabled."]
82 #[inline(always)]
83 pub fn hten_1(self) -> &'a mut W {
84 self.variant(HTEN_A::HTEN_1)
85 }
86}
87#[doc = "Field `FIFO_SEL_A` reader - SAR Result Destination For Channel A."]
88pub type FIFO_SEL_A_R = crate::BitReader<FIFO_SEL_A_A>;
89#[doc = "SAR Result Destination For Channel A.\n\nValue on reset: 0"]
90#[derive(Clone, Copy, Debug, PartialEq, Eq)]
91pub enum FIFO_SEL_A_A {
92 #[doc = "0: Result written to FIFO 0."]
93 FIFO_SEL_A_0 = 0,
94 #[doc = "1: Result written to FIFO 1."]
95 FIFO_SEL_A_1 = 1,
96}
97impl From<FIFO_SEL_A_A> for bool {
98 #[inline(always)]
99 fn from(variant: FIFO_SEL_A_A) -> Self {
100 variant as u8 != 0
101 }
102}
103impl FIFO_SEL_A_R {
104 #[doc = "Get enumerated values variant"]
105 #[inline(always)]
106 pub fn variant(&self) -> FIFO_SEL_A_A {
107 match self.bits {
108 false => FIFO_SEL_A_A::FIFO_SEL_A_0,
109 true => FIFO_SEL_A_A::FIFO_SEL_A_1,
110 }
111 }
112 #[doc = "Checks if the value of the field is `FIFO_SEL_A_0`"]
113 #[inline(always)]
114 pub fn is_fifo_sel_a_0(&self) -> bool {
115 *self == FIFO_SEL_A_A::FIFO_SEL_A_0
116 }
117 #[doc = "Checks if the value of the field is `FIFO_SEL_A_1`"]
118 #[inline(always)]
119 pub fn is_fifo_sel_a_1(&self) -> bool {
120 *self == FIFO_SEL_A_A::FIFO_SEL_A_1
121 }
122}
123#[doc = "Field `FIFO_SEL_A` writer - SAR Result Destination For Channel A."]
124pub type FIFO_SEL_A_W<'a, const O: u8> = crate::BitWriter<'a, u32, TCTRL_SPEC, FIFO_SEL_A_A, O>;
125impl<'a, const O: u8> FIFO_SEL_A_W<'a, O> {
126 #[doc = "Result written to FIFO 0."]
127 #[inline(always)]
128 pub fn fifo_sel_a_0(self) -> &'a mut W {
129 self.variant(FIFO_SEL_A_A::FIFO_SEL_A_0)
130 }
131 #[doc = "Result written to FIFO 1."]
132 #[inline(always)]
133 pub fn fifo_sel_a_1(self) -> &'a mut W {
134 self.variant(FIFO_SEL_A_A::FIFO_SEL_A_1)
135 }
136}
137#[doc = "Field `FIFO_SEL_B` reader - SAR Result Destination For Channel B."]
138pub type FIFO_SEL_B_R = crate::BitReader<FIFO_SEL_B_A>;
139#[doc = "SAR Result Destination For Channel B.\n\nValue on reset: 0"]
140#[derive(Clone, Copy, Debug, PartialEq, Eq)]
141pub enum FIFO_SEL_B_A {
142 #[doc = "0: Result written to FIFO 0."]
143 FIFO_SEL_B_0 = 0,
144 #[doc = "1: Result written to FIFO 1."]
145 FIFO_SEL_B_1 = 1,
146}
147impl From<FIFO_SEL_B_A> for bool {
148 #[inline(always)]
149 fn from(variant: FIFO_SEL_B_A) -> Self {
150 variant as u8 != 0
151 }
152}
153impl FIFO_SEL_B_R {
154 #[doc = "Get enumerated values variant"]
155 #[inline(always)]
156 pub fn variant(&self) -> FIFO_SEL_B_A {
157 match self.bits {
158 false => FIFO_SEL_B_A::FIFO_SEL_B_0,
159 true => FIFO_SEL_B_A::FIFO_SEL_B_1,
160 }
161 }
162 #[doc = "Checks if the value of the field is `FIFO_SEL_B_0`"]
163 #[inline(always)]
164 pub fn is_fifo_sel_b_0(&self) -> bool {
165 *self == FIFO_SEL_B_A::FIFO_SEL_B_0
166 }
167 #[doc = "Checks if the value of the field is `FIFO_SEL_B_1`"]
168 #[inline(always)]
169 pub fn is_fifo_sel_b_1(&self) -> bool {
170 *self == FIFO_SEL_B_A::FIFO_SEL_B_1
171 }
172}
173#[doc = "Field `FIFO_SEL_B` writer - SAR Result Destination For Channel B."]
174pub type FIFO_SEL_B_W<'a, const O: u8> = crate::BitWriter<'a, u32, TCTRL_SPEC, FIFO_SEL_B_A, O>;
175impl<'a, const O: u8> FIFO_SEL_B_W<'a, O> {
176 #[doc = "Result written to FIFO 0."]
177 #[inline(always)]
178 pub fn fifo_sel_b_0(self) -> &'a mut W {
179 self.variant(FIFO_SEL_B_A::FIFO_SEL_B_0)
180 }
181 #[doc = "Result written to FIFO 1."]
182 #[inline(always)]
183 pub fn fifo_sel_b_1(self) -> &'a mut W {
184 self.variant(FIFO_SEL_B_A::FIFO_SEL_B_1)
185 }
186}
187#[doc = "Field `TPRI` reader - Trigger priority setting."]
188pub type TPRI_R = crate::FieldReader<u8, TPRI_A>;
189#[doc = "Trigger priority setting.\n\nValue on reset: 0"]
190#[derive(Clone, Copy, Debug, PartialEq, Eq)]
191#[repr(u8)]
192pub enum TPRI_A {
193 #[doc = "0: Set to highest priority, Level 1."]
194 TPRI_0 = 0,
195 #[doc = "1: Set to corresponding priority level."]
196 TPRI_1 = 1,
197 #[doc = "2: Set to corresponding priority level."]
198 TPRI_2 = 2,
199 #[doc = "3: Set to corresponding priority level."]
200 TPRI_3 = 3,
201 #[doc = "4: Set to corresponding priority level."]
202 TPRI_4 = 4,
203 #[doc = "5: Set to corresponding priority level."]
204 TPRI_5 = 5,
205 #[doc = "6: Set to corresponding priority level."]
206 TPRI_6 = 6,
207 #[doc = "7: Set to corresponding priority level."]
208 TPRI_7 = 7,
209 #[doc = "8: Set to corresponding priority level."]
210 TPRI_8 = 8,
211 #[doc = "9: Set to corresponding priority level."]
212 TPRI_9 = 9,
213 #[doc = "15: Set to lowest priority, Level 16."]
214 TPRI_15 = 15,
215}
216impl From<TPRI_A> for u8 {
217 #[inline(always)]
218 fn from(variant: TPRI_A) -> Self {
219 variant as _
220 }
221}
222impl TPRI_R {
223 #[doc = "Get enumerated values variant"]
224 #[inline(always)]
225 pub fn variant(&self) -> Option<TPRI_A> {
226 match self.bits {
227 0 => Some(TPRI_A::TPRI_0),
228 1 => Some(TPRI_A::TPRI_1),
229 2 => Some(TPRI_A::TPRI_2),
230 3 => Some(TPRI_A::TPRI_3),
231 4 => Some(TPRI_A::TPRI_4),
232 5 => Some(TPRI_A::TPRI_5),
233 6 => Some(TPRI_A::TPRI_6),
234 7 => Some(TPRI_A::TPRI_7),
235 8 => Some(TPRI_A::TPRI_8),
236 9 => Some(TPRI_A::TPRI_9),
237 15 => Some(TPRI_A::TPRI_15),
238 _ => None,
239 }
240 }
241 #[doc = "Checks if the value of the field is `TPRI_0`"]
242 #[inline(always)]
243 pub fn is_tpri_0(&self) -> bool {
244 *self == TPRI_A::TPRI_0
245 }
246 #[doc = "Checks if the value of the field is `TPRI_1`"]
247 #[inline(always)]
248 pub fn is_tpri_1(&self) -> bool {
249 *self == TPRI_A::TPRI_1
250 }
251 #[doc = "Checks if the value of the field is `TPRI_2`"]
252 #[inline(always)]
253 pub fn is_tpri_2(&self) -> bool {
254 *self == TPRI_A::TPRI_2
255 }
256 #[doc = "Checks if the value of the field is `TPRI_3`"]
257 #[inline(always)]
258 pub fn is_tpri_3(&self) -> bool {
259 *self == TPRI_A::TPRI_3
260 }
261 #[doc = "Checks if the value of the field is `TPRI_4`"]
262 #[inline(always)]
263 pub fn is_tpri_4(&self) -> bool {
264 *self == TPRI_A::TPRI_4
265 }
266 #[doc = "Checks if the value of the field is `TPRI_5`"]
267 #[inline(always)]
268 pub fn is_tpri_5(&self) -> bool {
269 *self == TPRI_A::TPRI_5
270 }
271 #[doc = "Checks if the value of the field is `TPRI_6`"]
272 #[inline(always)]
273 pub fn is_tpri_6(&self) -> bool {
274 *self == TPRI_A::TPRI_6
275 }
276 #[doc = "Checks if the value of the field is `TPRI_7`"]
277 #[inline(always)]
278 pub fn is_tpri_7(&self) -> bool {
279 *self == TPRI_A::TPRI_7
280 }
281 #[doc = "Checks if the value of the field is `TPRI_8`"]
282 #[inline(always)]
283 pub fn is_tpri_8(&self) -> bool {
284 *self == TPRI_A::TPRI_8
285 }
286 #[doc = "Checks if the value of the field is `TPRI_9`"]
287 #[inline(always)]
288 pub fn is_tpri_9(&self) -> bool {
289 *self == TPRI_A::TPRI_9
290 }
291 #[doc = "Checks if the value of the field is `TPRI_15`"]
292 #[inline(always)]
293 pub fn is_tpri_15(&self) -> bool {
294 *self == TPRI_A::TPRI_15
295 }
296}
297#[doc = "Field `TPRI` writer - Trigger priority setting."]
298pub type TPRI_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TCTRL_SPEC, u8, TPRI_A, 4, O>;
299impl<'a, const O: u8> TPRI_W<'a, O> {
300 #[doc = "Set to highest priority, Level 1."]
301 #[inline(always)]
302 pub fn tpri_0(self) -> &'a mut W {
303 self.variant(TPRI_A::TPRI_0)
304 }
305 #[doc = "Set to corresponding priority level."]
306 #[inline(always)]
307 pub fn tpri_1(self) -> &'a mut W {
308 self.variant(TPRI_A::TPRI_1)
309 }
310 #[doc = "Set to corresponding priority level."]
311 #[inline(always)]
312 pub fn tpri_2(self) -> &'a mut W {
313 self.variant(TPRI_A::TPRI_2)
314 }
315 #[doc = "Set to corresponding priority level."]
316 #[inline(always)]
317 pub fn tpri_3(self) -> &'a mut W {
318 self.variant(TPRI_A::TPRI_3)
319 }
320 #[doc = "Set to corresponding priority level."]
321 #[inline(always)]
322 pub fn tpri_4(self) -> &'a mut W {
323 self.variant(TPRI_A::TPRI_4)
324 }
325 #[doc = "Set to corresponding priority level."]
326 #[inline(always)]
327 pub fn tpri_5(self) -> &'a mut W {
328 self.variant(TPRI_A::TPRI_5)
329 }
330 #[doc = "Set to corresponding priority level."]
331 #[inline(always)]
332 pub fn tpri_6(self) -> &'a mut W {
333 self.variant(TPRI_A::TPRI_6)
334 }
335 #[doc = "Set to corresponding priority level."]
336 #[inline(always)]
337 pub fn tpri_7(self) -> &'a mut W {
338 self.variant(TPRI_A::TPRI_7)
339 }
340 #[doc = "Set to corresponding priority level."]
341 #[inline(always)]
342 pub fn tpri_8(self) -> &'a mut W {
343 self.variant(TPRI_A::TPRI_8)
344 }
345 #[doc = "Set to corresponding priority level."]
346 #[inline(always)]
347 pub fn tpri_9(self) -> &'a mut W {
348 self.variant(TPRI_A::TPRI_9)
349 }
350 #[doc = "Set to lowest priority, Level 16."]
351 #[inline(always)]
352 pub fn tpri_15(self) -> &'a mut W {
353 self.variant(TPRI_A::TPRI_15)
354 }
355}
356#[doc = "Field `RSYNC` reader - Trigger Resync."]
357pub type RSYNC_R = crate::BitReader<bool>;
358#[doc = "Field `RSYNC` writer - Trigger Resync."]
359pub type RSYNC_W<'a, const O: u8> = crate::BitWriter<'a, u32, TCTRL_SPEC, bool, O>;
360#[doc = "Field `TDLY` reader - Trigger delay select."]
361pub type TDLY_R = crate::FieldReader<u8, u8>;
362#[doc = "Field `TDLY` writer - Trigger delay select."]
363pub type TDLY_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TCTRL_SPEC, u8, u8, 4, O>;
364#[doc = "Field `TCMD` reader - Trigger command select."]
365pub type TCMD_R = crate::FieldReader<u8, TCMD_A>;
366#[doc = "Trigger command select.\n\nValue on reset: 0"]
367#[derive(Clone, Copy, Debug, PartialEq, Eq)]
368#[repr(u8)]
369pub enum TCMD_A {
370 #[doc = "0: Not a valid selection from the command buffer. Trigger event is ignored."]
371 TCMD_0 = 0,
372 #[doc = "1: CMD1 is executed."]
373 TCMD_1 = 1,
374 #[doc = "2: Corresponding CMD is executed."]
375 TCMD_2 = 2,
376 #[doc = "3: Corresponding CMD is executed."]
377 TCMD_3 = 3,
378 #[doc = "4: Corresponding CMD is executed."]
379 TCMD_4 = 4,
380 #[doc = "5: Corresponding CMD is executed."]
381 TCMD_5 = 5,
382 #[doc = "6: Corresponding CMD is executed."]
383 TCMD_6 = 6,
384 #[doc = "7: Corresponding CMD is executed."]
385 TCMD_7 = 7,
386 #[doc = "8: Corresponding CMD is executed."]
387 TCMD_8 = 8,
388 #[doc = "9: Corresponding CMD is executed."]
389 TCMD_9 = 9,
390 #[doc = "15: CMD15 is executed."]
391 TCMD_15 = 15,
392}
393impl From<TCMD_A> for u8 {
394 #[inline(always)]
395 fn from(variant: TCMD_A) -> Self {
396 variant as _
397 }
398}
399impl TCMD_R {
400 #[doc = "Get enumerated values variant"]
401 #[inline(always)]
402 pub fn variant(&self) -> Option<TCMD_A> {
403 match self.bits {
404 0 => Some(TCMD_A::TCMD_0),
405 1 => Some(TCMD_A::TCMD_1),
406 2 => Some(TCMD_A::TCMD_2),
407 3 => Some(TCMD_A::TCMD_3),
408 4 => Some(TCMD_A::TCMD_4),
409 5 => Some(TCMD_A::TCMD_5),
410 6 => Some(TCMD_A::TCMD_6),
411 7 => Some(TCMD_A::TCMD_7),
412 8 => Some(TCMD_A::TCMD_8),
413 9 => Some(TCMD_A::TCMD_9),
414 15 => Some(TCMD_A::TCMD_15),
415 _ => None,
416 }
417 }
418 #[doc = "Checks if the value of the field is `TCMD_0`"]
419 #[inline(always)]
420 pub fn is_tcmd_0(&self) -> bool {
421 *self == TCMD_A::TCMD_0
422 }
423 #[doc = "Checks if the value of the field is `TCMD_1`"]
424 #[inline(always)]
425 pub fn is_tcmd_1(&self) -> bool {
426 *self == TCMD_A::TCMD_1
427 }
428 #[doc = "Checks if the value of the field is `TCMD_2`"]
429 #[inline(always)]
430 pub fn is_tcmd_2(&self) -> bool {
431 *self == TCMD_A::TCMD_2
432 }
433 #[doc = "Checks if the value of the field is `TCMD_3`"]
434 #[inline(always)]
435 pub fn is_tcmd_3(&self) -> bool {
436 *self == TCMD_A::TCMD_3
437 }
438 #[doc = "Checks if the value of the field is `TCMD_4`"]
439 #[inline(always)]
440 pub fn is_tcmd_4(&self) -> bool {
441 *self == TCMD_A::TCMD_4
442 }
443 #[doc = "Checks if the value of the field is `TCMD_5`"]
444 #[inline(always)]
445 pub fn is_tcmd_5(&self) -> bool {
446 *self == TCMD_A::TCMD_5
447 }
448 #[doc = "Checks if the value of the field is `TCMD_6`"]
449 #[inline(always)]
450 pub fn is_tcmd_6(&self) -> bool {
451 *self == TCMD_A::TCMD_6
452 }
453 #[doc = "Checks if the value of the field is `TCMD_7`"]
454 #[inline(always)]
455 pub fn is_tcmd_7(&self) -> bool {
456 *self == TCMD_A::TCMD_7
457 }
458 #[doc = "Checks if the value of the field is `TCMD_8`"]
459 #[inline(always)]
460 pub fn is_tcmd_8(&self) -> bool {
461 *self == TCMD_A::TCMD_8
462 }
463 #[doc = "Checks if the value of the field is `TCMD_9`"]
464 #[inline(always)]
465 pub fn is_tcmd_9(&self) -> bool {
466 *self == TCMD_A::TCMD_9
467 }
468 #[doc = "Checks if the value of the field is `TCMD_15`"]
469 #[inline(always)]
470 pub fn is_tcmd_15(&self) -> bool {
471 *self == TCMD_A::TCMD_15
472 }
473}
474#[doc = "Field `TCMD` writer - Trigger command select."]
475pub type TCMD_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TCTRL_SPEC, u8, TCMD_A, 4, O>;
476impl<'a, const O: u8> TCMD_W<'a, O> {
477 #[doc = "Not a valid selection from the command buffer. Trigger event is ignored."]
478 #[inline(always)]
479 pub fn tcmd_0(self) -> &'a mut W {
480 self.variant(TCMD_A::TCMD_0)
481 }
482 #[doc = "CMD1 is executed."]
483 #[inline(always)]
484 pub fn tcmd_1(self) -> &'a mut W {
485 self.variant(TCMD_A::TCMD_1)
486 }
487 #[doc = "Corresponding CMD is executed."]
488 #[inline(always)]
489 pub fn tcmd_2(self) -> &'a mut W {
490 self.variant(TCMD_A::TCMD_2)
491 }
492 #[doc = "Corresponding CMD is executed."]
493 #[inline(always)]
494 pub fn tcmd_3(self) -> &'a mut W {
495 self.variant(TCMD_A::TCMD_3)
496 }
497 #[doc = "Corresponding CMD is executed."]
498 #[inline(always)]
499 pub fn tcmd_4(self) -> &'a mut W {
500 self.variant(TCMD_A::TCMD_4)
501 }
502 #[doc = "Corresponding CMD is executed."]
503 #[inline(always)]
504 pub fn tcmd_5(self) -> &'a mut W {
505 self.variant(TCMD_A::TCMD_5)
506 }
507 #[doc = "Corresponding CMD is executed."]
508 #[inline(always)]
509 pub fn tcmd_6(self) -> &'a mut W {
510 self.variant(TCMD_A::TCMD_6)
511 }
512 #[doc = "Corresponding CMD is executed."]
513 #[inline(always)]
514 pub fn tcmd_7(self) -> &'a mut W {
515 self.variant(TCMD_A::TCMD_7)
516 }
517 #[doc = "Corresponding CMD is executed."]
518 #[inline(always)]
519 pub fn tcmd_8(self) -> &'a mut W {
520 self.variant(TCMD_A::TCMD_8)
521 }
522 #[doc = "Corresponding CMD is executed."]
523 #[inline(always)]
524 pub fn tcmd_9(self) -> &'a mut W {
525 self.variant(TCMD_A::TCMD_9)
526 }
527 #[doc = "CMD15 is executed."]
528 #[inline(always)]
529 pub fn tcmd_15(self) -> &'a mut W {
530 self.variant(TCMD_A::TCMD_15)
531 }
532}
533impl R {
534 #[doc = "Bit 0 - Trigger enable."]
535 #[inline(always)]
536 pub fn hten(&self) -> HTEN_R {
537 HTEN_R::new((self.bits & 1) != 0)
538 }
539 #[doc = "Bit 1 - SAR Result Destination For Channel A."]
540 #[inline(always)]
541 pub fn fifo_sel_a(&self) -> FIFO_SEL_A_R {
542 FIFO_SEL_A_R::new(((self.bits >> 1) & 1) != 0)
543 }
544 #[doc = "Bit 2 - SAR Result Destination For Channel B."]
545 #[inline(always)]
546 pub fn fifo_sel_b(&self) -> FIFO_SEL_B_R {
547 FIFO_SEL_B_R::new(((self.bits >> 2) & 1) != 0)
548 }
549 #[doc = "Bits 8:11 - Trigger priority setting."]
550 #[inline(always)]
551 pub fn tpri(&self) -> TPRI_R {
552 TPRI_R::new(((self.bits >> 8) & 0x0f) as u8)
553 }
554 #[doc = "Bit 15 - Trigger Resync."]
555 #[inline(always)]
556 pub fn rsync(&self) -> RSYNC_R {
557 RSYNC_R::new(((self.bits >> 15) & 1) != 0)
558 }
559 #[doc = "Bits 16:19 - Trigger delay select."]
560 #[inline(always)]
561 pub fn tdly(&self) -> TDLY_R {
562 TDLY_R::new(((self.bits >> 16) & 0x0f) as u8)
563 }
564 #[doc = "Bits 24:27 - Trigger command select."]
565 #[inline(always)]
566 pub fn tcmd(&self) -> TCMD_R {
567 TCMD_R::new(((self.bits >> 24) & 0x0f) as u8)
568 }
569}
570impl W {
571 #[doc = "Bit 0 - Trigger enable."]
572 #[inline(always)]
573 pub fn hten(&mut self) -> HTEN_W<0> {
574 HTEN_W::new(self)
575 }
576 #[doc = "Bit 1 - SAR Result Destination For Channel A."]
577 #[inline(always)]
578 pub fn fifo_sel_a(&mut self) -> FIFO_SEL_A_W<1> {
579 FIFO_SEL_A_W::new(self)
580 }
581 #[doc = "Bit 2 - SAR Result Destination For Channel B."]
582 #[inline(always)]
583 pub fn fifo_sel_b(&mut self) -> FIFO_SEL_B_W<2> {
584 FIFO_SEL_B_W::new(self)
585 }
586 #[doc = "Bits 8:11 - Trigger priority setting."]
587 #[inline(always)]
588 pub fn tpri(&mut self) -> TPRI_W<8> {
589 TPRI_W::new(self)
590 }
591 #[doc = "Bit 15 - Trigger Resync."]
592 #[inline(always)]
593 pub fn rsync(&mut self) -> RSYNC_W<15> {
594 RSYNC_W::new(self)
595 }
596 #[doc = "Bits 16:19 - Trigger delay select."]
597 #[inline(always)]
598 pub fn tdly(&mut self) -> TDLY_W<16> {
599 TDLY_W::new(self)
600 }
601 #[doc = "Bits 24:27 - Trigger command select."]
602 #[inline(always)]
603 pub fn tcmd(&mut self) -> TCMD_W<24> {
604 TCMD_W::new(self)
605 }
606 #[doc = "Writes raw bits to the register."]
607 #[inline(always)]
608 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
609 self.0.bits(bits);
610 self
611 }
612}
613#[doc = "Trigger 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 [tctrl](index.html) module"]
614pub struct TCTRL_SPEC;
615impl crate::RegisterSpec for TCTRL_SPEC {
616 type Ux = u32;
617}
618#[doc = "`read()` method returns [tctrl::R](R) reader structure"]
619impl crate::Readable for TCTRL_SPEC {
620 type Reader = R;
621}
622#[doc = "`write(|w| ..)` method takes [tctrl::W](W) writer structure"]
623impl crate::Writable for TCTRL_SPEC {
624 type Writer = W;
625}
626#[doc = "`reset()` method sets TCTRL[%s]
627to value 0"]
628impl crate::Resettable for TCTRL_SPEC {
629 #[inline(always)]
630 fn reset_value() -> Self::Ux {
631 0
632 }
633}