ra4e2_pac/
elc.rs

1/*
2DISCLAIMER
3This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
4No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
5applicable laws, including copyright laws.
6THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
7OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
8NON-INFRINGEMENT.  ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
9LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
10INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
11ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
13of this software. By using this software, you agree to the additional terms and conditions found by accessing the
14following link:
15http://www.renesas.com/disclaimer
16
17*/
18// Generated from SVD 1.30.00, with svd2pac 0.6.0 on Thu, 24 Jul 2025 04:48:35 +0000
19
20#![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        6,
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
143    #[doc = "Event Link Setting Register 23"]
144    #[inline(always)]
145    pub const fn elsr23(
146        &self,
147    ) -> &'static crate::common::Reg<self::Elsr23_SPEC, crate::common::RW> {
148        unsafe {
149            crate::common::Reg::<self::Elsr23_SPEC, crate::common::RW>::from_ptr(
150                self._svd2pac_as_ptr().add(108usize),
151            )
152        }
153    }
154
155    #[doc = "Event Link Controller Security Attribution Register A"]
156    #[inline(always)]
157    pub const fn elcsara(
158        &self,
159    ) -> &'static crate::common::Reg<self::Elcsara_SPEC, crate::common::RW> {
160        unsafe {
161            crate::common::Reg::<self::Elcsara_SPEC, crate::common::RW>::from_ptr(
162                self._svd2pac_as_ptr().add(116usize),
163            )
164        }
165    }
166
167    #[doc = "Event Link Controller Security Attribution Register B"]
168    #[inline(always)]
169    pub const fn elcsarb(
170        &self,
171    ) -> &'static crate::common::Reg<self::Elcsarb_SPEC, crate::common::RW> {
172        unsafe {
173            crate::common::Reg::<self::Elcsarb_SPEC, crate::common::RW>::from_ptr(
174                self._svd2pac_as_ptr().add(120usize),
175            )
176        }
177    }
178
179    #[doc = "Event Link Controller Security Attribution Register C"]
180    #[inline(always)]
181    pub const fn elcsarc(
182        &self,
183    ) -> &'static crate::common::Reg<self::Elcsarc_SPEC, crate::common::RW> {
184        unsafe {
185            crate::common::Reg::<self::Elcsarc_SPEC, crate::common::RW>::from_ptr(
186                self._svd2pac_as_ptr().add(124usize),
187            )
188        }
189    }
190}
191#[doc(hidden)]
192#[derive(Copy, Clone, Eq, PartialEq)]
193pub struct Elcr_SPEC;
194impl crate::sealed::RegSpec for Elcr_SPEC {
195    type DataType = u8;
196}
197
198#[doc = "Event Link Controller Register"]
199pub type Elcr = crate::RegValueT<Elcr_SPEC>;
200
201impl Elcr {
202    #[doc = "All Event Link Enable"]
203    #[inline(always)]
204    pub fn elcon(
205        self,
206    ) -> crate::common::RegisterField<
207        7,
208        0x1,
209        1,
210        0,
211        elcr::Elcon,
212        elcr::Elcon,
213        Elcr_SPEC,
214        crate::common::RW,
215    > {
216        crate::common::RegisterField::<
217            7,
218            0x1,
219            1,
220            0,
221            elcr::Elcon,
222            elcr::Elcon,
223            Elcr_SPEC,
224            crate::common::RW,
225        >::from_register(self, 0)
226    }
227}
228impl ::core::default::Default for Elcr {
229    #[inline(always)]
230    fn default() -> Elcr {
231        <crate::RegValueT<Elcr_SPEC> as RegisterValue<_>>::new(0)
232    }
233}
234pub mod elcr {
235
236    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
237    pub struct Elcon_SPEC;
238    pub type Elcon = crate::EnumBitfieldStruct<u8, Elcon_SPEC>;
239    impl Elcon {
240        #[doc = "ELC function is disabled."]
241        pub const _0: Self = Self::new(0);
242
243        #[doc = "ELC function is enabled."]
244        pub const _1: Self = Self::new(1);
245    }
246}
247#[doc(hidden)]
248#[derive(Copy, Clone, Eq, PartialEq)]
249pub struct Elsegr_SPEC;
250impl crate::sealed::RegSpec for Elsegr_SPEC {
251    type DataType = u8;
252}
253
254#[doc = "Event Link Software Event Generation Register %s"]
255pub type Elsegr = crate::RegValueT<Elsegr_SPEC>;
256
257impl Elsegr {
258    #[doc = "Software Event Generation"]
259    #[inline(always)]
260    pub fn seg(
261        self,
262    ) -> crate::common::RegisterField<
263        0,
264        0x1,
265        1,
266        0,
267        elsegr::Seg,
268        elsegr::Seg,
269        Elsegr_SPEC,
270        crate::common::W,
271    > {
272        crate::common::RegisterField::<
273            0,
274            0x1,
275            1,
276            0,
277            elsegr::Seg,
278            elsegr::Seg,
279            Elsegr_SPEC,
280            crate::common::W,
281        >::from_register(self, 0)
282    }
283
284    #[doc = "SEG Bit Write Enable"]
285    #[inline(always)]
286    pub fn we(
287        self,
288    ) -> crate::common::RegisterField<
289        6,
290        0x1,
291        1,
292        0,
293        elsegr::We,
294        elsegr::We,
295        Elsegr_SPEC,
296        crate::common::RW,
297    > {
298        crate::common::RegisterField::<
299            6,
300            0x1,
301            1,
302            0,
303            elsegr::We,
304            elsegr::We,
305            Elsegr_SPEC,
306            crate::common::RW,
307        >::from_register(self, 0)
308    }
309
310    #[doc = "ELSEGR Register Write Disable"]
311    #[inline(always)]
312    pub fn wi(
313        self,
314    ) -> crate::common::RegisterField<
315        7,
316        0x1,
317        1,
318        0,
319        elsegr::Wi,
320        elsegr::Wi,
321        Elsegr_SPEC,
322        crate::common::W,
323    > {
324        crate::common::RegisterField::<
325            7,
326            0x1,
327            1,
328            0,
329            elsegr::Wi,
330            elsegr::Wi,
331            Elsegr_SPEC,
332            crate::common::W,
333        >::from_register(self, 0)
334    }
335}
336impl ::core::default::Default for Elsegr {
337    #[inline(always)]
338    fn default() -> Elsegr {
339        <crate::RegValueT<Elsegr_SPEC> as RegisterValue<_>>::new(128)
340    }
341}
342pub mod elsegr {
343
344    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
345    pub struct Seg_SPEC;
346    pub type Seg = crate::EnumBitfieldStruct<u8, Seg_SPEC>;
347    impl Seg {
348        #[doc = "Normal operation"]
349        pub const _0: Self = Self::new(0);
350
351        #[doc = "Software event is generated."]
352        pub const _1: Self = Self::new(1);
353    }
354    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
355    pub struct We_SPEC;
356    pub type We = crate::EnumBitfieldStruct<u8, We_SPEC>;
357    impl We {
358        #[doc = "Write to SEG bit disabled."]
359        pub const _0: Self = Self::new(0);
360
361        #[doc = "Write to SEG bit enabled."]
362        pub const _1: Self = Self::new(1);
363    }
364    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
365    pub struct Wi_SPEC;
366    pub type Wi = crate::EnumBitfieldStruct<u8, Wi_SPEC>;
367    impl Wi {
368        #[doc = "Write to ELSEGR register enabled."]
369        pub const _0: Self = Self::new(0);
370
371        #[doc = "Write to ELSEGR register disabled."]
372        pub const _1: Self = Self::new(1);
373    }
374}
375#[doc(hidden)]
376#[derive(Copy, Clone, Eq, PartialEq)]
377pub struct Elsr_SPEC;
378impl crate::sealed::RegSpec for Elsr_SPEC {
379    type DataType = u16;
380}
381
382#[doc = "Event Link Setting Register %s"]
383pub type Elsr = crate::RegValueT<Elsr_SPEC>;
384
385impl Elsr {
386    #[doc = "Event Link Select"]
387    #[inline(always)]
388    pub fn els(
389        self,
390    ) -> crate::common::RegisterField<0, 0x1ff, 1, 0, u16, u16, Elsr_SPEC, crate::common::RW> {
391        crate::common::RegisterField::<0,0x1ff,1,0,u16,u16,Elsr_SPEC,crate::common::RW>::from_register(self,0)
392    }
393}
394impl ::core::default::Default for Elsr {
395    #[inline(always)]
396    fn default() -> Elsr {
397        <crate::RegValueT<Elsr_SPEC> as RegisterValue<_>>::new(0)
398    }
399}
400
401#[doc(hidden)]
402#[derive(Copy, Clone, Eq, PartialEq)]
403pub struct Elsr23_SPEC;
404impl crate::sealed::RegSpec for Elsr23_SPEC {
405    type DataType = u16;
406}
407
408#[doc = "Event Link Setting Register 23"]
409pub type Elsr23 = crate::RegValueT<Elsr23_SPEC>;
410
411impl Elsr23 {
412    #[doc = "Event Link Select"]
413    #[inline(always)]
414    pub fn els(
415        self,
416    ) -> crate::common::RegisterField<0, 0x1ff, 1, 0, u16, u16, Elsr23_SPEC, crate::common::RW>
417    {
418        crate::common::RegisterField::<0,0x1ff,1,0,u16,u16,Elsr23_SPEC,crate::common::RW>::from_register(self,0)
419    }
420}
421impl ::core::default::Default for Elsr23 {
422    #[inline(always)]
423    fn default() -> Elsr23 {
424        <crate::RegValueT<Elsr23_SPEC> as RegisterValue<_>>::new(0)
425    }
426}
427
428#[doc(hidden)]
429#[derive(Copy, Clone, Eq, PartialEq)]
430pub struct Elcsara_SPEC;
431impl crate::sealed::RegSpec for Elcsara_SPEC {
432    type DataType = u16;
433}
434
435#[doc = "Event Link Controller Security Attribution Register A"]
436pub type Elcsara = crate::RegValueT<Elcsara_SPEC>;
437
438impl Elcsara {
439    #[doc = "Event Link Controller Register Security Attribution"]
440    #[inline(always)]
441    pub fn elcr(
442        self,
443    ) -> crate::common::RegisterField<
444        0,
445        0x1,
446        1,
447        0,
448        elcsara::Elcr,
449        elcsara::Elcr,
450        Elcsara_SPEC,
451        crate::common::RW,
452    > {
453        crate::common::RegisterField::<
454            0,
455            0x1,
456            1,
457            0,
458            elcsara::Elcr,
459            elcsara::Elcr,
460            Elcsara_SPEC,
461            crate::common::RW,
462        >::from_register(self, 0)
463    }
464
465    #[doc = "Event Link Software Event Generation Register 0 Security Attribution"]
466    #[inline(always)]
467    pub fn elsegr0(
468        self,
469    ) -> crate::common::RegisterField<
470        1,
471        0x1,
472        1,
473        0,
474        elcsara::Elsegr0,
475        elcsara::Elsegr0,
476        Elcsara_SPEC,
477        crate::common::RW,
478    > {
479        crate::common::RegisterField::<
480            1,
481            0x1,
482            1,
483            0,
484            elcsara::Elsegr0,
485            elcsara::Elsegr0,
486            Elcsara_SPEC,
487            crate::common::RW,
488        >::from_register(self, 0)
489    }
490
491    #[doc = "Event Link Software Event Generation Register 1 Security Attribution"]
492    #[inline(always)]
493    pub fn elsegr1(
494        self,
495    ) -> crate::common::RegisterField<
496        2,
497        0x1,
498        1,
499        0,
500        elcsara::Elsegr1,
501        elcsara::Elsegr1,
502        Elcsara_SPEC,
503        crate::common::RW,
504    > {
505        crate::common::RegisterField::<
506            2,
507            0x1,
508            1,
509            0,
510            elcsara::Elsegr1,
511            elcsara::Elsegr1,
512            Elcsara_SPEC,
513            crate::common::RW,
514        >::from_register(self, 0)
515    }
516}
517impl ::core::default::Default for Elcsara {
518    #[inline(always)]
519    fn default() -> Elcsara {
520        <crate::RegValueT<Elcsara_SPEC> as RegisterValue<_>>::new(65535)
521    }
522}
523pub mod elcsara {
524
525    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
526    pub struct Elcr_SPEC;
527    pub type Elcr = crate::EnumBitfieldStruct<u8, Elcr_SPEC>;
528    impl Elcr {
529        #[doc = "Secure"]
530        pub const _0: Self = Self::new(0);
531
532        #[doc = "Non-secure"]
533        pub const _1: Self = Self::new(1);
534    }
535    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
536    pub struct Elsegr0_SPEC;
537    pub type Elsegr0 = crate::EnumBitfieldStruct<u8, Elsegr0_SPEC>;
538    impl Elsegr0 {
539        #[doc = "Secure"]
540        pub const _0: Self = Self::new(0);
541
542        #[doc = "Non-secure"]
543        pub const _1: Self = Self::new(1);
544    }
545    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
546    pub struct Elsegr1_SPEC;
547    pub type Elsegr1 = crate::EnumBitfieldStruct<u8, Elsegr1_SPEC>;
548    impl Elsegr1 {
549        #[doc = "Secure"]
550        pub const _0: Self = Self::new(0);
551
552        #[doc = "Non-secure"]
553        pub const _1: Self = Self::new(1);
554    }
555}
556#[doc(hidden)]
557#[derive(Copy, Clone, Eq, PartialEq)]
558pub struct Elcsarb_SPEC;
559impl crate::sealed::RegSpec for Elcsarb_SPEC {
560    type DataType = u16;
561}
562
563#[doc = "Event Link Controller Security Attribution Register B"]
564pub type Elcsarb = crate::RegValueT<Elcsarb_SPEC>;
565
566impl Elcsarb {
567    #[doc = "Event Link Setting Register n Security Attribution"]
568    #[inline(always)]
569    pub fn elsr(
570        self,
571    ) -> crate::common::RegisterField<
572        0,
573        0xffff,
574        1,
575        0,
576        elcsarb::Elsr,
577        elcsarb::Elsr,
578        Elcsarb_SPEC,
579        crate::common::RW,
580    > {
581        crate::common::RegisterField::<
582            0,
583            0xffff,
584            1,
585            0,
586            elcsarb::Elsr,
587            elcsarb::Elsr,
588            Elcsarb_SPEC,
589            crate::common::RW,
590        >::from_register(self, 0)
591    }
592}
593impl ::core::default::Default for Elcsarb {
594    #[inline(always)]
595    fn default() -> Elcsarb {
596        <crate::RegValueT<Elcsarb_SPEC> as RegisterValue<_>>::new(65535)
597    }
598}
599pub mod elcsarb {
600
601    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
602    pub struct Elsr_SPEC;
603    pub type Elsr = crate::EnumBitfieldStruct<u8, Elsr_SPEC>;
604    impl Elsr {
605        #[doc = "Secure"]
606        pub const _0: Self = Self::new(0);
607
608        #[doc = "Non-secure"]
609        pub const _1: Self = Self::new(1);
610    }
611}
612#[doc(hidden)]
613#[derive(Copy, Clone, Eq, PartialEq)]
614pub struct Elcsarc_SPEC;
615impl crate::sealed::RegSpec for Elcsarc_SPEC {
616    type DataType = u16;
617}
618
619#[doc = "Event Link Controller Security Attribution Register C"]
620pub type Elcsarc = crate::RegValueT<Elcsarc_SPEC>;
621
622impl Elcsarc {
623    #[doc = "Event Link Setting Register n Security Attribution (n = 16 to 23)"]
624    #[inline(always)]
625    pub fn elsr(
626        self,
627    ) -> crate::common::RegisterField<
628        0,
629        0xff,
630        1,
631        0,
632        elcsarc::Elsr,
633        elcsarc::Elsr,
634        Elcsarc_SPEC,
635        crate::common::RW,
636    > {
637        crate::common::RegisterField::<
638            0,
639            0xff,
640            1,
641            0,
642            elcsarc::Elsr,
643            elcsarc::Elsr,
644            Elcsarc_SPEC,
645            crate::common::RW,
646        >::from_register(self, 0)
647    }
648}
649impl ::core::default::Default for Elcsarc {
650    #[inline(always)]
651    fn default() -> Elcsarc {
652        <crate::RegValueT<Elcsarc_SPEC> as RegisterValue<_>>::new(65535)
653    }
654}
655pub mod elcsarc {
656
657    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
658    pub struct Elsr_SPEC;
659    pub type Elsr = crate::EnumBitfieldStruct<u8, Elsr_SPEC>;
660    impl Elsr {
661        #[doc = "Secure"]
662        pub const _0: Self = Self::new(0);
663
664        #[doc = "Non-secure"]
665        pub const _1: Self = Self::new(1);
666    }
667}