atsamd11d/tcc0/
drvctrl.rs
1#[doc = "Register `DRVCTRL` reader"]
2pub type R = crate::R<DrvctrlSpec>;
3#[doc = "Register `DRVCTRL` writer"]
4pub type W = crate::W<DrvctrlSpec>;
5#[doc = "Field `NRE0` reader - Non-Recoverable State 0 Output Enable"]
6pub type Nre0R = crate::BitReader;
7#[doc = "Field `NRE0` writer - Non-Recoverable State 0 Output Enable"]
8pub type Nre0W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `NRE1` reader - Non-Recoverable State 1 Output Enable"]
10pub type Nre1R = crate::BitReader;
11#[doc = "Field `NRE1` writer - Non-Recoverable State 1 Output Enable"]
12pub type Nre1W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `NRE2` reader - Non-Recoverable State 2 Output Enable"]
14pub type Nre2R = crate::BitReader;
15#[doc = "Field `NRE2` writer - Non-Recoverable State 2 Output Enable"]
16pub type Nre2W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `NRE3` reader - Non-Recoverable State 3 Output Enable"]
18pub type Nre3R = crate::BitReader;
19#[doc = "Field `NRE3` writer - Non-Recoverable State 3 Output Enable"]
20pub type Nre3W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `NRE4` reader - Non-Recoverable State 4 Output Enable"]
22pub type Nre4R = crate::BitReader;
23#[doc = "Field `NRE4` writer - Non-Recoverable State 4 Output Enable"]
24pub type Nre4W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `NRE5` reader - Non-Recoverable State 5 Output Enable"]
26pub type Nre5R = crate::BitReader;
27#[doc = "Field `NRE5` writer - Non-Recoverable State 5 Output Enable"]
28pub type Nre5W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `NRE6` reader - Non-Recoverable State 6 Output Enable"]
30pub type Nre6R = crate::BitReader;
31#[doc = "Field `NRE6` writer - Non-Recoverable State 6 Output Enable"]
32pub type Nre6W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `NRE7` reader - Non-Recoverable State 7 Output Enable"]
34pub type Nre7R = crate::BitReader;
35#[doc = "Field `NRE7` writer - Non-Recoverable State 7 Output Enable"]
36pub type Nre7W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `NRV0` reader - Non-Recoverable State 0 Output Value"]
38pub type Nrv0R = crate::BitReader;
39#[doc = "Field `NRV0` writer - Non-Recoverable State 0 Output Value"]
40pub type Nrv0W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `NRV1` reader - Non-Recoverable State 1 Output Value"]
42pub type Nrv1R = crate::BitReader;
43#[doc = "Field `NRV1` writer - Non-Recoverable State 1 Output Value"]
44pub type Nrv1W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `NRV2` reader - Non-Recoverable State 2 Output Value"]
46pub type Nrv2R = crate::BitReader;
47#[doc = "Field `NRV2` writer - Non-Recoverable State 2 Output Value"]
48pub type Nrv2W<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `NRV3` reader - Non-Recoverable State 3 Output Value"]
50pub type Nrv3R = crate::BitReader;
51#[doc = "Field `NRV3` writer - Non-Recoverable State 3 Output Value"]
52pub type Nrv3W<'a, REG> = crate::BitWriter<'a, REG>;
53#[doc = "Field `NRV4` reader - Non-Recoverable State 4 Output Value"]
54pub type Nrv4R = crate::BitReader;
55#[doc = "Field `NRV4` writer - Non-Recoverable State 4 Output Value"]
56pub type Nrv4W<'a, REG> = crate::BitWriter<'a, REG>;
57#[doc = "Field `NRV5` reader - Non-Recoverable State 5 Output Value"]
58pub type Nrv5R = crate::BitReader;
59#[doc = "Field `NRV5` writer - Non-Recoverable State 5 Output Value"]
60pub type Nrv5W<'a, REG> = crate::BitWriter<'a, REG>;
61#[doc = "Field `NRV6` reader - Non-Recoverable State 6 Output Value"]
62pub type Nrv6R = crate::BitReader;
63#[doc = "Field `NRV6` writer - Non-Recoverable State 6 Output Value"]
64pub type Nrv6W<'a, REG> = crate::BitWriter<'a, REG>;
65#[doc = "Field `NRV7` reader - Non-Recoverable State 7 Output Value"]
66pub type Nrv7R = crate::BitReader;
67#[doc = "Field `NRV7` writer - Non-Recoverable State 7 Output Value"]
68pub type Nrv7W<'a, REG> = crate::BitWriter<'a, REG>;
69#[doc = "Field `INVEN0` reader - Output Waveform 0 Inversion"]
70pub type Inven0R = crate::BitReader;
71#[doc = "Field `INVEN0` writer - Output Waveform 0 Inversion"]
72pub type Inven0W<'a, REG> = crate::BitWriter<'a, REG>;
73#[doc = "Field `INVEN1` reader - Output Waveform 1 Inversion"]
74pub type Inven1R = crate::BitReader;
75#[doc = "Field `INVEN1` writer - Output Waveform 1 Inversion"]
76pub type Inven1W<'a, REG> = crate::BitWriter<'a, REG>;
77#[doc = "Field `INVEN2` reader - Output Waveform 2 Inversion"]
78pub type Inven2R = crate::BitReader;
79#[doc = "Field `INVEN2` writer - Output Waveform 2 Inversion"]
80pub type Inven2W<'a, REG> = crate::BitWriter<'a, REG>;
81#[doc = "Field `INVEN3` reader - Output Waveform 3 Inversion"]
82pub type Inven3R = crate::BitReader;
83#[doc = "Field `INVEN3` writer - Output Waveform 3 Inversion"]
84pub type Inven3W<'a, REG> = crate::BitWriter<'a, REG>;
85#[doc = "Field `INVEN4` reader - Output Waveform 4 Inversion"]
86pub type Inven4R = crate::BitReader;
87#[doc = "Field `INVEN4` writer - Output Waveform 4 Inversion"]
88pub type Inven4W<'a, REG> = crate::BitWriter<'a, REG>;
89#[doc = "Field `INVEN5` reader - Output Waveform 5 Inversion"]
90pub type Inven5R = crate::BitReader;
91#[doc = "Field `INVEN5` writer - Output Waveform 5 Inversion"]
92pub type Inven5W<'a, REG> = crate::BitWriter<'a, REG>;
93#[doc = "Field `INVEN6` reader - Output Waveform 6 Inversion"]
94pub type Inven6R = crate::BitReader;
95#[doc = "Field `INVEN6` writer - Output Waveform 6 Inversion"]
96pub type Inven6W<'a, REG> = crate::BitWriter<'a, REG>;
97#[doc = "Field `INVEN7` reader - Output Waveform 7 Inversion"]
98pub type Inven7R = crate::BitReader;
99#[doc = "Field `INVEN7` writer - Output Waveform 7 Inversion"]
100pub type Inven7W<'a, REG> = crate::BitWriter<'a, REG>;
101#[doc = "Field `FILTERVAL0` reader - Non-Recoverable Fault Input 0 Filter Value"]
102pub type Filterval0R = crate::FieldReader;
103#[doc = "Field `FILTERVAL0` writer - Non-Recoverable Fault Input 0 Filter Value"]
104pub type Filterval0W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
105#[doc = "Field `FILTERVAL1` reader - Non-Recoverable Fault Input 1 Filter Value"]
106pub type Filterval1R = crate::FieldReader;
107#[doc = "Field `FILTERVAL1` writer - Non-Recoverable Fault Input 1 Filter Value"]
108pub type Filterval1W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
109impl R {
110 #[doc = "Bit 0 - Non-Recoverable State 0 Output Enable"]
111 #[inline(always)]
112 pub fn nre0(&self) -> Nre0R {
113 Nre0R::new((self.bits & 1) != 0)
114 }
115 #[doc = "Bit 1 - Non-Recoverable State 1 Output Enable"]
116 #[inline(always)]
117 pub fn nre1(&self) -> Nre1R {
118 Nre1R::new(((self.bits >> 1) & 1) != 0)
119 }
120 #[doc = "Bit 2 - Non-Recoverable State 2 Output Enable"]
121 #[inline(always)]
122 pub fn nre2(&self) -> Nre2R {
123 Nre2R::new(((self.bits >> 2) & 1) != 0)
124 }
125 #[doc = "Bit 3 - Non-Recoverable State 3 Output Enable"]
126 #[inline(always)]
127 pub fn nre3(&self) -> Nre3R {
128 Nre3R::new(((self.bits >> 3) & 1) != 0)
129 }
130 #[doc = "Bit 4 - Non-Recoverable State 4 Output Enable"]
131 #[inline(always)]
132 pub fn nre4(&self) -> Nre4R {
133 Nre4R::new(((self.bits >> 4) & 1) != 0)
134 }
135 #[doc = "Bit 5 - Non-Recoverable State 5 Output Enable"]
136 #[inline(always)]
137 pub fn nre5(&self) -> Nre5R {
138 Nre5R::new(((self.bits >> 5) & 1) != 0)
139 }
140 #[doc = "Bit 6 - Non-Recoverable State 6 Output Enable"]
141 #[inline(always)]
142 pub fn nre6(&self) -> Nre6R {
143 Nre6R::new(((self.bits >> 6) & 1) != 0)
144 }
145 #[doc = "Bit 7 - Non-Recoverable State 7 Output Enable"]
146 #[inline(always)]
147 pub fn nre7(&self) -> Nre7R {
148 Nre7R::new(((self.bits >> 7) & 1) != 0)
149 }
150 #[doc = "Bit 8 - Non-Recoverable State 0 Output Value"]
151 #[inline(always)]
152 pub fn nrv0(&self) -> Nrv0R {
153 Nrv0R::new(((self.bits >> 8) & 1) != 0)
154 }
155 #[doc = "Bit 9 - Non-Recoverable State 1 Output Value"]
156 #[inline(always)]
157 pub fn nrv1(&self) -> Nrv1R {
158 Nrv1R::new(((self.bits >> 9) & 1) != 0)
159 }
160 #[doc = "Bit 10 - Non-Recoverable State 2 Output Value"]
161 #[inline(always)]
162 pub fn nrv2(&self) -> Nrv2R {
163 Nrv2R::new(((self.bits >> 10) & 1) != 0)
164 }
165 #[doc = "Bit 11 - Non-Recoverable State 3 Output Value"]
166 #[inline(always)]
167 pub fn nrv3(&self) -> Nrv3R {
168 Nrv3R::new(((self.bits >> 11) & 1) != 0)
169 }
170 #[doc = "Bit 12 - Non-Recoverable State 4 Output Value"]
171 #[inline(always)]
172 pub fn nrv4(&self) -> Nrv4R {
173 Nrv4R::new(((self.bits >> 12) & 1) != 0)
174 }
175 #[doc = "Bit 13 - Non-Recoverable State 5 Output Value"]
176 #[inline(always)]
177 pub fn nrv5(&self) -> Nrv5R {
178 Nrv5R::new(((self.bits >> 13) & 1) != 0)
179 }
180 #[doc = "Bit 14 - Non-Recoverable State 6 Output Value"]
181 #[inline(always)]
182 pub fn nrv6(&self) -> Nrv6R {
183 Nrv6R::new(((self.bits >> 14) & 1) != 0)
184 }
185 #[doc = "Bit 15 - Non-Recoverable State 7 Output Value"]
186 #[inline(always)]
187 pub fn nrv7(&self) -> Nrv7R {
188 Nrv7R::new(((self.bits >> 15) & 1) != 0)
189 }
190 #[doc = "Bit 16 - Output Waveform 0 Inversion"]
191 #[inline(always)]
192 pub fn inven0(&self) -> Inven0R {
193 Inven0R::new(((self.bits >> 16) & 1) != 0)
194 }
195 #[doc = "Bit 17 - Output Waveform 1 Inversion"]
196 #[inline(always)]
197 pub fn inven1(&self) -> Inven1R {
198 Inven1R::new(((self.bits >> 17) & 1) != 0)
199 }
200 #[doc = "Bit 18 - Output Waveform 2 Inversion"]
201 #[inline(always)]
202 pub fn inven2(&self) -> Inven2R {
203 Inven2R::new(((self.bits >> 18) & 1) != 0)
204 }
205 #[doc = "Bit 19 - Output Waveform 3 Inversion"]
206 #[inline(always)]
207 pub fn inven3(&self) -> Inven3R {
208 Inven3R::new(((self.bits >> 19) & 1) != 0)
209 }
210 #[doc = "Bit 20 - Output Waveform 4 Inversion"]
211 #[inline(always)]
212 pub fn inven4(&self) -> Inven4R {
213 Inven4R::new(((self.bits >> 20) & 1) != 0)
214 }
215 #[doc = "Bit 21 - Output Waveform 5 Inversion"]
216 #[inline(always)]
217 pub fn inven5(&self) -> Inven5R {
218 Inven5R::new(((self.bits >> 21) & 1) != 0)
219 }
220 #[doc = "Bit 22 - Output Waveform 6 Inversion"]
221 #[inline(always)]
222 pub fn inven6(&self) -> Inven6R {
223 Inven6R::new(((self.bits >> 22) & 1) != 0)
224 }
225 #[doc = "Bit 23 - Output Waveform 7 Inversion"]
226 #[inline(always)]
227 pub fn inven7(&self) -> Inven7R {
228 Inven7R::new(((self.bits >> 23) & 1) != 0)
229 }
230 #[doc = "Bits 24:27 - Non-Recoverable Fault Input 0 Filter Value"]
231 #[inline(always)]
232 pub fn filterval0(&self) -> Filterval0R {
233 Filterval0R::new(((self.bits >> 24) & 0x0f) as u8)
234 }
235 #[doc = "Bits 28:31 - Non-Recoverable Fault Input 1 Filter Value"]
236 #[inline(always)]
237 pub fn filterval1(&self) -> Filterval1R {
238 Filterval1R::new(((self.bits >> 28) & 0x0f) as u8)
239 }
240}
241impl W {
242 #[doc = "Bit 0 - Non-Recoverable State 0 Output Enable"]
243 #[inline(always)]
244 #[must_use]
245 pub fn nre0(&mut self) -> Nre0W<DrvctrlSpec> {
246 Nre0W::new(self, 0)
247 }
248 #[doc = "Bit 1 - Non-Recoverable State 1 Output Enable"]
249 #[inline(always)]
250 #[must_use]
251 pub fn nre1(&mut self) -> Nre1W<DrvctrlSpec> {
252 Nre1W::new(self, 1)
253 }
254 #[doc = "Bit 2 - Non-Recoverable State 2 Output Enable"]
255 #[inline(always)]
256 #[must_use]
257 pub fn nre2(&mut self) -> Nre2W<DrvctrlSpec> {
258 Nre2W::new(self, 2)
259 }
260 #[doc = "Bit 3 - Non-Recoverable State 3 Output Enable"]
261 #[inline(always)]
262 #[must_use]
263 pub fn nre3(&mut self) -> Nre3W<DrvctrlSpec> {
264 Nre3W::new(self, 3)
265 }
266 #[doc = "Bit 4 - Non-Recoverable State 4 Output Enable"]
267 #[inline(always)]
268 #[must_use]
269 pub fn nre4(&mut self) -> Nre4W<DrvctrlSpec> {
270 Nre4W::new(self, 4)
271 }
272 #[doc = "Bit 5 - Non-Recoverable State 5 Output Enable"]
273 #[inline(always)]
274 #[must_use]
275 pub fn nre5(&mut self) -> Nre5W<DrvctrlSpec> {
276 Nre5W::new(self, 5)
277 }
278 #[doc = "Bit 6 - Non-Recoverable State 6 Output Enable"]
279 #[inline(always)]
280 #[must_use]
281 pub fn nre6(&mut self) -> Nre6W<DrvctrlSpec> {
282 Nre6W::new(self, 6)
283 }
284 #[doc = "Bit 7 - Non-Recoverable State 7 Output Enable"]
285 #[inline(always)]
286 #[must_use]
287 pub fn nre7(&mut self) -> Nre7W<DrvctrlSpec> {
288 Nre7W::new(self, 7)
289 }
290 #[doc = "Bit 8 - Non-Recoverable State 0 Output Value"]
291 #[inline(always)]
292 #[must_use]
293 pub fn nrv0(&mut self) -> Nrv0W<DrvctrlSpec> {
294 Nrv0W::new(self, 8)
295 }
296 #[doc = "Bit 9 - Non-Recoverable State 1 Output Value"]
297 #[inline(always)]
298 #[must_use]
299 pub fn nrv1(&mut self) -> Nrv1W<DrvctrlSpec> {
300 Nrv1W::new(self, 9)
301 }
302 #[doc = "Bit 10 - Non-Recoverable State 2 Output Value"]
303 #[inline(always)]
304 #[must_use]
305 pub fn nrv2(&mut self) -> Nrv2W<DrvctrlSpec> {
306 Nrv2W::new(self, 10)
307 }
308 #[doc = "Bit 11 - Non-Recoverable State 3 Output Value"]
309 #[inline(always)]
310 #[must_use]
311 pub fn nrv3(&mut self) -> Nrv3W<DrvctrlSpec> {
312 Nrv3W::new(self, 11)
313 }
314 #[doc = "Bit 12 - Non-Recoverable State 4 Output Value"]
315 #[inline(always)]
316 #[must_use]
317 pub fn nrv4(&mut self) -> Nrv4W<DrvctrlSpec> {
318 Nrv4W::new(self, 12)
319 }
320 #[doc = "Bit 13 - Non-Recoverable State 5 Output Value"]
321 #[inline(always)]
322 #[must_use]
323 pub fn nrv5(&mut self) -> Nrv5W<DrvctrlSpec> {
324 Nrv5W::new(self, 13)
325 }
326 #[doc = "Bit 14 - Non-Recoverable State 6 Output Value"]
327 #[inline(always)]
328 #[must_use]
329 pub fn nrv6(&mut self) -> Nrv6W<DrvctrlSpec> {
330 Nrv6W::new(self, 14)
331 }
332 #[doc = "Bit 15 - Non-Recoverable State 7 Output Value"]
333 #[inline(always)]
334 #[must_use]
335 pub fn nrv7(&mut self) -> Nrv7W<DrvctrlSpec> {
336 Nrv7W::new(self, 15)
337 }
338 #[doc = "Bit 16 - Output Waveform 0 Inversion"]
339 #[inline(always)]
340 #[must_use]
341 pub fn inven0(&mut self) -> Inven0W<DrvctrlSpec> {
342 Inven0W::new(self, 16)
343 }
344 #[doc = "Bit 17 - Output Waveform 1 Inversion"]
345 #[inline(always)]
346 #[must_use]
347 pub fn inven1(&mut self) -> Inven1W<DrvctrlSpec> {
348 Inven1W::new(self, 17)
349 }
350 #[doc = "Bit 18 - Output Waveform 2 Inversion"]
351 #[inline(always)]
352 #[must_use]
353 pub fn inven2(&mut self) -> Inven2W<DrvctrlSpec> {
354 Inven2W::new(self, 18)
355 }
356 #[doc = "Bit 19 - Output Waveform 3 Inversion"]
357 #[inline(always)]
358 #[must_use]
359 pub fn inven3(&mut self) -> Inven3W<DrvctrlSpec> {
360 Inven3W::new(self, 19)
361 }
362 #[doc = "Bit 20 - Output Waveform 4 Inversion"]
363 #[inline(always)]
364 #[must_use]
365 pub fn inven4(&mut self) -> Inven4W<DrvctrlSpec> {
366 Inven4W::new(self, 20)
367 }
368 #[doc = "Bit 21 - Output Waveform 5 Inversion"]
369 #[inline(always)]
370 #[must_use]
371 pub fn inven5(&mut self) -> Inven5W<DrvctrlSpec> {
372 Inven5W::new(self, 21)
373 }
374 #[doc = "Bit 22 - Output Waveform 6 Inversion"]
375 #[inline(always)]
376 #[must_use]
377 pub fn inven6(&mut self) -> Inven6W<DrvctrlSpec> {
378 Inven6W::new(self, 22)
379 }
380 #[doc = "Bit 23 - Output Waveform 7 Inversion"]
381 #[inline(always)]
382 #[must_use]
383 pub fn inven7(&mut self) -> Inven7W<DrvctrlSpec> {
384 Inven7W::new(self, 23)
385 }
386 #[doc = "Bits 24:27 - Non-Recoverable Fault Input 0 Filter Value"]
387 #[inline(always)]
388 #[must_use]
389 pub fn filterval0(&mut self) -> Filterval0W<DrvctrlSpec> {
390 Filterval0W::new(self, 24)
391 }
392 #[doc = "Bits 28:31 - Non-Recoverable Fault Input 1 Filter Value"]
393 #[inline(always)]
394 #[must_use]
395 pub fn filterval1(&mut self) -> Filterval1W<DrvctrlSpec> {
396 Filterval1W::new(self, 28)
397 }
398}
399#[doc = "Driver Control\n\nYou can [`read`](crate::Reg::read) this register and get [`drvctrl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`drvctrl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
400pub struct DrvctrlSpec;
401impl crate::RegisterSpec for DrvctrlSpec {
402 type Ux = u32;
403}
404#[doc = "`read()` method returns [`drvctrl::R`](R) reader structure"]
405impl crate::Readable for DrvctrlSpec {}
406#[doc = "`write(|w| ..)` method takes [`drvctrl::W`](W) writer structure"]
407impl crate::Writable for DrvctrlSpec {
408 type Safety = crate::Unsafe;
409 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
410 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
411}
412#[doc = "`reset()` method sets DRVCTRL to value 0"]
413impl crate::Resettable for DrvctrlSpec {
414 const RESET_VALUE: u32 = 0;
415}