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