Skip to main content

ra6m2_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.2, with svd2pac 0.6.1 on Sun, 15 Mar 2026 07:11:44 +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        19,
88        0x4,
89    > {
90        unsafe {
91            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x10usize))
92        }
93    }
94    #[inline(always)]
95    pub const fn elsr0(&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(0x10usize),
99            )
100        }
101    }
102    #[inline(always)]
103    pub const fn elsr1(&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(0x14usize),
107            )
108        }
109    }
110    #[inline(always)]
111    pub const fn elsr2(&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(0x18usize),
115            )
116        }
117    }
118    #[inline(always)]
119    pub const fn elsr3(&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(0x1cusize),
123            )
124        }
125    }
126    #[inline(always)]
127    pub const fn elsr4(&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(0x20usize),
131            )
132        }
133    }
134    #[inline(always)]
135    pub const fn elsr5(&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(0x24usize),
139            )
140        }
141    }
142    #[inline(always)]
143    pub const fn elsr6(&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(0x28usize),
147            )
148        }
149    }
150    #[inline(always)]
151    pub const fn elsr7(&self) -> &'static crate::common::Reg<self::Elsr_SPEC, crate::common::RW> {
152        unsafe {
153            crate::common::Reg::<self::Elsr_SPEC, crate::common::RW>::from_ptr(
154                self._svd2pac_as_ptr().add(0x2cusize),
155            )
156        }
157    }
158    #[inline(always)]
159    pub const fn elsr8(&self) -> &'static crate::common::Reg<self::Elsr_SPEC, crate::common::RW> {
160        unsafe {
161            crate::common::Reg::<self::Elsr_SPEC, crate::common::RW>::from_ptr(
162                self._svd2pac_as_ptr().add(0x30usize),
163            )
164        }
165    }
166    #[inline(always)]
167    pub const fn elsr9(&self) -> &'static crate::common::Reg<self::Elsr_SPEC, crate::common::RW> {
168        unsafe {
169            crate::common::Reg::<self::Elsr_SPEC, crate::common::RW>::from_ptr(
170                self._svd2pac_as_ptr().add(0x34usize),
171            )
172        }
173    }
174    #[inline(always)]
175    pub const fn elsr10(&self) -> &'static crate::common::Reg<self::Elsr_SPEC, crate::common::RW> {
176        unsafe {
177            crate::common::Reg::<self::Elsr_SPEC, crate::common::RW>::from_ptr(
178                self._svd2pac_as_ptr().add(0x38usize),
179            )
180        }
181    }
182    #[inline(always)]
183    pub const fn elsr11(&self) -> &'static crate::common::Reg<self::Elsr_SPEC, crate::common::RW> {
184        unsafe {
185            crate::common::Reg::<self::Elsr_SPEC, crate::common::RW>::from_ptr(
186                self._svd2pac_as_ptr().add(0x3cusize),
187            )
188        }
189    }
190    #[inline(always)]
191    pub const fn elsr12(&self) -> &'static crate::common::Reg<self::Elsr_SPEC, crate::common::RW> {
192        unsafe {
193            crate::common::Reg::<self::Elsr_SPEC, crate::common::RW>::from_ptr(
194                self._svd2pac_as_ptr().add(0x40usize),
195            )
196        }
197    }
198    #[inline(always)]
199    pub const fn elsr13(&self) -> &'static crate::common::Reg<self::Elsr_SPEC, crate::common::RW> {
200        unsafe {
201            crate::common::Reg::<self::Elsr_SPEC, crate::common::RW>::from_ptr(
202                self._svd2pac_as_ptr().add(0x44usize),
203            )
204        }
205    }
206    #[inline(always)]
207    pub const fn elsr14(&self) -> &'static crate::common::Reg<self::Elsr_SPEC, crate::common::RW> {
208        unsafe {
209            crate::common::Reg::<self::Elsr_SPEC, crate::common::RW>::from_ptr(
210                self._svd2pac_as_ptr().add(0x48usize),
211            )
212        }
213    }
214    #[inline(always)]
215    pub const fn elsr15(&self) -> &'static crate::common::Reg<self::Elsr_SPEC, crate::common::RW> {
216        unsafe {
217            crate::common::Reg::<self::Elsr_SPEC, crate::common::RW>::from_ptr(
218                self._svd2pac_as_ptr().add(0x4cusize),
219            )
220        }
221    }
222    #[inline(always)]
223    pub const fn elsr16(&self) -> &'static crate::common::Reg<self::Elsr_SPEC, crate::common::RW> {
224        unsafe {
225            crate::common::Reg::<self::Elsr_SPEC, crate::common::RW>::from_ptr(
226                self._svd2pac_as_ptr().add(0x50usize),
227            )
228        }
229    }
230    #[inline(always)]
231    pub const fn elsr17(&self) -> &'static crate::common::Reg<self::Elsr_SPEC, crate::common::RW> {
232        unsafe {
233            crate::common::Reg::<self::Elsr_SPEC, crate::common::RW>::from_ptr(
234                self._svd2pac_as_ptr().add(0x54usize),
235            )
236        }
237    }
238    #[inline(always)]
239    pub const fn elsr18(&self) -> &'static crate::common::Reg<self::Elsr_SPEC, crate::common::RW> {
240        unsafe {
241            crate::common::Reg::<self::Elsr_SPEC, crate::common::RW>::from_ptr(
242                self._svd2pac_as_ptr().add(0x58usize),
243            )
244        }
245    }
246}
247#[doc(hidden)]
248#[derive(Copy, Clone, Eq, PartialEq)]
249pub struct Elcr_SPEC;
250impl crate::sealed::RegSpec for Elcr_SPEC {
251    type DataType = u8;
252}
253
254#[doc = "Event Link Controller Register"]
255pub type Elcr = crate::RegValueT<Elcr_SPEC>;
256
257impl Elcr {
258    #[doc = "All Event Link Enable"]
259    #[inline(always)]
260    pub fn elcon(
261        self,
262    ) -> crate::common::RegisterField<
263        7,
264        0x1,
265        1,
266        0,
267        elcr::Elcon,
268        elcr::Elcon,
269        Elcr_SPEC,
270        crate::common::RW,
271    > {
272        crate::common::RegisterField::<
273            7,
274            0x1,
275            1,
276            0,
277            elcr::Elcon,
278            elcr::Elcon,
279            Elcr_SPEC,
280            crate::common::RW,
281        >::from_register(self, 0)
282    }
283}
284impl ::core::default::Default for Elcr {
285    #[inline(always)]
286    fn default() -> Elcr {
287        <crate::RegValueT<Elcr_SPEC> as RegisterValue<_>>::new(0)
288    }
289}
290pub mod elcr {
291
292    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
293    pub struct Elcon_SPEC;
294    pub type Elcon = crate::EnumBitfieldStruct<u8, Elcon_SPEC>;
295    impl Elcon {
296        #[doc = "Disable ELC function"]
297        pub const _0: Self = Self::new(0);
298
299        #[doc = "Enable ELC function."]
300        pub const _1: Self = Self::new(1);
301    }
302}
303#[doc(hidden)]
304#[derive(Copy, Clone, Eq, PartialEq)]
305pub struct Elsegr_SPEC;
306impl crate::sealed::RegSpec for Elsegr_SPEC {
307    type DataType = u8;
308}
309
310#[doc = "Event Link Software Event Generation Register %s"]
311pub type Elsegr = crate::RegValueT<Elsegr_SPEC>;
312
313impl Elsegr {
314    #[doc = "ELSEGR Register Write Disable"]
315    #[inline(always)]
316    pub fn wi(
317        self,
318    ) -> crate::common::RegisterField<
319        7,
320        0x1,
321        1,
322        0,
323        elsegr::Wi,
324        elsegr::Wi,
325        Elsegr_SPEC,
326        crate::common::W,
327    > {
328        crate::common::RegisterField::<
329            7,
330            0x1,
331            1,
332            0,
333            elsegr::Wi,
334            elsegr::Wi,
335            Elsegr_SPEC,
336            crate::common::W,
337        >::from_register(self, 0)
338    }
339
340    #[doc = "SEG Bit Write Enable"]
341    #[inline(always)]
342    pub fn we(
343        self,
344    ) -> crate::common::RegisterField<
345        6,
346        0x1,
347        1,
348        0,
349        elsegr::We,
350        elsegr::We,
351        Elsegr_SPEC,
352        crate::common::RW,
353    > {
354        crate::common::RegisterField::<
355            6,
356            0x1,
357            1,
358            0,
359            elsegr::We,
360            elsegr::We,
361            Elsegr_SPEC,
362            crate::common::RW,
363        >::from_register(self, 0)
364    }
365
366    #[doc = "Software Event Generation"]
367    #[inline(always)]
368    pub fn seg(
369        self,
370    ) -> crate::common::RegisterField<
371        0,
372        0x1,
373        1,
374        0,
375        elsegr::Seg,
376        elsegr::Seg,
377        Elsegr_SPEC,
378        crate::common::W,
379    > {
380        crate::common::RegisterField::<
381            0,
382            0x1,
383            1,
384            0,
385            elsegr::Seg,
386            elsegr::Seg,
387            Elsegr_SPEC,
388            crate::common::W,
389        >::from_register(self, 0)
390    }
391}
392impl ::core::default::Default for Elsegr {
393    #[inline(always)]
394    fn default() -> Elsegr {
395        <crate::RegValueT<Elsegr_SPEC> as RegisterValue<_>>::new(128)
396    }
397}
398pub mod elsegr {
399
400    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
401    pub struct Wi_SPEC;
402    pub type Wi = crate::EnumBitfieldStruct<u8, Wi_SPEC>;
403    impl Wi {
404        #[doc = "Enable writes to ELSEGR register"]
405        pub const _0: Self = Self::new(0);
406
407        #[doc = "Disable writes to ELSEGR register."]
408        pub const _1: Self = Self::new(1);
409    }
410    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
411    pub struct We_SPEC;
412    pub type We = crate::EnumBitfieldStruct<u8, We_SPEC>;
413    impl We {
414        #[doc = "Disable writes to SEG bit"]
415        pub const _0: Self = Self::new(0);
416
417        #[doc = "Enable writes to SEG bit"]
418        pub const _1: Self = Self::new(1);
419    }
420    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
421    pub struct Seg_SPEC;
422    pub type Seg = crate::EnumBitfieldStruct<u8, Seg_SPEC>;
423    impl Seg {
424        #[doc = "Normal operation"]
425        pub const _0: Self = Self::new(0);
426
427        #[doc = "Generate a software event"]
428        pub const _1: Self = Self::new(1);
429    }
430}
431#[doc(hidden)]
432#[derive(Copy, Clone, Eq, PartialEq)]
433pub struct Elsr_SPEC;
434impl crate::sealed::RegSpec for Elsr_SPEC {
435    type DataType = u16;
436}
437
438#[doc = "Event Link Setting Register %s"]
439pub type Elsr = crate::RegValueT<Elsr_SPEC>;
440
441impl Elsr {
442    #[doc = "Event Link Select"]
443    #[inline(always)]
444    pub fn els(
445        self,
446    ) -> crate::common::RegisterField<
447        0,
448        0x1ff,
449        1,
450        0,
451        elsr::Els,
452        elsr::Els,
453        Elsr_SPEC,
454        crate::common::RW,
455    > {
456        crate::common::RegisterField::<
457            0,
458            0x1ff,
459            1,
460            0,
461            elsr::Els,
462            elsr::Els,
463            Elsr_SPEC,
464            crate::common::RW,
465        >::from_register(self, 0)
466    }
467}
468impl ::core::default::Default for Elsr {
469    #[inline(always)]
470    fn default() -> Elsr {
471        <crate::RegValueT<Elsr_SPEC> as RegisterValue<_>>::new(0)
472    }
473}
474pub mod elsr {
475
476    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
477    pub struct Els_SPEC;
478    pub type Els = crate::EnumBitfieldStruct<u8, Els_SPEC>;
479    impl Els {
480        #[doc = "Event output to the corresponding peripheral module is disabled."]
481        pub const _0_X_000: Self = Self::new(0);
482    }
483}