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