ra4e2_pac/
dtc.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.4.0 on Sat, 12 Apr 2025 22:15: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"Data Transfer Controller"]
28unsafe impl ::core::marker::Send for super::Dtc {}
29unsafe impl ::core::marker::Sync for super::Dtc {}
30impl super::Dtc {
31    #[allow(unused)]
32    #[inline(always)]
33    pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34        self.ptr
35    }
36    #[doc = "DTC Control Register"]
37    #[inline(always)]
38    pub const fn dtccr(&self) -> &'static crate::common::Reg<self::Dtccr_SPEC, crate::common::RW> {
39        unsafe {
40            crate::common::Reg::<self::Dtccr_SPEC, crate::common::RW>::from_ptr(
41                self._svd2pac_as_ptr().add(0usize),
42            )
43        }
44    }
45
46    #[doc = "DTC Vector Base Register"]
47    #[inline(always)]
48    pub const fn dtcvbr(
49        &self,
50    ) -> &'static crate::common::Reg<self::Dtcvbr_SPEC, crate::common::RW> {
51        unsafe {
52            crate::common::Reg::<self::Dtcvbr_SPEC, crate::common::RW>::from_ptr(
53                self._svd2pac_as_ptr().add(4usize),
54            )
55        }
56    }
57
58    #[doc = "DTC Module Start Register"]
59    #[inline(always)]
60    pub const fn dtcst(&self) -> &'static crate::common::Reg<self::Dtcst_SPEC, crate::common::RW> {
61        unsafe {
62            crate::common::Reg::<self::Dtcst_SPEC, crate::common::RW>::from_ptr(
63                self._svd2pac_as_ptr().add(12usize),
64            )
65        }
66    }
67
68    #[doc = "DTC Status Register"]
69    #[inline(always)]
70    pub const fn dtcsts(&self) -> &'static crate::common::Reg<self::Dtcsts_SPEC, crate::common::R> {
71        unsafe {
72            crate::common::Reg::<self::Dtcsts_SPEC, crate::common::R>::from_ptr(
73                self._svd2pac_as_ptr().add(14usize),
74            )
75        }
76    }
77
78    #[doc = "DTC Control Register for secure Region"]
79    #[inline(always)]
80    pub const fn dtccr_sec(
81        &self,
82    ) -> &'static crate::common::Reg<self::DtccrSec_SPEC, crate::common::RW> {
83        unsafe {
84            crate::common::Reg::<self::DtccrSec_SPEC, crate::common::RW>::from_ptr(
85                self._svd2pac_as_ptr().add(16usize),
86            )
87        }
88    }
89
90    #[doc = "DTC Vector Base Register for secure Region"]
91    #[inline(always)]
92    pub const fn dtcvbr_sec(
93        &self,
94    ) -> &'static crate::common::Reg<self::DtcvbrSec_SPEC, crate::common::RW> {
95        unsafe {
96            crate::common::Reg::<self::DtcvbrSec_SPEC, crate::common::RW>::from_ptr(
97                self._svd2pac_as_ptr().add(20usize),
98            )
99        }
100    }
101
102    #[doc = "DTC Error Vector Register"]
103    #[inline(always)]
104    pub const fn dtevr(&self) -> &'static crate::common::Reg<self::Dtevr_SPEC, crate::common::RW> {
105        unsafe {
106            crate::common::Reg::<self::Dtevr_SPEC, crate::common::RW>::from_ptr(
107                self._svd2pac_as_ptr().add(32usize),
108            )
109        }
110    }
111}
112#[doc(hidden)]
113#[derive(Copy, Clone, Eq, PartialEq)]
114pub struct Dtccr_SPEC;
115impl crate::sealed::RegSpec for Dtccr_SPEC {
116    type DataType = u8;
117}
118#[doc = "DTC Control Register"]
119pub type Dtccr = crate::RegValueT<Dtccr_SPEC>;
120
121impl Dtccr {
122    #[doc = "DTC Transfer Information Read Skip Enable"]
123    #[inline(always)]
124    pub fn rrs(
125        self,
126    ) -> crate::common::RegisterField<4, 0x1, 1, 0, dtccr::Rrs, Dtccr_SPEC, crate::common::RW> {
127        crate::common::RegisterField::<4,0x1,1,0,dtccr::Rrs, Dtccr_SPEC,crate::common::RW>::from_register(self,0)
128    }
129}
130impl ::core::default::Default for Dtccr {
131    #[inline(always)]
132    fn default() -> Dtccr {
133        <crate::RegValueT<Dtccr_SPEC> as RegisterValue<_>>::new(8)
134    }
135}
136pub mod dtccr {
137
138    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
139    pub struct Rrs_SPEC;
140    pub type Rrs = crate::EnumBitfieldStruct<u8, Rrs_SPEC>;
141    impl Rrs {
142        #[doc = "Transfer information read is not skipped"]
143        pub const _0: Self = Self::new(0);
144        #[doc = "Transfer information read is skipped when vector numbers match"]
145        pub const _1: Self = Self::new(1);
146    }
147}
148#[doc(hidden)]
149#[derive(Copy, Clone, Eq, PartialEq)]
150pub struct Dtcvbr_SPEC;
151impl crate::sealed::RegSpec for Dtcvbr_SPEC {
152    type DataType = u32;
153}
154#[doc = "DTC Vector Base Register"]
155pub type Dtcvbr = crate::RegValueT<Dtcvbr_SPEC>;
156
157impl NoBitfieldReg<Dtcvbr_SPEC> for Dtcvbr {}
158impl ::core::default::Default for Dtcvbr {
159    #[inline(always)]
160    fn default() -> Dtcvbr {
161        <crate::RegValueT<Dtcvbr_SPEC> as RegisterValue<_>>::new(0)
162    }
163}
164
165#[doc(hidden)]
166#[derive(Copy, Clone, Eq, PartialEq)]
167pub struct Dtcst_SPEC;
168impl crate::sealed::RegSpec for Dtcst_SPEC {
169    type DataType = u8;
170}
171#[doc = "DTC Module Start Register"]
172pub type Dtcst = crate::RegValueT<Dtcst_SPEC>;
173
174impl Dtcst {
175    #[doc = "DTC Module Start"]
176    #[inline(always)]
177    pub fn dtcst(
178        self,
179    ) -> crate::common::RegisterField<0, 0x1, 1, 0, dtcst::Dtcst, Dtcst_SPEC, crate::common::RW>
180    {
181        crate::common::RegisterField::<0,0x1,1,0,dtcst::Dtcst, Dtcst_SPEC,crate::common::RW>::from_register(self,0)
182    }
183}
184impl ::core::default::Default for Dtcst {
185    #[inline(always)]
186    fn default() -> Dtcst {
187        <crate::RegValueT<Dtcst_SPEC> as RegisterValue<_>>::new(0)
188    }
189}
190pub mod dtcst {
191
192    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
193    pub struct Dtcst_SPEC;
194    pub type Dtcst = crate::EnumBitfieldStruct<u8, Dtcst_SPEC>;
195    impl Dtcst {
196        #[doc = "DTC module stopped."]
197        pub const _0: Self = Self::new(0);
198        #[doc = "DTC module started."]
199        pub const _1: Self = Self::new(1);
200    }
201}
202#[doc(hidden)]
203#[derive(Copy, Clone, Eq, PartialEq)]
204pub struct Dtcsts_SPEC;
205impl crate::sealed::RegSpec for Dtcsts_SPEC {
206    type DataType = u16;
207}
208#[doc = "DTC Status Register"]
209pub type Dtcsts = crate::RegValueT<Dtcsts_SPEC>;
210
211impl Dtcsts {
212    #[doc = "DTC-Activating Vector Number Monitoring"]
213    #[inline(always)]
214    pub fn vecn(
215        self,
216    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, Dtcsts_SPEC, crate::common::R> {
217        crate::common::RegisterField::<0,0xff,1,0,u8, Dtcsts_SPEC,crate::common::R>::from_register(self,0)
218    }
219    #[doc = "DTC Active Flag"]
220    #[inline(always)]
221    pub fn act(
222        self,
223    ) -> crate::common::RegisterField<15, 0x1, 1, 0, dtcsts::Act, Dtcsts_SPEC, crate::common::R>
224    {
225        crate::common::RegisterField::<15,0x1,1,0,dtcsts::Act, Dtcsts_SPEC,crate::common::R>::from_register(self,0)
226    }
227}
228impl ::core::default::Default for Dtcsts {
229    #[inline(always)]
230    fn default() -> Dtcsts {
231        <crate::RegValueT<Dtcsts_SPEC> as RegisterValue<_>>::new(0)
232    }
233}
234pub mod dtcsts {
235
236    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
237    pub struct Act_SPEC;
238    pub type Act = crate::EnumBitfieldStruct<u8, Act_SPEC>;
239    impl Act {
240        #[doc = "DTC transfer operation is not in progress."]
241        pub const _0: Self = Self::new(0);
242        #[doc = "DTC transfer operation is in progress."]
243        pub const _1: Self = Self::new(1);
244    }
245}
246#[doc(hidden)]
247#[derive(Copy, Clone, Eq, PartialEq)]
248pub struct DtccrSec_SPEC;
249impl crate::sealed::RegSpec for DtccrSec_SPEC {
250    type DataType = u8;
251}
252#[doc = "DTC Control Register for secure Region"]
253pub type DtccrSec = crate::RegValueT<DtccrSec_SPEC>;
254
255impl DtccrSec {
256    #[doc = "DTC Transfer Information Read Skip Enable for Secure"]
257    #[inline(always)]
258    pub fn rrs(
259        self,
260    ) -> crate::common::RegisterField<4, 0x1, 1, 0, dtccr_sec::Rrs, DtccrSec_SPEC, crate::common::RW>
261    {
262        crate::common::RegisterField::<4,0x1,1,0,dtccr_sec::Rrs, DtccrSec_SPEC,crate::common::RW>::from_register(self,0)
263    }
264}
265impl ::core::default::Default for DtccrSec {
266    #[inline(always)]
267    fn default() -> DtccrSec {
268        <crate::RegValueT<DtccrSec_SPEC> as RegisterValue<_>>::new(8)
269    }
270}
271pub mod dtccr_sec {
272
273    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
274    pub struct Rrs_SPEC;
275    pub type Rrs = crate::EnumBitfieldStruct<u8, Rrs_SPEC>;
276    impl Rrs {
277        #[doc = "Transfer information read is not skipped."]
278        pub const _0: Self = Self::new(0);
279        #[doc = "Transfer information read is skipped when vector numbers match."]
280        pub const _1: Self = Self::new(1);
281    }
282}
283#[doc(hidden)]
284#[derive(Copy, Clone, Eq, PartialEq)]
285pub struct DtcvbrSec_SPEC;
286impl crate::sealed::RegSpec for DtcvbrSec_SPEC {
287    type DataType = u32;
288}
289#[doc = "DTC Vector Base Register for secure Region"]
290pub type DtcvbrSec = crate::RegValueT<DtcvbrSec_SPEC>;
291
292impl NoBitfieldReg<DtcvbrSec_SPEC> for DtcvbrSec {}
293impl ::core::default::Default for DtcvbrSec {
294    #[inline(always)]
295    fn default() -> DtcvbrSec {
296        <crate::RegValueT<DtcvbrSec_SPEC> as RegisterValue<_>>::new(0)
297    }
298}
299
300#[doc(hidden)]
301#[derive(Copy, Clone, Eq, PartialEq)]
302pub struct Dtevr_SPEC;
303impl crate::sealed::RegSpec for Dtevr_SPEC {
304    type DataType = u32;
305}
306#[doc = "DTC Error Vector Register"]
307pub type Dtevr = crate::RegValueT<Dtevr_SPEC>;
308
309impl Dtevr {
310    #[doc = "DTC Error Vector Number"]
311    #[inline(always)]
312    pub fn dtev(
313        self,
314    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, Dtevr_SPEC, crate::common::R> {
315        crate::common::RegisterField::<0,0xff,1,0,u8, Dtevr_SPEC,crate::common::R>::from_register(self,0)
316    }
317    #[doc = "DTC Error Vector Number SA Monitor"]
318    #[inline(always)]
319    pub fn dtevsam(
320        self,
321    ) -> crate::common::RegisterField<8, 0x1, 1, 0, dtevr::Dtevsam, Dtevr_SPEC, crate::common::R>
322    {
323        crate::common::RegisterField::<8,0x1,1,0,dtevr::Dtevsam, Dtevr_SPEC,crate::common::R>::from_register(self,0)
324    }
325    #[doc = "DTC Error Status Flag"]
326    #[inline(always)]
327    pub fn dtesta(
328        self,
329    ) -> crate::common::RegisterField<16, 0x1, 1, 0, dtevr::Dtesta, Dtevr_SPEC, crate::common::RW>
330    {
331        crate::common::RegisterField::<16,0x1,1,0,dtevr::Dtesta, Dtevr_SPEC,crate::common::RW>::from_register(self,0)
332    }
333}
334impl ::core::default::Default for Dtevr {
335    #[inline(always)]
336    fn default() -> Dtevr {
337        <crate::RegValueT<Dtevr_SPEC> as RegisterValue<_>>::new(0)
338    }
339}
340pub mod dtevr {
341
342    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
343    pub struct Dtevsam_SPEC;
344    pub type Dtevsam = crate::EnumBitfieldStruct<u8, Dtevsam_SPEC>;
345    impl Dtevsam {
346        #[doc = "Secure vector number"]
347        pub const _0: Self = Self::new(0);
348        #[doc = "Non-Secure vector number"]
349        pub const _1: Self = Self::new(1);
350    }
351    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
352    pub struct Dtesta_SPEC;
353    pub type Dtesta = crate::EnumBitfieldStruct<u8, Dtesta_SPEC>;
354    impl Dtesta {
355        #[doc = "No DTC transfer error occurred"]
356        pub const _0: Self = Self::new(0);
357        #[doc = "DTC transfer error occurred"]
358        pub const _1: Self = Self::new(1);
359    }
360}