1#[doc = "Register `RRCSR` reader"]
2pub type R = crate::R<RrcsrSpec>;
3#[doc = "Register `RRCSR` writer"]
4pub type W = crate::W<RrcsrSpec>;
5#[doc = "Field `RR_CH0OUT` reader - Comparison Result for Channel 0"]
6pub type RrCh0outR = crate::BitReader;
7#[doc = "Field `RR_CH0OUT` writer - Comparison Result for Channel 0"]
8pub type RrCh0outW<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `RR_CH1OUT` reader - Comparison Result for Channel 1"]
10pub type RrCh1outR = crate::BitReader;
11#[doc = "Field `RR_CH1OUT` writer - Comparison Result for Channel 1"]
12pub type RrCh1outW<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `RR_CH2OUT` reader - Comparison Result for Channel 2"]
14pub type RrCh2outR = crate::BitReader;
15#[doc = "Field `RR_CH2OUT` writer - Comparison Result for Channel 2"]
16pub type RrCh2outW<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `RR_CH3OUT` reader - Comparison Result for Channel 3"]
18pub type RrCh3outR = crate::BitReader;
19#[doc = "Field `RR_CH3OUT` writer - Comparison Result for Channel 3"]
20pub type RrCh3outW<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `RR_CH4OUT` reader - Comparison Result for Channel 4"]
22pub type RrCh4outR = crate::BitReader;
23#[doc = "Field `RR_CH4OUT` writer - Comparison Result for Channel 4"]
24pub type RrCh4outW<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `RR_CH5OUT` reader - Comparison Result for Channel 5"]
26pub type RrCh5outR = crate::BitReader;
27#[doc = "Field `RR_CH5OUT` writer - Comparison Result for Channel 5"]
28pub type RrCh5outW<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `RR_CH6OUT` reader - Comparison Result for Channel 6"]
30pub type RrCh6outR = crate::BitReader;
31#[doc = "Field `RR_CH6OUT` writer - Comparison Result for Channel 6"]
32pub type RrCh6outW<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `RR_CH7OUT` reader - Comparison Result for Channel 7"]
34pub type RrCh7outR = crate::BitReader;
35#[doc = "Field `RR_CH7OUT` writer - Comparison Result for Channel 7"]
36pub type RrCh7outW<'a, REG> = crate::BitWriter<'a, REG>;
37impl R {
38 #[doc = "Bit 0 - Comparison Result for Channel 0"]
39 #[inline(always)]
40 pub fn rr_ch0out(&self) -> RrCh0outR {
41 RrCh0outR::new((self.bits & 1) != 0)
42 }
43 #[doc = "Bit 1 - Comparison Result for Channel 1"]
44 #[inline(always)]
45 pub fn rr_ch1out(&self) -> RrCh1outR {
46 RrCh1outR::new(((self.bits >> 1) & 1) != 0)
47 }
48 #[doc = "Bit 2 - Comparison Result for Channel 2"]
49 #[inline(always)]
50 pub fn rr_ch2out(&self) -> RrCh2outR {
51 RrCh2outR::new(((self.bits >> 2) & 1) != 0)
52 }
53 #[doc = "Bit 3 - Comparison Result for Channel 3"]
54 #[inline(always)]
55 pub fn rr_ch3out(&self) -> RrCh3outR {
56 RrCh3outR::new(((self.bits >> 3) & 1) != 0)
57 }
58 #[doc = "Bit 4 - Comparison Result for Channel 4"]
59 #[inline(always)]
60 pub fn rr_ch4out(&self) -> RrCh4outR {
61 RrCh4outR::new(((self.bits >> 4) & 1) != 0)
62 }
63 #[doc = "Bit 5 - Comparison Result for Channel 5"]
64 #[inline(always)]
65 pub fn rr_ch5out(&self) -> RrCh5outR {
66 RrCh5outR::new(((self.bits >> 5) & 1) != 0)
67 }
68 #[doc = "Bit 6 - Comparison Result for Channel 6"]
69 #[inline(always)]
70 pub fn rr_ch6out(&self) -> RrCh6outR {
71 RrCh6outR::new(((self.bits >> 6) & 1) != 0)
72 }
73 #[doc = "Bit 7 - Comparison Result for Channel 7"]
74 #[inline(always)]
75 pub fn rr_ch7out(&self) -> RrCh7outR {
76 RrCh7outR::new(((self.bits >> 7) & 1) != 0)
77 }
78}
79#[cfg(feature = "debug")]
80impl core::fmt::Debug for R {
81 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
82 f.debug_struct("RRCSR")
83 .field("rr_ch0out", &self.rr_ch0out())
84 .field("rr_ch1out", &self.rr_ch1out())
85 .field("rr_ch2out", &self.rr_ch2out())
86 .field("rr_ch3out", &self.rr_ch3out())
87 .field("rr_ch4out", &self.rr_ch4out())
88 .field("rr_ch5out", &self.rr_ch5out())
89 .field("rr_ch6out", &self.rr_ch6out())
90 .field("rr_ch7out", &self.rr_ch7out())
91 .finish()
92 }
93}
94impl W {
95 #[doc = "Bit 0 - Comparison Result for Channel 0"]
96 #[inline(always)]
97 pub fn rr_ch0out(&mut self) -> RrCh0outW<'_, RrcsrSpec> {
98 RrCh0outW::new(self, 0)
99 }
100 #[doc = "Bit 1 - Comparison Result for Channel 1"]
101 #[inline(always)]
102 pub fn rr_ch1out(&mut self) -> RrCh1outW<'_, RrcsrSpec> {
103 RrCh1outW::new(self, 1)
104 }
105 #[doc = "Bit 2 - Comparison Result for Channel 2"]
106 #[inline(always)]
107 pub fn rr_ch2out(&mut self) -> RrCh2outW<'_, RrcsrSpec> {
108 RrCh2outW::new(self, 2)
109 }
110 #[doc = "Bit 3 - Comparison Result for Channel 3"]
111 #[inline(always)]
112 pub fn rr_ch3out(&mut self) -> RrCh3outW<'_, RrcsrSpec> {
113 RrCh3outW::new(self, 3)
114 }
115 #[doc = "Bit 4 - Comparison Result for Channel 4"]
116 #[inline(always)]
117 pub fn rr_ch4out(&mut self) -> RrCh4outW<'_, RrcsrSpec> {
118 RrCh4outW::new(self, 4)
119 }
120 #[doc = "Bit 5 - Comparison Result for Channel 5"]
121 #[inline(always)]
122 pub fn rr_ch5out(&mut self) -> RrCh5outW<'_, RrcsrSpec> {
123 RrCh5outW::new(self, 5)
124 }
125 #[doc = "Bit 6 - Comparison Result for Channel 6"]
126 #[inline(always)]
127 pub fn rr_ch6out(&mut self) -> RrCh6outW<'_, RrcsrSpec> {
128 RrCh6outW::new(self, 6)
129 }
130 #[doc = "Bit 7 - Comparison Result for Channel 7"]
131 #[inline(always)]
132 pub fn rr_ch7out(&mut self) -> RrCh7outW<'_, RrcsrSpec> {
133 RrCh7outW::new(self, 7)
134 }
135}
136#[doc = "Round Robin Control and Status\n\nYou can [`read`](crate::Reg::read) this register and get [`rrcsr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`rrcsr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
137pub struct RrcsrSpec;
138impl crate::RegisterSpec for RrcsrSpec {
139 type Ux = u32;
140}
141#[doc = "`read()` method returns [`rrcsr::R`](R) reader structure"]
142impl crate::Readable for RrcsrSpec {}
143#[doc = "`write(|w| ..)` method takes [`rrcsr::W`](W) writer structure"]
144impl crate::Writable for RrcsrSpec {
145 type Safety = crate::Unsafe;
146}
147#[doc = "`reset()` method sets RRCSR to value 0"]
148impl crate::Resettable for RrcsrSpec {}