1#[doc = "Register `CHASS` reader"]
2pub type R = crate::R<CHASS_SPEC>;
3#[doc = "Register `CHASS` writer"]
4pub type W = crate::W<CHASS_SPEC>;
5#[doc = "Assignment for Channel 0\n\nValue on reset: 0"]
6#[derive(Clone, Copy, Debug, PartialEq, Eq)]
7pub enum ASSCH0_A {
8 #[doc = "0: Channel y can be a background channel converted with lowest priority"]
9 VALUE1 = 0,
10 #[doc = "1: Channel y is a priority channel within group x"]
11 VALUE2 = 1,
12}
13impl From<ASSCH0_A> for bool {
14 #[inline(always)]
15 fn from(variant: ASSCH0_A) -> Self {
16 variant as u8 != 0
17 }
18}
19#[doc = "Field `ASSCH0` reader - Assignment for Channel 0"]
20pub type ASSCH0_R = crate::BitReader<ASSCH0_A>;
21impl ASSCH0_R {
22 #[doc = "Get enumerated values variant"]
23 #[inline(always)]
24 pub const fn variant(&self) -> ASSCH0_A {
25 match self.bits {
26 false => ASSCH0_A::VALUE1,
27 true => ASSCH0_A::VALUE2,
28 }
29 }
30 #[doc = "Channel y can be a background channel converted with lowest priority"]
31 #[inline(always)]
32 pub fn is_value1(&self) -> bool {
33 *self == ASSCH0_A::VALUE1
34 }
35 #[doc = "Channel y is a priority channel within group x"]
36 #[inline(always)]
37 pub fn is_value2(&self) -> bool {
38 *self == ASSCH0_A::VALUE2
39 }
40}
41#[doc = "Field `ASSCH0` writer - Assignment for Channel 0"]
42pub type ASSCH0_W<'a, REG> = crate::BitWriter<'a, REG, ASSCH0_A>;
43impl<'a, REG> ASSCH0_W<'a, REG>
44where
45 REG: crate::Writable + crate::RegisterSpec,
46{
47 #[doc = "Channel y can be a background channel converted with lowest priority"]
48 #[inline(always)]
49 pub fn value1(self) -> &'a mut crate::W<REG> {
50 self.variant(ASSCH0_A::VALUE1)
51 }
52 #[doc = "Channel y is a priority channel within group x"]
53 #[inline(always)]
54 pub fn value2(self) -> &'a mut crate::W<REG> {
55 self.variant(ASSCH0_A::VALUE2)
56 }
57}
58#[doc = "Assignment for Channel 1\n\nValue on reset: 0"]
59#[derive(Clone, Copy, Debug, PartialEq, Eq)]
60pub enum ASSCH1_A {
61 #[doc = "0: Channel y can be a background channel converted with lowest priority"]
62 VALUE1 = 0,
63 #[doc = "1: Channel y is a priority channel within group x"]
64 VALUE2 = 1,
65}
66impl From<ASSCH1_A> for bool {
67 #[inline(always)]
68 fn from(variant: ASSCH1_A) -> Self {
69 variant as u8 != 0
70 }
71}
72#[doc = "Field `ASSCH1` reader - Assignment for Channel 1"]
73pub type ASSCH1_R = crate::BitReader<ASSCH1_A>;
74impl ASSCH1_R {
75 #[doc = "Get enumerated values variant"]
76 #[inline(always)]
77 pub const fn variant(&self) -> ASSCH1_A {
78 match self.bits {
79 false => ASSCH1_A::VALUE1,
80 true => ASSCH1_A::VALUE2,
81 }
82 }
83 #[doc = "Channel y can be a background channel converted with lowest priority"]
84 #[inline(always)]
85 pub fn is_value1(&self) -> bool {
86 *self == ASSCH1_A::VALUE1
87 }
88 #[doc = "Channel y is a priority channel within group x"]
89 #[inline(always)]
90 pub fn is_value2(&self) -> bool {
91 *self == ASSCH1_A::VALUE2
92 }
93}
94#[doc = "Field `ASSCH1` writer - Assignment for Channel 1"]
95pub type ASSCH1_W<'a, REG> = crate::BitWriter<'a, REG, ASSCH1_A>;
96impl<'a, REG> ASSCH1_W<'a, REG>
97where
98 REG: crate::Writable + crate::RegisterSpec,
99{
100 #[doc = "Channel y can be a background channel converted with lowest priority"]
101 #[inline(always)]
102 pub fn value1(self) -> &'a mut crate::W<REG> {
103 self.variant(ASSCH1_A::VALUE1)
104 }
105 #[doc = "Channel y is a priority channel within group x"]
106 #[inline(always)]
107 pub fn value2(self) -> &'a mut crate::W<REG> {
108 self.variant(ASSCH1_A::VALUE2)
109 }
110}
111#[doc = "Assignment for Channel 2\n\nValue on reset: 0"]
112#[derive(Clone, Copy, Debug, PartialEq, Eq)]
113pub enum ASSCH2_A {
114 #[doc = "0: Channel y can be a background channel converted with lowest priority"]
115 VALUE1 = 0,
116 #[doc = "1: Channel y is a priority channel within group x"]
117 VALUE2 = 1,
118}
119impl From<ASSCH2_A> for bool {
120 #[inline(always)]
121 fn from(variant: ASSCH2_A) -> Self {
122 variant as u8 != 0
123 }
124}
125#[doc = "Field `ASSCH2` reader - Assignment for Channel 2"]
126pub type ASSCH2_R = crate::BitReader<ASSCH2_A>;
127impl ASSCH2_R {
128 #[doc = "Get enumerated values variant"]
129 #[inline(always)]
130 pub const fn variant(&self) -> ASSCH2_A {
131 match self.bits {
132 false => ASSCH2_A::VALUE1,
133 true => ASSCH2_A::VALUE2,
134 }
135 }
136 #[doc = "Channel y can be a background channel converted with lowest priority"]
137 #[inline(always)]
138 pub fn is_value1(&self) -> bool {
139 *self == ASSCH2_A::VALUE1
140 }
141 #[doc = "Channel y is a priority channel within group x"]
142 #[inline(always)]
143 pub fn is_value2(&self) -> bool {
144 *self == ASSCH2_A::VALUE2
145 }
146}
147#[doc = "Field `ASSCH2` writer - Assignment for Channel 2"]
148pub type ASSCH2_W<'a, REG> = crate::BitWriter<'a, REG, ASSCH2_A>;
149impl<'a, REG> ASSCH2_W<'a, REG>
150where
151 REG: crate::Writable + crate::RegisterSpec,
152{
153 #[doc = "Channel y can be a background channel converted with lowest priority"]
154 #[inline(always)]
155 pub fn value1(self) -> &'a mut crate::W<REG> {
156 self.variant(ASSCH2_A::VALUE1)
157 }
158 #[doc = "Channel y is a priority channel within group x"]
159 #[inline(always)]
160 pub fn value2(self) -> &'a mut crate::W<REG> {
161 self.variant(ASSCH2_A::VALUE2)
162 }
163}
164#[doc = "Assignment for Channel 3\n\nValue on reset: 0"]
165#[derive(Clone, Copy, Debug, PartialEq, Eq)]
166pub enum ASSCH3_A {
167 #[doc = "0: Channel y can be a background channel converted with lowest priority"]
168 VALUE1 = 0,
169 #[doc = "1: Channel y is a priority channel within group x"]
170 VALUE2 = 1,
171}
172impl From<ASSCH3_A> for bool {
173 #[inline(always)]
174 fn from(variant: ASSCH3_A) -> Self {
175 variant as u8 != 0
176 }
177}
178#[doc = "Field `ASSCH3` reader - Assignment for Channel 3"]
179pub type ASSCH3_R = crate::BitReader<ASSCH3_A>;
180impl ASSCH3_R {
181 #[doc = "Get enumerated values variant"]
182 #[inline(always)]
183 pub const fn variant(&self) -> ASSCH3_A {
184 match self.bits {
185 false => ASSCH3_A::VALUE1,
186 true => ASSCH3_A::VALUE2,
187 }
188 }
189 #[doc = "Channel y can be a background channel converted with lowest priority"]
190 #[inline(always)]
191 pub fn is_value1(&self) -> bool {
192 *self == ASSCH3_A::VALUE1
193 }
194 #[doc = "Channel y is a priority channel within group x"]
195 #[inline(always)]
196 pub fn is_value2(&self) -> bool {
197 *self == ASSCH3_A::VALUE2
198 }
199}
200#[doc = "Field `ASSCH3` writer - Assignment for Channel 3"]
201pub type ASSCH3_W<'a, REG> = crate::BitWriter<'a, REG, ASSCH3_A>;
202impl<'a, REG> ASSCH3_W<'a, REG>
203where
204 REG: crate::Writable + crate::RegisterSpec,
205{
206 #[doc = "Channel y can be a background channel converted with lowest priority"]
207 #[inline(always)]
208 pub fn value1(self) -> &'a mut crate::W<REG> {
209 self.variant(ASSCH3_A::VALUE1)
210 }
211 #[doc = "Channel y is a priority channel within group x"]
212 #[inline(always)]
213 pub fn value2(self) -> &'a mut crate::W<REG> {
214 self.variant(ASSCH3_A::VALUE2)
215 }
216}
217#[doc = "Assignment for Channel 4\n\nValue on reset: 0"]
218#[derive(Clone, Copy, Debug, PartialEq, Eq)]
219pub enum ASSCH4_A {
220 #[doc = "0: Channel y can be a background channel converted with lowest priority"]
221 VALUE1 = 0,
222 #[doc = "1: Channel y is a priority channel within group x"]
223 VALUE2 = 1,
224}
225impl From<ASSCH4_A> for bool {
226 #[inline(always)]
227 fn from(variant: ASSCH4_A) -> Self {
228 variant as u8 != 0
229 }
230}
231#[doc = "Field `ASSCH4` reader - Assignment for Channel 4"]
232pub type ASSCH4_R = crate::BitReader<ASSCH4_A>;
233impl ASSCH4_R {
234 #[doc = "Get enumerated values variant"]
235 #[inline(always)]
236 pub const fn variant(&self) -> ASSCH4_A {
237 match self.bits {
238 false => ASSCH4_A::VALUE1,
239 true => ASSCH4_A::VALUE2,
240 }
241 }
242 #[doc = "Channel y can be a background channel converted with lowest priority"]
243 #[inline(always)]
244 pub fn is_value1(&self) -> bool {
245 *self == ASSCH4_A::VALUE1
246 }
247 #[doc = "Channel y is a priority channel within group x"]
248 #[inline(always)]
249 pub fn is_value2(&self) -> bool {
250 *self == ASSCH4_A::VALUE2
251 }
252}
253#[doc = "Field `ASSCH4` writer - Assignment for Channel 4"]
254pub type ASSCH4_W<'a, REG> = crate::BitWriter<'a, REG, ASSCH4_A>;
255impl<'a, REG> ASSCH4_W<'a, REG>
256where
257 REG: crate::Writable + crate::RegisterSpec,
258{
259 #[doc = "Channel y can be a background channel converted with lowest priority"]
260 #[inline(always)]
261 pub fn value1(self) -> &'a mut crate::W<REG> {
262 self.variant(ASSCH4_A::VALUE1)
263 }
264 #[doc = "Channel y is a priority channel within group x"]
265 #[inline(always)]
266 pub fn value2(self) -> &'a mut crate::W<REG> {
267 self.variant(ASSCH4_A::VALUE2)
268 }
269}
270#[doc = "Assignment for Channel 5\n\nValue on reset: 0"]
271#[derive(Clone, Copy, Debug, PartialEq, Eq)]
272pub enum ASSCH5_A {
273 #[doc = "0: Channel y can be a background channel converted with lowest priority"]
274 VALUE1 = 0,
275 #[doc = "1: Channel y is a priority channel within group x"]
276 VALUE2 = 1,
277}
278impl From<ASSCH5_A> for bool {
279 #[inline(always)]
280 fn from(variant: ASSCH5_A) -> Self {
281 variant as u8 != 0
282 }
283}
284#[doc = "Field `ASSCH5` reader - Assignment for Channel 5"]
285pub type ASSCH5_R = crate::BitReader<ASSCH5_A>;
286impl ASSCH5_R {
287 #[doc = "Get enumerated values variant"]
288 #[inline(always)]
289 pub const fn variant(&self) -> ASSCH5_A {
290 match self.bits {
291 false => ASSCH5_A::VALUE1,
292 true => ASSCH5_A::VALUE2,
293 }
294 }
295 #[doc = "Channel y can be a background channel converted with lowest priority"]
296 #[inline(always)]
297 pub fn is_value1(&self) -> bool {
298 *self == ASSCH5_A::VALUE1
299 }
300 #[doc = "Channel y is a priority channel within group x"]
301 #[inline(always)]
302 pub fn is_value2(&self) -> bool {
303 *self == ASSCH5_A::VALUE2
304 }
305}
306#[doc = "Field `ASSCH5` writer - Assignment for Channel 5"]
307pub type ASSCH5_W<'a, REG> = crate::BitWriter<'a, REG, ASSCH5_A>;
308impl<'a, REG> ASSCH5_W<'a, REG>
309where
310 REG: crate::Writable + crate::RegisterSpec,
311{
312 #[doc = "Channel y can be a background channel converted with lowest priority"]
313 #[inline(always)]
314 pub fn value1(self) -> &'a mut crate::W<REG> {
315 self.variant(ASSCH5_A::VALUE1)
316 }
317 #[doc = "Channel y is a priority channel within group x"]
318 #[inline(always)]
319 pub fn value2(self) -> &'a mut crate::W<REG> {
320 self.variant(ASSCH5_A::VALUE2)
321 }
322}
323#[doc = "Assignment for Channel 6\n\nValue on reset: 0"]
324#[derive(Clone, Copy, Debug, PartialEq, Eq)]
325pub enum ASSCH6_A {
326 #[doc = "0: Channel y can be a background channel converted with lowest priority"]
327 VALUE1 = 0,
328 #[doc = "1: Channel y is a priority channel within group x"]
329 VALUE2 = 1,
330}
331impl From<ASSCH6_A> for bool {
332 #[inline(always)]
333 fn from(variant: ASSCH6_A) -> Self {
334 variant as u8 != 0
335 }
336}
337#[doc = "Field `ASSCH6` reader - Assignment for Channel 6"]
338pub type ASSCH6_R = crate::BitReader<ASSCH6_A>;
339impl ASSCH6_R {
340 #[doc = "Get enumerated values variant"]
341 #[inline(always)]
342 pub const fn variant(&self) -> ASSCH6_A {
343 match self.bits {
344 false => ASSCH6_A::VALUE1,
345 true => ASSCH6_A::VALUE2,
346 }
347 }
348 #[doc = "Channel y can be a background channel converted with lowest priority"]
349 #[inline(always)]
350 pub fn is_value1(&self) -> bool {
351 *self == ASSCH6_A::VALUE1
352 }
353 #[doc = "Channel y is a priority channel within group x"]
354 #[inline(always)]
355 pub fn is_value2(&self) -> bool {
356 *self == ASSCH6_A::VALUE2
357 }
358}
359#[doc = "Field `ASSCH6` writer - Assignment for Channel 6"]
360pub type ASSCH6_W<'a, REG> = crate::BitWriter<'a, REG, ASSCH6_A>;
361impl<'a, REG> ASSCH6_W<'a, REG>
362where
363 REG: crate::Writable + crate::RegisterSpec,
364{
365 #[doc = "Channel y can be a background channel converted with lowest priority"]
366 #[inline(always)]
367 pub fn value1(self) -> &'a mut crate::W<REG> {
368 self.variant(ASSCH6_A::VALUE1)
369 }
370 #[doc = "Channel y is a priority channel within group x"]
371 #[inline(always)]
372 pub fn value2(self) -> &'a mut crate::W<REG> {
373 self.variant(ASSCH6_A::VALUE2)
374 }
375}
376#[doc = "Assignment for Channel 7\n\nValue on reset: 0"]
377#[derive(Clone, Copy, Debug, PartialEq, Eq)]
378pub enum ASSCH7_A {
379 #[doc = "0: Channel y can be a background channel converted with lowest priority"]
380 VALUE1 = 0,
381 #[doc = "1: Channel y is a priority channel within group x"]
382 VALUE2 = 1,
383}
384impl From<ASSCH7_A> for bool {
385 #[inline(always)]
386 fn from(variant: ASSCH7_A) -> Self {
387 variant as u8 != 0
388 }
389}
390#[doc = "Field `ASSCH7` reader - Assignment for Channel 7"]
391pub type ASSCH7_R = crate::BitReader<ASSCH7_A>;
392impl ASSCH7_R {
393 #[doc = "Get enumerated values variant"]
394 #[inline(always)]
395 pub const fn variant(&self) -> ASSCH7_A {
396 match self.bits {
397 false => ASSCH7_A::VALUE1,
398 true => ASSCH7_A::VALUE2,
399 }
400 }
401 #[doc = "Channel y can be a background channel converted with lowest priority"]
402 #[inline(always)]
403 pub fn is_value1(&self) -> bool {
404 *self == ASSCH7_A::VALUE1
405 }
406 #[doc = "Channel y is a priority channel within group x"]
407 #[inline(always)]
408 pub fn is_value2(&self) -> bool {
409 *self == ASSCH7_A::VALUE2
410 }
411}
412#[doc = "Field `ASSCH7` writer - Assignment for Channel 7"]
413pub type ASSCH7_W<'a, REG> = crate::BitWriter<'a, REG, ASSCH7_A>;
414impl<'a, REG> ASSCH7_W<'a, REG>
415where
416 REG: crate::Writable + crate::RegisterSpec,
417{
418 #[doc = "Channel y can be a background channel converted with lowest priority"]
419 #[inline(always)]
420 pub fn value1(self) -> &'a mut crate::W<REG> {
421 self.variant(ASSCH7_A::VALUE1)
422 }
423 #[doc = "Channel y is a priority channel within group x"]
424 #[inline(always)]
425 pub fn value2(self) -> &'a mut crate::W<REG> {
426 self.variant(ASSCH7_A::VALUE2)
427 }
428}
429impl R {
430 #[doc = "Bit 0 - Assignment for Channel 0"]
431 #[inline(always)]
432 pub fn assch0(&self) -> ASSCH0_R {
433 ASSCH0_R::new((self.bits & 1) != 0)
434 }
435 #[doc = "Bit 1 - Assignment for Channel 1"]
436 #[inline(always)]
437 pub fn assch1(&self) -> ASSCH1_R {
438 ASSCH1_R::new(((self.bits >> 1) & 1) != 0)
439 }
440 #[doc = "Bit 2 - Assignment for Channel 2"]
441 #[inline(always)]
442 pub fn assch2(&self) -> ASSCH2_R {
443 ASSCH2_R::new(((self.bits >> 2) & 1) != 0)
444 }
445 #[doc = "Bit 3 - Assignment for Channel 3"]
446 #[inline(always)]
447 pub fn assch3(&self) -> ASSCH3_R {
448 ASSCH3_R::new(((self.bits >> 3) & 1) != 0)
449 }
450 #[doc = "Bit 4 - Assignment for Channel 4"]
451 #[inline(always)]
452 pub fn assch4(&self) -> ASSCH4_R {
453 ASSCH4_R::new(((self.bits >> 4) & 1) != 0)
454 }
455 #[doc = "Bit 5 - Assignment for Channel 5"]
456 #[inline(always)]
457 pub fn assch5(&self) -> ASSCH5_R {
458 ASSCH5_R::new(((self.bits >> 5) & 1) != 0)
459 }
460 #[doc = "Bit 6 - Assignment for Channel 6"]
461 #[inline(always)]
462 pub fn assch6(&self) -> ASSCH6_R {
463 ASSCH6_R::new(((self.bits >> 6) & 1) != 0)
464 }
465 #[doc = "Bit 7 - Assignment for Channel 7"]
466 #[inline(always)]
467 pub fn assch7(&self) -> ASSCH7_R {
468 ASSCH7_R::new(((self.bits >> 7) & 1) != 0)
469 }
470}
471impl W {
472 #[doc = "Bit 0 - Assignment for Channel 0"]
473 #[inline(always)]
474 pub fn assch0(&mut self) -> ASSCH0_W<CHASS_SPEC> {
475 ASSCH0_W::new(self, 0)
476 }
477 #[doc = "Bit 1 - Assignment for Channel 1"]
478 #[inline(always)]
479 pub fn assch1(&mut self) -> ASSCH1_W<CHASS_SPEC> {
480 ASSCH1_W::new(self, 1)
481 }
482 #[doc = "Bit 2 - Assignment for Channel 2"]
483 #[inline(always)]
484 pub fn assch2(&mut self) -> ASSCH2_W<CHASS_SPEC> {
485 ASSCH2_W::new(self, 2)
486 }
487 #[doc = "Bit 3 - Assignment for Channel 3"]
488 #[inline(always)]
489 pub fn assch3(&mut self) -> ASSCH3_W<CHASS_SPEC> {
490 ASSCH3_W::new(self, 3)
491 }
492 #[doc = "Bit 4 - Assignment for Channel 4"]
493 #[inline(always)]
494 pub fn assch4(&mut self) -> ASSCH4_W<CHASS_SPEC> {
495 ASSCH4_W::new(self, 4)
496 }
497 #[doc = "Bit 5 - Assignment for Channel 5"]
498 #[inline(always)]
499 pub fn assch5(&mut self) -> ASSCH5_W<CHASS_SPEC> {
500 ASSCH5_W::new(self, 5)
501 }
502 #[doc = "Bit 6 - Assignment for Channel 6"]
503 #[inline(always)]
504 pub fn assch6(&mut self) -> ASSCH6_W<CHASS_SPEC> {
505 ASSCH6_W::new(self, 6)
506 }
507 #[doc = "Bit 7 - Assignment for Channel 7"]
508 #[inline(always)]
509 pub fn assch7(&mut self) -> ASSCH7_W<CHASS_SPEC> {
510 ASSCH7_W::new(self, 7)
511 }
512}
513#[doc = "Channel Assignment Register\n\nYou can [`read`](crate::Reg::read) this register and get [`chass::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`chass::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
514pub struct CHASS_SPEC;
515impl crate::RegisterSpec for CHASS_SPEC {
516 type Ux = u32;
517}
518#[doc = "`read()` method returns [`chass::R`](R) reader structure"]
519impl crate::Readable for CHASS_SPEC {}
520#[doc = "`write(|w| ..)` method takes [`chass::W`](W) writer structure"]
521impl crate::Writable for CHASS_SPEC {
522 type Safety = crate::Unsafe;
523 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
524 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
525}
526#[doc = "`reset()` method sets CHASS to value 0"]
527impl crate::Resettable for CHASS_SPEC {
528 const RESET_VALUE: u32 = 0;
529}