1#[doc = "Register `ADCMPTBSCR` writer"]
2pub struct W(crate::W<ADCMPTBSCR_SPEC>);
3impl core::ops::Deref for W {
4 type Target = crate::W<ADCMPTBSCR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl core::ops::DerefMut for W {
11 #[inline(always)]
12 fn deref_mut(&mut self) -> &mut Self::Target {
13 &mut self.0
14 }
15}
16impl From<crate::W<ADCMPTBSCR_SPEC>> for W {
17 #[inline(always)]
18 fn from(writer: crate::W<ADCMPTBSCR_SPEC>) -> Self {
19 W(writer)
20 }
21}
22#[doc = "Compare Match Table n: Match Flag Clear\n\nValue on reset: 0"]
23#[derive(Clone, Copy, Debug, PartialEq, Eq)]
24pub enum CMPTBC0_AW {
25 #[doc = "0: No effect"]
26 _0 = 0,
27 #[doc = "1: ADCMPTBSR.CMPTBFn is cleared"]
28 _1 = 1,
29}
30impl From<CMPTBC0_AW> for bool {
31 #[inline(always)]
32 fn from(variant: CMPTBC0_AW) -> Self {
33 variant as u8 != 0
34 }
35}
36#[doc = "Field `CMPTBC0` writer - Compare Match Table n: Match Flag Clear"]
37pub type CMPTBC0_W<'a, const O: u8> = crate::BitWriter<'a, u32, ADCMPTBSCR_SPEC, CMPTBC0_AW, O>;
38impl<'a, const O: u8> CMPTBC0_W<'a, O> {
39 #[doc = "No effect"]
40 #[inline(always)]
41 pub fn _0(self) -> &'a mut W {
42 self.variant(CMPTBC0_AW::_0)
43 }
44 #[doc = "ADCMPTBSR.CMPTBFn is cleared"]
45 #[inline(always)]
46 pub fn _1(self) -> &'a mut W {
47 self.variant(CMPTBC0_AW::_1)
48 }
49}
50#[doc = "Compare Match Table n: Match Flag Clear\n\nValue on reset: 0"]
51#[derive(Clone, Copy, Debug, PartialEq, Eq)]
52pub enum CMPTBC1_AW {
53 #[doc = "0: No effect"]
54 _0 = 0,
55 #[doc = "1: ADCMPTBSR.CMPTBFn is cleared"]
56 _1 = 1,
57}
58impl From<CMPTBC1_AW> for bool {
59 #[inline(always)]
60 fn from(variant: CMPTBC1_AW) -> Self {
61 variant as u8 != 0
62 }
63}
64#[doc = "Field `CMPTBC1` writer - Compare Match Table n: Match Flag Clear"]
65pub type CMPTBC1_W<'a, const O: u8> = crate::BitWriter<'a, u32, ADCMPTBSCR_SPEC, CMPTBC1_AW, O>;
66impl<'a, const O: u8> CMPTBC1_W<'a, O> {
67 #[doc = "No effect"]
68 #[inline(always)]
69 pub fn _0(self) -> &'a mut W {
70 self.variant(CMPTBC1_AW::_0)
71 }
72 #[doc = "ADCMPTBSR.CMPTBFn is cleared"]
73 #[inline(always)]
74 pub fn _1(self) -> &'a mut W {
75 self.variant(CMPTBC1_AW::_1)
76 }
77}
78#[doc = "Compare Match Table n: Match Flag Clear\n\nValue on reset: 0"]
79#[derive(Clone, Copy, Debug, PartialEq, Eq)]
80pub enum CMPTBC2_AW {
81 #[doc = "0: No effect"]
82 _0 = 0,
83 #[doc = "1: ADCMPTBSR.CMPTBFn is cleared"]
84 _1 = 1,
85}
86impl From<CMPTBC2_AW> for bool {
87 #[inline(always)]
88 fn from(variant: CMPTBC2_AW) -> Self {
89 variant as u8 != 0
90 }
91}
92#[doc = "Field `CMPTBC2` writer - Compare Match Table n: Match Flag Clear"]
93pub type CMPTBC2_W<'a, const O: u8> = crate::BitWriter<'a, u32, ADCMPTBSCR_SPEC, CMPTBC2_AW, O>;
94impl<'a, const O: u8> CMPTBC2_W<'a, O> {
95 #[doc = "No effect"]
96 #[inline(always)]
97 pub fn _0(self) -> &'a mut W {
98 self.variant(CMPTBC2_AW::_0)
99 }
100 #[doc = "ADCMPTBSR.CMPTBFn is cleared"]
101 #[inline(always)]
102 pub fn _1(self) -> &'a mut W {
103 self.variant(CMPTBC2_AW::_1)
104 }
105}
106#[doc = "Compare Match Table n: Match Flag Clear\n\nValue on reset: 0"]
107#[derive(Clone, Copy, Debug, PartialEq, Eq)]
108pub enum CMPTBC3_AW {
109 #[doc = "0: No effect"]
110 _0 = 0,
111 #[doc = "1: ADCMPTBSR.CMPTBFn is cleared"]
112 _1 = 1,
113}
114impl From<CMPTBC3_AW> for bool {
115 #[inline(always)]
116 fn from(variant: CMPTBC3_AW) -> Self {
117 variant as u8 != 0
118 }
119}
120#[doc = "Field `CMPTBC3` writer - Compare Match Table n: Match Flag Clear"]
121pub type CMPTBC3_W<'a, const O: u8> = crate::BitWriter<'a, u32, ADCMPTBSCR_SPEC, CMPTBC3_AW, O>;
122impl<'a, const O: u8> CMPTBC3_W<'a, O> {
123 #[doc = "No effect"]
124 #[inline(always)]
125 pub fn _0(self) -> &'a mut W {
126 self.variant(CMPTBC3_AW::_0)
127 }
128 #[doc = "ADCMPTBSR.CMPTBFn is cleared"]
129 #[inline(always)]
130 pub fn _1(self) -> &'a mut W {
131 self.variant(CMPTBC3_AW::_1)
132 }
133}
134#[doc = "Compare Match Table n: Match Flag Clear\n\nValue on reset: 0"]
135#[derive(Clone, Copy, Debug, PartialEq, Eq)]
136pub enum CMPTBC4_AW {
137 #[doc = "0: No effect"]
138 _0 = 0,
139 #[doc = "1: ADCMPTBSR.CMPTBFn is cleared"]
140 _1 = 1,
141}
142impl From<CMPTBC4_AW> for bool {
143 #[inline(always)]
144 fn from(variant: CMPTBC4_AW) -> Self {
145 variant as u8 != 0
146 }
147}
148#[doc = "Field `CMPTBC4` writer - Compare Match Table n: Match Flag Clear"]
149pub type CMPTBC4_W<'a, const O: u8> = crate::BitWriter<'a, u32, ADCMPTBSCR_SPEC, CMPTBC4_AW, O>;
150impl<'a, const O: u8> CMPTBC4_W<'a, O> {
151 #[doc = "No effect"]
152 #[inline(always)]
153 pub fn _0(self) -> &'a mut W {
154 self.variant(CMPTBC4_AW::_0)
155 }
156 #[doc = "ADCMPTBSR.CMPTBFn is cleared"]
157 #[inline(always)]
158 pub fn _1(self) -> &'a mut W {
159 self.variant(CMPTBC4_AW::_1)
160 }
161}
162#[doc = "Compare Match Table n: Match Flag Clear\n\nValue on reset: 0"]
163#[derive(Clone, Copy, Debug, PartialEq, Eq)]
164pub enum CMPTBC5_AW {
165 #[doc = "0: No effect"]
166 _0 = 0,
167 #[doc = "1: ADCMPTBSR.CMPTBFn is cleared"]
168 _1 = 1,
169}
170impl From<CMPTBC5_AW> for bool {
171 #[inline(always)]
172 fn from(variant: CMPTBC5_AW) -> Self {
173 variant as u8 != 0
174 }
175}
176#[doc = "Field `CMPTBC5` writer - Compare Match Table n: Match Flag Clear"]
177pub type CMPTBC5_W<'a, const O: u8> = crate::BitWriter<'a, u32, ADCMPTBSCR_SPEC, CMPTBC5_AW, O>;
178impl<'a, const O: u8> CMPTBC5_W<'a, O> {
179 #[doc = "No effect"]
180 #[inline(always)]
181 pub fn _0(self) -> &'a mut W {
182 self.variant(CMPTBC5_AW::_0)
183 }
184 #[doc = "ADCMPTBSR.CMPTBFn is cleared"]
185 #[inline(always)]
186 pub fn _1(self) -> &'a mut W {
187 self.variant(CMPTBC5_AW::_1)
188 }
189}
190#[doc = "Compare Match Table n: Match Flag Clear\n\nValue on reset: 0"]
191#[derive(Clone, Copy, Debug, PartialEq, Eq)]
192pub enum CMPTBC6_AW {
193 #[doc = "0: No effect"]
194 _0 = 0,
195 #[doc = "1: ADCMPTBSR.CMPTBFn is cleared"]
196 _1 = 1,
197}
198impl From<CMPTBC6_AW> for bool {
199 #[inline(always)]
200 fn from(variant: CMPTBC6_AW) -> Self {
201 variant as u8 != 0
202 }
203}
204#[doc = "Field `CMPTBC6` writer - Compare Match Table n: Match Flag Clear"]
205pub type CMPTBC6_W<'a, const O: u8> = crate::BitWriter<'a, u32, ADCMPTBSCR_SPEC, CMPTBC6_AW, O>;
206impl<'a, const O: u8> CMPTBC6_W<'a, O> {
207 #[doc = "No effect"]
208 #[inline(always)]
209 pub fn _0(self) -> &'a mut W {
210 self.variant(CMPTBC6_AW::_0)
211 }
212 #[doc = "ADCMPTBSR.CMPTBFn is cleared"]
213 #[inline(always)]
214 pub fn _1(self) -> &'a mut W {
215 self.variant(CMPTBC6_AW::_1)
216 }
217}
218#[doc = "Compare Match Table n: Match Flag Clear\n\nValue on reset: 0"]
219#[derive(Clone, Copy, Debug, PartialEq, Eq)]
220pub enum CMPTBC7_AW {
221 #[doc = "0: No effect"]
222 _0 = 0,
223 #[doc = "1: ADCMPTBSR.CMPTBFn is cleared"]
224 _1 = 1,
225}
226impl From<CMPTBC7_AW> for bool {
227 #[inline(always)]
228 fn from(variant: CMPTBC7_AW) -> Self {
229 variant as u8 != 0
230 }
231}
232#[doc = "Field `CMPTBC7` writer - Compare Match Table n: Match Flag Clear"]
233pub type CMPTBC7_W<'a, const O: u8> = crate::BitWriter<'a, u32, ADCMPTBSCR_SPEC, CMPTBC7_AW, O>;
234impl<'a, const O: u8> CMPTBC7_W<'a, O> {
235 #[doc = "No effect"]
236 #[inline(always)]
237 pub fn _0(self) -> &'a mut W {
238 self.variant(CMPTBC7_AW::_0)
239 }
240 #[doc = "ADCMPTBSR.CMPTBFn is cleared"]
241 #[inline(always)]
242 pub fn _1(self) -> &'a mut W {
243 self.variant(CMPTBC7_AW::_1)
244 }
245}
246impl W {
247 #[doc = "Bit 0 - Compare Match Table n: Match Flag Clear"]
248 #[inline(always)]
249 #[must_use]
250 pub fn cmptbc0(&mut self) -> CMPTBC0_W<0> {
251 CMPTBC0_W::new(self)
252 }
253 #[doc = "Bit 1 - Compare Match Table n: Match Flag Clear"]
254 #[inline(always)]
255 #[must_use]
256 pub fn cmptbc1(&mut self) -> CMPTBC1_W<1> {
257 CMPTBC1_W::new(self)
258 }
259 #[doc = "Bit 2 - Compare Match Table n: Match Flag Clear"]
260 #[inline(always)]
261 #[must_use]
262 pub fn cmptbc2(&mut self) -> CMPTBC2_W<2> {
263 CMPTBC2_W::new(self)
264 }
265 #[doc = "Bit 3 - Compare Match Table n: Match Flag Clear"]
266 #[inline(always)]
267 #[must_use]
268 pub fn cmptbc3(&mut self) -> CMPTBC3_W<3> {
269 CMPTBC3_W::new(self)
270 }
271 #[doc = "Bit 4 - Compare Match Table n: Match Flag Clear"]
272 #[inline(always)]
273 #[must_use]
274 pub fn cmptbc4(&mut self) -> CMPTBC4_W<4> {
275 CMPTBC4_W::new(self)
276 }
277 #[doc = "Bit 5 - Compare Match Table n: Match Flag Clear"]
278 #[inline(always)]
279 #[must_use]
280 pub fn cmptbc5(&mut self) -> CMPTBC5_W<5> {
281 CMPTBC5_W::new(self)
282 }
283 #[doc = "Bit 6 - Compare Match Table n: Match Flag Clear"]
284 #[inline(always)]
285 #[must_use]
286 pub fn cmptbc6(&mut self) -> CMPTBC6_W<6> {
287 CMPTBC6_W::new(self)
288 }
289 #[doc = "Bit 7 - Compare Match Table n: Match Flag Clear"]
290 #[inline(always)]
291 #[must_use]
292 pub fn cmptbc7(&mut self) -> CMPTBC7_W<7> {
293 CMPTBC7_W::new(self)
294 }
295 #[doc = "Writes raw bits to the register."]
296 #[inline(always)]
297 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
298 self.0.bits(bits);
299 self
300 }
301}
302#[doc = "Compare Match Table Status Clear Register\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [adcmptbscr](index.html) module"]
303pub struct ADCMPTBSCR_SPEC;
304impl crate::RegisterSpec for ADCMPTBSCR_SPEC {
305 type Ux = u32;
306}
307#[doc = "`write(|w| ..)` method takes [adcmptbscr::W](W) writer structure"]
308impl crate::Writable for ADCMPTBSCR_SPEC {
309 type Writer = W;
310 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
311 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
312}
313#[doc = "`reset()` method sets ADCMPTBSCR to value 0"]
314impl crate::Resettable for ADCMPTBSCR_SPEC {
315 const RESET_VALUE: Self::Ux = 0;
316}