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