1#[doc = "Register `CHEN0` reader"]
2pub type R = crate::R<CHEN0_SPEC>;
3#[doc = "Register `CHEN0` writer"]
4pub type W = crate::W<CHEN0_SPEC>;
5#[doc = "Field `CH1_EN` reader - NA"]
6pub type CH1_EN_R = crate::BitReader;
7#[doc = "Field `CH1_EN` writer - NA"]
8pub type CH1_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `CH2_EN` reader - NA"]
10pub type CH2_EN_R = crate::BitReader;
11#[doc = "Field `CH2_EN` writer - NA"]
12pub type CH2_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `CH3_EN` reader - NA"]
14pub type CH3_EN_R = crate::BitReader;
15#[doc = "Field `CH3_EN` writer - NA"]
16pub type CH3_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `CH4_EN` reader - NA"]
18pub type CH4_EN_R = crate::BitReader;
19#[doc = "Field `CH4_EN` writer - NA"]
20pub type CH4_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `CH1_EN_WE` writer - NA"]
22pub type CH1_EN_WE_W<'a, REG> = crate::BitWriter<'a, REG>;
23#[doc = "Field `CH2_EN_WE` writer - NA"]
24pub type CH2_EN_WE_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `CH3_EN_WE` writer - NA"]
26pub type CH3_EN_WE_W<'a, REG> = crate::BitWriter<'a, REG>;
27#[doc = "Field `CH4_EN_WE` writer - NA"]
28pub type CH4_EN_WE_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `CH1_SUSP` reader - NA"]
30pub type CH1_SUSP_R = crate::BitReader;
31#[doc = "Field `CH1_SUSP` writer - NA"]
32pub type CH1_SUSP_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `CH2_SUSP` reader - NA"]
34pub type CH2_SUSP_R = crate::BitReader;
35#[doc = "Field `CH2_SUSP` writer - NA"]
36pub type CH2_SUSP_W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `CH3_SUSP` reader - NA"]
38pub type CH3_SUSP_R = crate::BitReader;
39#[doc = "Field `CH3_SUSP` writer - NA"]
40pub type CH3_SUSP_W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `CH4_SUSP` reader - NA"]
42pub type CH4_SUSP_R = crate::BitReader;
43#[doc = "Field `CH4_SUSP` writer - NA"]
44pub type CH4_SUSP_W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `CH1_SUSP_WE` writer - NA"]
46pub type CH1_SUSP_WE_W<'a, REG> = crate::BitWriter<'a, REG>;
47#[doc = "Field `CH2_SUSP_WE` writer - NA"]
48pub type CH2_SUSP_WE_W<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `CH3_SUSP_WE` writer - NA"]
50pub type CH3_SUSP_WE_W<'a, REG> = crate::BitWriter<'a, REG>;
51#[doc = "Field `CH4_SUSP_WE` writer - NA"]
52pub type CH4_SUSP_WE_W<'a, REG> = crate::BitWriter<'a, REG>;
53impl R {
54 #[doc = "Bit 0 - NA"]
55 #[inline(always)]
56 pub fn ch1_en(&self) -> CH1_EN_R {
57 CH1_EN_R::new((self.bits & 1) != 0)
58 }
59 #[doc = "Bit 1 - NA"]
60 #[inline(always)]
61 pub fn ch2_en(&self) -> CH2_EN_R {
62 CH2_EN_R::new(((self.bits >> 1) & 1) != 0)
63 }
64 #[doc = "Bit 2 - NA"]
65 #[inline(always)]
66 pub fn ch3_en(&self) -> CH3_EN_R {
67 CH3_EN_R::new(((self.bits >> 2) & 1) != 0)
68 }
69 #[doc = "Bit 3 - NA"]
70 #[inline(always)]
71 pub fn ch4_en(&self) -> CH4_EN_R {
72 CH4_EN_R::new(((self.bits >> 3) & 1) != 0)
73 }
74 #[doc = "Bit 16 - NA"]
75 #[inline(always)]
76 pub fn ch1_susp(&self) -> CH1_SUSP_R {
77 CH1_SUSP_R::new(((self.bits >> 16) & 1) != 0)
78 }
79 #[doc = "Bit 17 - NA"]
80 #[inline(always)]
81 pub fn ch2_susp(&self) -> CH2_SUSP_R {
82 CH2_SUSP_R::new(((self.bits >> 17) & 1) != 0)
83 }
84 #[doc = "Bit 18 - NA"]
85 #[inline(always)]
86 pub fn ch3_susp(&self) -> CH3_SUSP_R {
87 CH3_SUSP_R::new(((self.bits >> 18) & 1) != 0)
88 }
89 #[doc = "Bit 19 - NA"]
90 #[inline(always)]
91 pub fn ch4_susp(&self) -> CH4_SUSP_R {
92 CH4_SUSP_R::new(((self.bits >> 19) & 1) != 0)
93 }
94}
95#[cfg(feature = "impl-register-debug")]
96impl core::fmt::Debug for R {
97 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
98 f.debug_struct("CHEN0")
99 .field("ch1_en", &format_args!("{}", self.ch1_en().bit()))
100 .field("ch2_en", &format_args!("{}", self.ch2_en().bit()))
101 .field("ch3_en", &format_args!("{}", self.ch3_en().bit()))
102 .field("ch4_en", &format_args!("{}", self.ch4_en().bit()))
103 .field("ch1_susp", &format_args!("{}", self.ch1_susp().bit()))
104 .field("ch2_susp", &format_args!("{}", self.ch2_susp().bit()))
105 .field("ch3_susp", &format_args!("{}", self.ch3_susp().bit()))
106 .field("ch4_susp", &format_args!("{}", self.ch4_susp().bit()))
107 .finish()
108 }
109}
110#[cfg(feature = "impl-register-debug")]
111impl core::fmt::Debug for crate::generic::Reg<CHEN0_SPEC> {
112 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
113 core::fmt::Debug::fmt(&self.read(), f)
114 }
115}
116impl W {
117 #[doc = "Bit 0 - NA"]
118 #[inline(always)]
119 #[must_use]
120 pub fn ch1_en(&mut self) -> CH1_EN_W<CHEN0_SPEC> {
121 CH1_EN_W::new(self, 0)
122 }
123 #[doc = "Bit 1 - NA"]
124 #[inline(always)]
125 #[must_use]
126 pub fn ch2_en(&mut self) -> CH2_EN_W<CHEN0_SPEC> {
127 CH2_EN_W::new(self, 1)
128 }
129 #[doc = "Bit 2 - NA"]
130 #[inline(always)]
131 #[must_use]
132 pub fn ch3_en(&mut self) -> CH3_EN_W<CHEN0_SPEC> {
133 CH3_EN_W::new(self, 2)
134 }
135 #[doc = "Bit 3 - NA"]
136 #[inline(always)]
137 #[must_use]
138 pub fn ch4_en(&mut self) -> CH4_EN_W<CHEN0_SPEC> {
139 CH4_EN_W::new(self, 3)
140 }
141 #[doc = "Bit 8 - NA"]
142 #[inline(always)]
143 #[must_use]
144 pub fn ch1_en_we(&mut self) -> CH1_EN_WE_W<CHEN0_SPEC> {
145 CH1_EN_WE_W::new(self, 8)
146 }
147 #[doc = "Bit 9 - NA"]
148 #[inline(always)]
149 #[must_use]
150 pub fn ch2_en_we(&mut self) -> CH2_EN_WE_W<CHEN0_SPEC> {
151 CH2_EN_WE_W::new(self, 9)
152 }
153 #[doc = "Bit 10 - NA"]
154 #[inline(always)]
155 #[must_use]
156 pub fn ch3_en_we(&mut self) -> CH3_EN_WE_W<CHEN0_SPEC> {
157 CH3_EN_WE_W::new(self, 10)
158 }
159 #[doc = "Bit 11 - NA"]
160 #[inline(always)]
161 #[must_use]
162 pub fn ch4_en_we(&mut self) -> CH4_EN_WE_W<CHEN0_SPEC> {
163 CH4_EN_WE_W::new(self, 11)
164 }
165 #[doc = "Bit 16 - NA"]
166 #[inline(always)]
167 #[must_use]
168 pub fn ch1_susp(&mut self) -> CH1_SUSP_W<CHEN0_SPEC> {
169 CH1_SUSP_W::new(self, 16)
170 }
171 #[doc = "Bit 17 - NA"]
172 #[inline(always)]
173 #[must_use]
174 pub fn ch2_susp(&mut self) -> CH2_SUSP_W<CHEN0_SPEC> {
175 CH2_SUSP_W::new(self, 17)
176 }
177 #[doc = "Bit 18 - NA"]
178 #[inline(always)]
179 #[must_use]
180 pub fn ch3_susp(&mut self) -> CH3_SUSP_W<CHEN0_SPEC> {
181 CH3_SUSP_W::new(self, 18)
182 }
183 #[doc = "Bit 19 - NA"]
184 #[inline(always)]
185 #[must_use]
186 pub fn ch4_susp(&mut self) -> CH4_SUSP_W<CHEN0_SPEC> {
187 CH4_SUSP_W::new(self, 19)
188 }
189 #[doc = "Bit 24 - NA"]
190 #[inline(always)]
191 #[must_use]
192 pub fn ch1_susp_we(&mut self) -> CH1_SUSP_WE_W<CHEN0_SPEC> {
193 CH1_SUSP_WE_W::new(self, 24)
194 }
195 #[doc = "Bit 25 - NA"]
196 #[inline(always)]
197 #[must_use]
198 pub fn ch2_susp_we(&mut self) -> CH2_SUSP_WE_W<CHEN0_SPEC> {
199 CH2_SUSP_WE_W::new(self, 25)
200 }
201 #[doc = "Bit 26 - NA"]
202 #[inline(always)]
203 #[must_use]
204 pub fn ch3_susp_we(&mut self) -> CH3_SUSP_WE_W<CHEN0_SPEC> {
205 CH3_SUSP_WE_W::new(self, 26)
206 }
207 #[doc = "Bit 27 - NA"]
208 #[inline(always)]
209 #[must_use]
210 pub fn ch4_susp_we(&mut self) -> CH4_SUSP_WE_W<CHEN0_SPEC> {
211 CH4_SUSP_WE_W::new(self, 27)
212 }
213}
214#[doc = "NA\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`chen0::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`chen0::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
215pub struct CHEN0_SPEC;
216impl crate::RegisterSpec for CHEN0_SPEC {
217 type Ux = u32;
218}
219#[doc = "`read()` method returns [`chen0::R`](R) reader structure"]
220impl crate::Readable for CHEN0_SPEC {}
221#[doc = "`write(|w| ..)` method takes [`chen0::W`](W) writer structure"]
222impl crate::Writable for CHEN0_SPEC {
223 type Safety = crate::Unsafe;
224 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
225 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
226}
227#[doc = "`reset()` method sets CHEN0 to value 0"]
228impl crate::Resettable for CHEN0_SPEC {
229 const RESET_VALUE: u32 = 0;
230}