1#![allow(clippy::identity_op)]
21#![allow(clippy::module_inception)]
22#![allow(clippy::derivable_impls)]
23#[allow(unused_imports)]
24use crate::common::sealed;
25#[allow(unused_imports)]
26use crate::common::*;
27#[doc = r"Event Link Controller"]
28unsafe impl ::core::marker::Send for super::Elc {}
29unsafe impl ::core::marker::Sync for super::Elc {}
30impl super::Elc {
31 #[allow(unused)]
32 #[inline(always)]
33 pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34 self.ptr
35 }
36
37 #[doc = "Event Link Controller Register"]
38 #[inline(always)]
39 pub const fn elcr(&self) -> &'static crate::common::Reg<self::Elcr_SPEC, crate::common::RW> {
40 unsafe {
41 crate::common::Reg::<self::Elcr_SPEC, crate::common::RW>::from_ptr(
42 self._svd2pac_as_ptr().add(0usize),
43 )
44 }
45 }
46
47 #[doc = "Event Link Software Event Generation Register %s"]
48 #[inline(always)]
49 pub const fn elsegr(
50 &self,
51 ) -> &'static crate::common::ClusterRegisterArray<
52 crate::common::Reg<self::Elsegr_SPEC, crate::common::RW>,
53 2,
54 0x2,
55 > {
56 unsafe {
57 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x2usize))
58 }
59 }
60 #[inline(always)]
61 pub const fn elsegr0(
62 &self,
63 ) -> &'static crate::common::Reg<self::Elsegr_SPEC, crate::common::RW> {
64 unsafe {
65 crate::common::Reg::<self::Elsegr_SPEC, crate::common::RW>::from_ptr(
66 self._svd2pac_as_ptr().add(0x2usize),
67 )
68 }
69 }
70 #[inline(always)]
71 pub const fn elsegr1(
72 &self,
73 ) -> &'static crate::common::Reg<self::Elsegr_SPEC, crate::common::RW> {
74 unsafe {
75 crate::common::Reg::<self::Elsegr_SPEC, crate::common::RW>::from_ptr(
76 self._svd2pac_as_ptr().add(0x4usize),
77 )
78 }
79 }
80
81 #[doc = "Event Link Setting Register 12"]
82 #[inline(always)]
83 pub const fn elsr12(
84 &self,
85 ) -> &'static crate::common::Reg<self::Elsr12_SPEC, crate::common::RW> {
86 unsafe {
87 crate::common::Reg::<self::Elsr12_SPEC, crate::common::RW>::from_ptr(
88 self._svd2pac_as_ptr().add(64usize),
89 )
90 }
91 }
92
93 #[doc = "Event Link Setting Register %s"]
94 #[inline(always)]
95 pub const fn elsr(
96 &self,
97 ) -> &'static crate::common::ClusterRegisterArray<
98 crate::common::Reg<self::Elsr_SPEC, crate::common::RW>,
99 4,
100 0x4,
101 > {
102 unsafe {
103 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x48usize))
104 }
105 }
106 #[inline(always)]
107 pub const fn elsr14(&self) -> &'static crate::common::Reg<self::Elsr_SPEC, crate::common::RW> {
108 unsafe {
109 crate::common::Reg::<self::Elsr_SPEC, crate::common::RW>::from_ptr(
110 self._svd2pac_as_ptr().add(0x48usize),
111 )
112 }
113 }
114 #[inline(always)]
115 pub const fn elsr15(&self) -> &'static crate::common::Reg<self::Elsr_SPEC, crate::common::RW> {
116 unsafe {
117 crate::common::Reg::<self::Elsr_SPEC, crate::common::RW>::from_ptr(
118 self._svd2pac_as_ptr().add(0x4cusize),
119 )
120 }
121 }
122 #[inline(always)]
123 pub const fn elsr16(&self) -> &'static crate::common::Reg<self::Elsr_SPEC, crate::common::RW> {
124 unsafe {
125 crate::common::Reg::<self::Elsr_SPEC, crate::common::RW>::from_ptr(
126 self._svd2pac_as_ptr().add(0x50usize),
127 )
128 }
129 }
130 #[inline(always)]
131 pub const fn elsr17(&self) -> &'static crate::common::Reg<self::Elsr_SPEC, crate::common::RW> {
132 unsafe {
133 crate::common::Reg::<self::Elsr_SPEC, crate::common::RW>::from_ptr(
134 self._svd2pac_as_ptr().add(0x54usize),
135 )
136 }
137 }
138
139 #[doc = "Event Link Controller Security Attribution Register A"]
140 #[inline(always)]
141 pub const fn elcsara(
142 &self,
143 ) -> &'static crate::common::Reg<self::Elcsara_SPEC, crate::common::RW> {
144 unsafe {
145 crate::common::Reg::<self::Elcsara_SPEC, crate::common::RW>::from_ptr(
146 self._svd2pac_as_ptr().add(116usize),
147 )
148 }
149 }
150
151 #[doc = "Event Link Controller Security Attribution Register B"]
152 #[inline(always)]
153 pub const fn elcsarb(
154 &self,
155 ) -> &'static crate::common::Reg<self::Elcsarb_SPEC, crate::common::RW> {
156 unsafe {
157 crate::common::Reg::<self::Elcsarb_SPEC, crate::common::RW>::from_ptr(
158 self._svd2pac_as_ptr().add(120usize),
159 )
160 }
161 }
162
163 #[doc = "Event Link Controller Security Attribution Register C"]
164 #[inline(always)]
165 pub const fn elcsarc(
166 &self,
167 ) -> &'static crate::common::Reg<self::Elcsarc_SPEC, crate::common::RW> {
168 unsafe {
169 crate::common::Reg::<self::Elcsarc_SPEC, crate::common::RW>::from_ptr(
170 self._svd2pac_as_ptr().add(124usize),
171 )
172 }
173 }
174}
175#[doc(hidden)]
176#[derive(Copy, Clone, Eq, PartialEq)]
177pub struct Elcr_SPEC;
178impl crate::sealed::RegSpec for Elcr_SPEC {
179 type DataType = u8;
180}
181
182#[doc = "Event Link Controller Register"]
183pub type Elcr = crate::RegValueT<Elcr_SPEC>;
184
185impl Elcr {
186 #[doc = "All Event Link Enable"]
187 #[inline(always)]
188 pub fn elcon(
189 self,
190 ) -> crate::common::RegisterField<
191 7,
192 0x1,
193 1,
194 0,
195 elcr::Elcon,
196 elcr::Elcon,
197 Elcr_SPEC,
198 crate::common::RW,
199 > {
200 crate::common::RegisterField::<
201 7,
202 0x1,
203 1,
204 0,
205 elcr::Elcon,
206 elcr::Elcon,
207 Elcr_SPEC,
208 crate::common::RW,
209 >::from_register(self, 0)
210 }
211}
212impl ::core::default::Default for Elcr {
213 #[inline(always)]
214 fn default() -> Elcr {
215 <crate::RegValueT<Elcr_SPEC> as RegisterValue<_>>::new(0)
216 }
217}
218pub mod elcr {
219
220 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
221 pub struct Elcon_SPEC;
222 pub type Elcon = crate::EnumBitfieldStruct<u8, Elcon_SPEC>;
223 impl Elcon {
224 #[doc = "ELC function is disabled."]
225 pub const _0: Self = Self::new(0);
226
227 #[doc = "ELC function is enabled."]
228 pub const _1: Self = Self::new(1);
229 }
230}
231#[doc(hidden)]
232#[derive(Copy, Clone, Eq, PartialEq)]
233pub struct Elsegr_SPEC;
234impl crate::sealed::RegSpec for Elsegr_SPEC {
235 type DataType = u8;
236}
237
238#[doc = "Event Link Software Event Generation Register %s"]
239pub type Elsegr = crate::RegValueT<Elsegr_SPEC>;
240
241impl Elsegr {
242 #[doc = "Software Event Generation"]
243 #[inline(always)]
244 pub fn seg(
245 self,
246 ) -> crate::common::RegisterField<
247 0,
248 0x1,
249 1,
250 0,
251 elsegr::Seg,
252 elsegr::Seg,
253 Elsegr_SPEC,
254 crate::common::W,
255 > {
256 crate::common::RegisterField::<
257 0,
258 0x1,
259 1,
260 0,
261 elsegr::Seg,
262 elsegr::Seg,
263 Elsegr_SPEC,
264 crate::common::W,
265 >::from_register(self, 0)
266 }
267
268 #[doc = "SEG Bit Write Enable"]
269 #[inline(always)]
270 pub fn we(
271 self,
272 ) -> crate::common::RegisterField<
273 6,
274 0x1,
275 1,
276 0,
277 elsegr::We,
278 elsegr::We,
279 Elsegr_SPEC,
280 crate::common::RW,
281 > {
282 crate::common::RegisterField::<
283 6,
284 0x1,
285 1,
286 0,
287 elsegr::We,
288 elsegr::We,
289 Elsegr_SPEC,
290 crate::common::RW,
291 >::from_register(self, 0)
292 }
293
294 #[doc = "ELSEGR Register Write Disable"]
295 #[inline(always)]
296 pub fn wi(
297 self,
298 ) -> crate::common::RegisterField<
299 7,
300 0x1,
301 1,
302 0,
303 elsegr::Wi,
304 elsegr::Wi,
305 Elsegr_SPEC,
306 crate::common::W,
307 > {
308 crate::common::RegisterField::<
309 7,
310 0x1,
311 1,
312 0,
313 elsegr::Wi,
314 elsegr::Wi,
315 Elsegr_SPEC,
316 crate::common::W,
317 >::from_register(self, 0)
318 }
319}
320impl ::core::default::Default for Elsegr {
321 #[inline(always)]
322 fn default() -> Elsegr {
323 <crate::RegValueT<Elsegr_SPEC> as RegisterValue<_>>::new(128)
324 }
325}
326pub mod elsegr {
327
328 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
329 pub struct Seg_SPEC;
330 pub type Seg = crate::EnumBitfieldStruct<u8, Seg_SPEC>;
331 impl Seg {
332 #[doc = "Normal operation"]
333 pub const _0: Self = Self::new(0);
334
335 #[doc = "Software event is generated."]
336 pub const _1: Self = Self::new(1);
337 }
338 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
339 pub struct We_SPEC;
340 pub type We = crate::EnumBitfieldStruct<u8, We_SPEC>;
341 impl We {
342 #[doc = "Write to SEG bit disabled."]
343 pub const _0: Self = Self::new(0);
344
345 #[doc = "Write to SEG bit enabled."]
346 pub const _1: Self = Self::new(1);
347 }
348 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
349 pub struct Wi_SPEC;
350 pub type Wi = crate::EnumBitfieldStruct<u8, Wi_SPEC>;
351 impl Wi {
352 #[doc = "Write to ELSEGR register enabled."]
353 pub const _0: Self = Self::new(0);
354
355 #[doc = "Write to ELSEGR register disabled."]
356 pub const _1: Self = Self::new(1);
357 }
358}
359#[doc(hidden)]
360#[derive(Copy, Clone, Eq, PartialEq)]
361pub struct Elsr12_SPEC;
362impl crate::sealed::RegSpec for Elsr12_SPEC {
363 type DataType = u16;
364}
365
366#[doc = "Event Link Setting Register 12"]
367pub type Elsr12 = crate::RegValueT<Elsr12_SPEC>;
368
369impl Elsr12 {
370 #[doc = "Event Link Select"]
371 #[inline(always)]
372 pub fn els(
373 self,
374 ) -> crate::common::RegisterField<0, 0x1ff, 1, 0, u16, u16, Elsr12_SPEC, crate::common::RW>
375 {
376 crate::common::RegisterField::<0,0x1ff,1,0,u16,u16,Elsr12_SPEC,crate::common::RW>::from_register(self,0)
377 }
378}
379impl ::core::default::Default for Elsr12 {
380 #[inline(always)]
381 fn default() -> Elsr12 {
382 <crate::RegValueT<Elsr12_SPEC> as RegisterValue<_>>::new(0)
383 }
384}
385
386#[doc(hidden)]
387#[derive(Copy, Clone, Eq, PartialEq)]
388pub struct Elsr_SPEC;
389impl crate::sealed::RegSpec for Elsr_SPEC {
390 type DataType = u16;
391}
392
393#[doc = "Event Link Setting Register %s"]
394pub type Elsr = crate::RegValueT<Elsr_SPEC>;
395
396impl Elsr {
397 #[doc = "Event Link Select"]
398 #[inline(always)]
399 pub fn els(
400 self,
401 ) -> crate::common::RegisterField<0, 0x1ff, 1, 0, u16, u16, Elsr_SPEC, crate::common::RW> {
402 crate::common::RegisterField::<0,0x1ff,1,0,u16,u16,Elsr_SPEC,crate::common::RW>::from_register(self,0)
403 }
404}
405impl ::core::default::Default for Elsr {
406 #[inline(always)]
407 fn default() -> Elsr {
408 <crate::RegValueT<Elsr_SPEC> as RegisterValue<_>>::new(0)
409 }
410}
411
412#[doc(hidden)]
413#[derive(Copy, Clone, Eq, PartialEq)]
414pub struct Elcsara_SPEC;
415impl crate::sealed::RegSpec for Elcsara_SPEC {
416 type DataType = u16;
417}
418
419#[doc = "Event Link Controller Security Attribution Register A"]
420pub type Elcsara = crate::RegValueT<Elcsara_SPEC>;
421
422impl Elcsara {
423 #[doc = "Event Link Controller Register Security Attribution"]
424 #[inline(always)]
425 pub fn elcr(
426 self,
427 ) -> crate::common::RegisterField<
428 0,
429 0x1,
430 1,
431 0,
432 elcsara::Elcr,
433 elcsara::Elcr,
434 Elcsara_SPEC,
435 crate::common::RW,
436 > {
437 crate::common::RegisterField::<
438 0,
439 0x1,
440 1,
441 0,
442 elcsara::Elcr,
443 elcsara::Elcr,
444 Elcsara_SPEC,
445 crate::common::RW,
446 >::from_register(self, 0)
447 }
448
449 #[doc = "Event Link Software Event Generation Register 0 Security Attribution"]
450 #[inline(always)]
451 pub fn elsegr0(
452 self,
453 ) -> crate::common::RegisterField<
454 1,
455 0x1,
456 1,
457 0,
458 elcsara::Elsegr0,
459 elcsara::Elsegr0,
460 Elcsara_SPEC,
461 crate::common::RW,
462 > {
463 crate::common::RegisterField::<
464 1,
465 0x1,
466 1,
467 0,
468 elcsara::Elsegr0,
469 elcsara::Elsegr0,
470 Elcsara_SPEC,
471 crate::common::RW,
472 >::from_register(self, 0)
473 }
474
475 #[doc = "Event Link Software Event Generation Register 1 Security Attribution"]
476 #[inline(always)]
477 pub fn elsegr1(
478 self,
479 ) -> crate::common::RegisterField<
480 2,
481 0x1,
482 1,
483 0,
484 elcsara::Elsegr1,
485 elcsara::Elsegr1,
486 Elcsara_SPEC,
487 crate::common::RW,
488 > {
489 crate::common::RegisterField::<
490 2,
491 0x1,
492 1,
493 0,
494 elcsara::Elsegr1,
495 elcsara::Elsegr1,
496 Elcsara_SPEC,
497 crate::common::RW,
498 >::from_register(self, 0)
499 }
500}
501impl ::core::default::Default for Elcsara {
502 #[inline(always)]
503 fn default() -> Elcsara {
504 <crate::RegValueT<Elcsara_SPEC> as RegisterValue<_>>::new(65535)
505 }
506}
507pub mod elcsara {
508
509 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
510 pub struct Elcr_SPEC;
511 pub type Elcr = crate::EnumBitfieldStruct<u8, Elcr_SPEC>;
512 impl Elcr {
513 #[doc = "Secure"]
514 pub const _0: Self = Self::new(0);
515
516 #[doc = "Non-secure"]
517 pub const _1: Self = Self::new(1);
518 }
519 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
520 pub struct Elsegr0_SPEC;
521 pub type Elsegr0 = crate::EnumBitfieldStruct<u8, Elsegr0_SPEC>;
522 impl Elsegr0 {
523 #[doc = "Secure"]
524 pub const _0: Self = Self::new(0);
525
526 #[doc = "Non-secure"]
527 pub const _1: Self = Self::new(1);
528 }
529 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
530 pub struct Elsegr1_SPEC;
531 pub type Elsegr1 = crate::EnumBitfieldStruct<u8, Elsegr1_SPEC>;
532 impl Elsegr1 {
533 #[doc = "Secure"]
534 pub const _0: Self = Self::new(0);
535
536 #[doc = "Non-secure"]
537 pub const _1: Self = Self::new(1);
538 }
539}
540#[doc(hidden)]
541#[derive(Copy, Clone, Eq, PartialEq)]
542pub struct Elcsarb_SPEC;
543impl crate::sealed::RegSpec for Elcsarb_SPEC {
544 type DataType = u16;
545}
546
547#[doc = "Event Link Controller Security Attribution Register B"]
548pub type Elcsarb = crate::RegValueT<Elcsarb_SPEC>;
549
550impl Elcsarb {
551 #[doc = "Event Link Setting Register n Security Attribution"]
552 #[inline(always)]
553 pub fn elsr(
554 self,
555 ) -> crate::common::RegisterField<
556 0,
557 0xffff,
558 1,
559 0,
560 elcsarb::Elsr,
561 elcsarb::Elsr,
562 Elcsarb_SPEC,
563 crate::common::RW,
564 > {
565 crate::common::RegisterField::<
566 0,
567 0xffff,
568 1,
569 0,
570 elcsarb::Elsr,
571 elcsarb::Elsr,
572 Elcsarb_SPEC,
573 crate::common::RW,
574 >::from_register(self, 0)
575 }
576}
577impl ::core::default::Default for Elcsarb {
578 #[inline(always)]
579 fn default() -> Elcsarb {
580 <crate::RegValueT<Elcsarb_SPEC> as RegisterValue<_>>::new(65535)
581 }
582}
583pub mod elcsarb {
584
585 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
586 pub struct Elsr_SPEC;
587 pub type Elsr = crate::EnumBitfieldStruct<u8, Elsr_SPEC>;
588 impl Elsr {
589 #[doc = "Secure"]
590 pub const _0: Self = Self::new(0);
591
592 #[doc = "Non-secure"]
593 pub const _1: Self = Self::new(1);
594 }
595}
596#[doc(hidden)]
597#[derive(Copy, Clone, Eq, PartialEq)]
598pub struct Elcsarc_SPEC;
599impl crate::sealed::RegSpec for Elcsarc_SPEC {
600 type DataType = u16;
601}
602
603#[doc = "Event Link Controller Security Attribution Register C"]
604pub type Elcsarc = crate::RegValueT<Elcsarc_SPEC>;
605
606impl Elcsarc {
607 #[doc = "Event Link Setting Register n Security Attribution (n = 16, 17)"]
608 #[inline(always)]
609 pub fn elsr(
610 self,
611 ) -> crate::common::RegisterField<
612 0,
613 0x3,
614 1,
615 0,
616 elcsarc::Elsr,
617 elcsarc::Elsr,
618 Elcsarc_SPEC,
619 crate::common::RW,
620 > {
621 crate::common::RegisterField::<
622 0,
623 0x3,
624 1,
625 0,
626 elcsarc::Elsr,
627 elcsarc::Elsr,
628 Elcsarc_SPEC,
629 crate::common::RW,
630 >::from_register(self, 0)
631 }
632}
633impl ::core::default::Default for Elcsarc {
634 #[inline(always)]
635 fn default() -> Elcsarc {
636 <crate::RegValueT<Elcsarc_SPEC> as RegisterValue<_>>::new(65535)
637 }
638}
639pub mod elcsarc {
640
641 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
642 pub struct Elsr_SPEC;
643 pub type Elsr = crate::EnumBitfieldStruct<u8, Elsr_SPEC>;
644 impl Elsr {
645 #[doc = "Secure"]
646 pub const _0: Self = Self::new(0);
647
648 #[doc = "Non-secure"]
649 pub const _1: Self = Self::new(1);
650 }
651}