ra6e1_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.20.00, with svd2pac 0.6.0 on Thu, 24 Jul 2025 04:50:30 +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
37    #[doc = "DTC Control Register"]
38    #[inline(always)]
39    pub const fn dtccr(&self) -> &'static crate::common::Reg<self::Dtccr_SPEC, crate::common::RW> {
40        unsafe {
41            crate::common::Reg::<self::Dtccr_SPEC, crate::common::RW>::from_ptr(
42                self._svd2pac_as_ptr().add(0usize),
43            )
44        }
45    }
46
47    #[doc = "DTC Vector Base Register"]
48    #[inline(always)]
49    pub const fn dtcvbr(
50        &self,
51    ) -> &'static crate::common::Reg<self::Dtcvbr_SPEC, crate::common::RW> {
52        unsafe {
53            crate::common::Reg::<self::Dtcvbr_SPEC, crate::common::RW>::from_ptr(
54                self._svd2pac_as_ptr().add(4usize),
55            )
56        }
57    }
58
59    #[doc = "DTC Module Start Register"]
60    #[inline(always)]
61    pub const fn dtcst(&self) -> &'static crate::common::Reg<self::Dtcst_SPEC, crate::common::RW> {
62        unsafe {
63            crate::common::Reg::<self::Dtcst_SPEC, crate::common::RW>::from_ptr(
64                self._svd2pac_as_ptr().add(12usize),
65            )
66        }
67    }
68
69    #[doc = "DTC Status Register"]
70    #[inline(always)]
71    pub const fn dtcsts(&self) -> &'static crate::common::Reg<self::Dtcsts_SPEC, crate::common::R> {
72        unsafe {
73            crate::common::Reg::<self::Dtcsts_SPEC, crate::common::R>::from_ptr(
74                self._svd2pac_as_ptr().add(14usize),
75            )
76        }
77    }
78
79    #[doc = "DTC Control Register for secure Region"]
80    #[inline(always)]
81    pub const fn dtccr_sec(
82        &self,
83    ) -> &'static crate::common::Reg<self::DtccrSec_SPEC, crate::common::RW> {
84        unsafe {
85            crate::common::Reg::<self::DtccrSec_SPEC, crate::common::RW>::from_ptr(
86                self._svd2pac_as_ptr().add(16usize),
87            )
88        }
89    }
90
91    #[doc = "DTC Vector Base Register for secure Region"]
92    #[inline(always)]
93    pub const fn dtcvbr_sec(
94        &self,
95    ) -> &'static crate::common::Reg<self::DtcvbrSec_SPEC, crate::common::RW> {
96        unsafe {
97            crate::common::Reg::<self::DtcvbrSec_SPEC, crate::common::RW>::from_ptr(
98                self._svd2pac_as_ptr().add(20usize),
99            )
100        }
101    }
102
103    #[doc = "DTC Error Vector Register"]
104    #[inline(always)]
105    pub const fn dtevr(&self) -> &'static crate::common::Reg<self::Dtevr_SPEC, crate::common::RW> {
106        unsafe {
107            crate::common::Reg::<self::Dtevr_SPEC, crate::common::RW>::from_ptr(
108                self._svd2pac_as_ptr().add(32usize),
109            )
110        }
111    }
112}
113#[doc(hidden)]
114#[derive(Copy, Clone, Eq, PartialEq)]
115pub struct Dtccr_SPEC;
116impl crate::sealed::RegSpec for Dtccr_SPEC {
117    type DataType = u8;
118}
119
120#[doc = "DTC Control Register"]
121pub type Dtccr = crate::RegValueT<Dtccr_SPEC>;
122
123impl Dtccr {
124    #[doc = "DTC Transfer Information Read Skip Enable"]
125    #[inline(always)]
126    pub fn rrs(
127        self,
128    ) -> crate::common::RegisterField<
129        4,
130        0x1,
131        1,
132        0,
133        dtccr::Rrs,
134        dtccr::Rrs,
135        Dtccr_SPEC,
136        crate::common::RW,
137    > {
138        crate::common::RegisterField::<
139            4,
140            0x1,
141            1,
142            0,
143            dtccr::Rrs,
144            dtccr::Rrs,
145            Dtccr_SPEC,
146            crate::common::RW,
147        >::from_register(self, 0)
148    }
149}
150impl ::core::default::Default for Dtccr {
151    #[inline(always)]
152    fn default() -> Dtccr {
153        <crate::RegValueT<Dtccr_SPEC> as RegisterValue<_>>::new(8)
154    }
155}
156pub mod dtccr {
157
158    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
159    pub struct Rrs_SPEC;
160    pub type Rrs = crate::EnumBitfieldStruct<u8, Rrs_SPEC>;
161    impl Rrs {
162        #[doc = "Transfer information read is not skipped"]
163        pub const _0: Self = Self::new(0);
164
165        #[doc = "Transfer information read is skipped when vector numbers match"]
166        pub const _1: Self = Self::new(1);
167    }
168}
169#[doc(hidden)]
170#[derive(Copy, Clone, Eq, PartialEq)]
171pub struct Dtcvbr_SPEC;
172impl crate::sealed::RegSpec for Dtcvbr_SPEC {
173    type DataType = u32;
174}
175
176#[doc = "DTC Vector Base Register"]
177pub type Dtcvbr = crate::RegValueT<Dtcvbr_SPEC>;
178
179impl NoBitfieldReg<Dtcvbr_SPEC> for Dtcvbr {}
180impl ::core::default::Default for Dtcvbr {
181    #[inline(always)]
182    fn default() -> Dtcvbr {
183        <crate::RegValueT<Dtcvbr_SPEC> as RegisterValue<_>>::new(0)
184    }
185}
186
187#[doc(hidden)]
188#[derive(Copy, Clone, Eq, PartialEq)]
189pub struct Dtcst_SPEC;
190impl crate::sealed::RegSpec for Dtcst_SPEC {
191    type DataType = u8;
192}
193
194#[doc = "DTC Module Start Register"]
195pub type Dtcst = crate::RegValueT<Dtcst_SPEC>;
196
197impl Dtcst {
198    #[doc = "DTC Module Start"]
199    #[inline(always)]
200    pub fn dtcst(
201        self,
202    ) -> crate::common::RegisterField<
203        0,
204        0x1,
205        1,
206        0,
207        dtcst::Dtcst,
208        dtcst::Dtcst,
209        Dtcst_SPEC,
210        crate::common::RW,
211    > {
212        crate::common::RegisterField::<
213            0,
214            0x1,
215            1,
216            0,
217            dtcst::Dtcst,
218            dtcst::Dtcst,
219            Dtcst_SPEC,
220            crate::common::RW,
221        >::from_register(self, 0)
222    }
223}
224impl ::core::default::Default for Dtcst {
225    #[inline(always)]
226    fn default() -> Dtcst {
227        <crate::RegValueT<Dtcst_SPEC> as RegisterValue<_>>::new(0)
228    }
229}
230pub mod dtcst {
231
232    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
233    pub struct Dtcst_SPEC;
234    pub type Dtcst = crate::EnumBitfieldStruct<u8, Dtcst_SPEC>;
235    impl Dtcst {
236        #[doc = "DTC module stopped."]
237        pub const _0: Self = Self::new(0);
238
239        #[doc = "DTC module started."]
240        pub const _1: Self = Self::new(1);
241    }
242}
243#[doc(hidden)]
244#[derive(Copy, Clone, Eq, PartialEq)]
245pub struct Dtcsts_SPEC;
246impl crate::sealed::RegSpec for Dtcsts_SPEC {
247    type DataType = u16;
248}
249
250#[doc = "DTC Status Register"]
251pub type Dtcsts = crate::RegValueT<Dtcsts_SPEC>;
252
253impl Dtcsts {
254    #[doc = "DTC-Activating Vector Number Monitoring"]
255    #[inline(always)]
256    pub fn vecn(
257        self,
258    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Dtcsts_SPEC, crate::common::R> {
259        crate::common::RegisterField::<0,0xff,1,0,u8,u8,Dtcsts_SPEC,crate::common::R>::from_register(self,0)
260    }
261
262    #[doc = "DTC Active Flag"]
263    #[inline(always)]
264    pub fn act(
265        self,
266    ) -> crate::common::RegisterField<
267        15,
268        0x1,
269        1,
270        0,
271        dtcsts::Act,
272        dtcsts::Act,
273        Dtcsts_SPEC,
274        crate::common::R,
275    > {
276        crate::common::RegisterField::<
277            15,
278            0x1,
279            1,
280            0,
281            dtcsts::Act,
282            dtcsts::Act,
283            Dtcsts_SPEC,
284            crate::common::R,
285        >::from_register(self, 0)
286    }
287}
288impl ::core::default::Default for Dtcsts {
289    #[inline(always)]
290    fn default() -> Dtcsts {
291        <crate::RegValueT<Dtcsts_SPEC> as RegisterValue<_>>::new(0)
292    }
293}
294pub mod dtcsts {
295
296    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
297    pub struct Act_SPEC;
298    pub type Act = crate::EnumBitfieldStruct<u8, Act_SPEC>;
299    impl Act {
300        #[doc = "DTC transfer operation is not in progress."]
301        pub const _0: Self = Self::new(0);
302
303        #[doc = "DTC transfer operation is in progress."]
304        pub const _1: Self = Self::new(1);
305    }
306}
307#[doc(hidden)]
308#[derive(Copy, Clone, Eq, PartialEq)]
309pub struct DtccrSec_SPEC;
310impl crate::sealed::RegSpec for DtccrSec_SPEC {
311    type DataType = u8;
312}
313
314#[doc = "DTC Control Register for secure Region"]
315pub type DtccrSec = crate::RegValueT<DtccrSec_SPEC>;
316
317impl DtccrSec {
318    #[doc = "DTC Transfer Information Read Skip Enable for Secure"]
319    #[inline(always)]
320    pub fn rrs(
321        self,
322    ) -> crate::common::RegisterField<
323        4,
324        0x1,
325        1,
326        0,
327        dtccr_sec::Rrs,
328        dtccr_sec::Rrs,
329        DtccrSec_SPEC,
330        crate::common::RW,
331    > {
332        crate::common::RegisterField::<
333            4,
334            0x1,
335            1,
336            0,
337            dtccr_sec::Rrs,
338            dtccr_sec::Rrs,
339            DtccrSec_SPEC,
340            crate::common::RW,
341        >::from_register(self, 0)
342    }
343}
344impl ::core::default::Default for DtccrSec {
345    #[inline(always)]
346    fn default() -> DtccrSec {
347        <crate::RegValueT<DtccrSec_SPEC> as RegisterValue<_>>::new(8)
348    }
349}
350pub mod dtccr_sec {
351
352    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
353    pub struct Rrs_SPEC;
354    pub type Rrs = crate::EnumBitfieldStruct<u8, Rrs_SPEC>;
355    impl Rrs {
356        #[doc = "Transfer information read is not skipped."]
357        pub const _0: Self = Self::new(0);
358
359        #[doc = "Transfer information read is skipped when vector numbers match."]
360        pub const _1: Self = Self::new(1);
361    }
362}
363#[doc(hidden)]
364#[derive(Copy, Clone, Eq, PartialEq)]
365pub struct DtcvbrSec_SPEC;
366impl crate::sealed::RegSpec for DtcvbrSec_SPEC {
367    type DataType = u32;
368}
369
370#[doc = "DTC Vector Base Register for secure Region"]
371pub type DtcvbrSec = crate::RegValueT<DtcvbrSec_SPEC>;
372
373impl NoBitfieldReg<DtcvbrSec_SPEC> for DtcvbrSec {}
374impl ::core::default::Default for DtcvbrSec {
375    #[inline(always)]
376    fn default() -> DtcvbrSec {
377        <crate::RegValueT<DtcvbrSec_SPEC> as RegisterValue<_>>::new(0)
378    }
379}
380
381#[doc(hidden)]
382#[derive(Copy, Clone, Eq, PartialEq)]
383pub struct Dtevr_SPEC;
384impl crate::sealed::RegSpec for Dtevr_SPEC {
385    type DataType = u32;
386}
387
388#[doc = "DTC Error Vector Register"]
389pub type Dtevr = crate::RegValueT<Dtevr_SPEC>;
390
391impl Dtevr {
392    #[doc = "DTC Error Vector Number"]
393    #[inline(always)]
394    pub fn dtev(
395        self,
396    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Dtevr_SPEC, crate::common::R> {
397        crate::common::RegisterField::<0,0xff,1,0,u8,u8,Dtevr_SPEC,crate::common::R>::from_register(self,0)
398    }
399
400    #[doc = "DTC Error Vector Number SA Monitor"]
401    #[inline(always)]
402    pub fn dtevsam(
403        self,
404    ) -> crate::common::RegisterField<
405        8,
406        0x1,
407        1,
408        0,
409        dtevr::Dtevsam,
410        dtevr::Dtevsam,
411        Dtevr_SPEC,
412        crate::common::R,
413    > {
414        crate::common::RegisterField::<
415            8,
416            0x1,
417            1,
418            0,
419            dtevr::Dtevsam,
420            dtevr::Dtevsam,
421            Dtevr_SPEC,
422            crate::common::R,
423        >::from_register(self, 0)
424    }
425
426    #[doc = "DTC Error Status Flag"]
427    #[inline(always)]
428    pub fn dtesta(
429        self,
430    ) -> crate::common::RegisterField<
431        16,
432        0x1,
433        1,
434        0,
435        dtevr::Dtesta,
436        dtevr::Dtesta,
437        Dtevr_SPEC,
438        crate::common::RW,
439    > {
440        crate::common::RegisterField::<
441            16,
442            0x1,
443            1,
444            0,
445            dtevr::Dtesta,
446            dtevr::Dtesta,
447            Dtevr_SPEC,
448            crate::common::RW,
449        >::from_register(self, 0)
450    }
451}
452impl ::core::default::Default for Dtevr {
453    #[inline(always)]
454    fn default() -> Dtevr {
455        <crate::RegValueT<Dtevr_SPEC> as RegisterValue<_>>::new(0)
456    }
457}
458pub mod dtevr {
459
460    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
461    pub struct Dtevsam_SPEC;
462    pub type Dtevsam = crate::EnumBitfieldStruct<u8, Dtevsam_SPEC>;
463    impl Dtevsam {
464        #[doc = "Secure vector number"]
465        pub const _0: Self = Self::new(0);
466
467        #[doc = "Non-Secure vector number"]
468        pub const _1: Self = Self::new(1);
469    }
470    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
471    pub struct Dtesta_SPEC;
472    pub type Dtesta = crate::EnumBitfieldStruct<u8, Dtesta_SPEC>;
473    impl Dtesta {
474        #[doc = "No DTC transfer error occurred"]
475        pub const _0: Self = Self::new(0);
476
477        #[doc = "DTC transfer error occurred"]
478        pub const _1: Self = Self::new(1);
479    }
480}