ra2e2_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.40.00, with svd2pac 0.6.0 on Thu, 24 Jul 2025 04:46:37 +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(hidden)]
80#[derive(Copy, Clone, Eq, PartialEq)]
81pub struct Dtccr_SPEC;
82impl crate::sealed::RegSpec for Dtccr_SPEC {
83    type DataType = u8;
84}
85
86#[doc = "DTC Control Register"]
87pub type Dtccr = crate::RegValueT<Dtccr_SPEC>;
88
89impl Dtccr {
90    #[doc = "DTC Transfer Information Read Skip Enable"]
91    #[inline(always)]
92    pub fn rrs(
93        self,
94    ) -> crate::common::RegisterField<
95        4,
96        0x1,
97        1,
98        0,
99        dtccr::Rrs,
100        dtccr::Rrs,
101        Dtccr_SPEC,
102        crate::common::RW,
103    > {
104        crate::common::RegisterField::<
105            4,
106            0x1,
107            1,
108            0,
109            dtccr::Rrs,
110            dtccr::Rrs,
111            Dtccr_SPEC,
112            crate::common::RW,
113        >::from_register(self, 0)
114    }
115}
116impl ::core::default::Default for Dtccr {
117    #[inline(always)]
118    fn default() -> Dtccr {
119        <crate::RegValueT<Dtccr_SPEC> as RegisterValue<_>>::new(8)
120    }
121}
122pub mod dtccr {
123
124    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
125    pub struct Rrs_SPEC;
126    pub type Rrs = crate::EnumBitfieldStruct<u8, Rrs_SPEC>;
127    impl Rrs {
128        #[doc = "Transfer information read is not skipped"]
129        pub const _0: Self = Self::new(0);
130
131        #[doc = "Transfer information read is skipped when vector numbers match"]
132        pub const _1: Self = Self::new(1);
133    }
134}
135#[doc(hidden)]
136#[derive(Copy, Clone, Eq, PartialEq)]
137pub struct Dtcvbr_SPEC;
138impl crate::sealed::RegSpec for Dtcvbr_SPEC {
139    type DataType = u32;
140}
141
142#[doc = "DTC Vector Base Register"]
143pub type Dtcvbr = crate::RegValueT<Dtcvbr_SPEC>;
144
145impl NoBitfieldReg<Dtcvbr_SPEC> for Dtcvbr {}
146impl ::core::default::Default for Dtcvbr {
147    #[inline(always)]
148    fn default() -> Dtcvbr {
149        <crate::RegValueT<Dtcvbr_SPEC> as RegisterValue<_>>::new(0)
150    }
151}
152
153#[doc(hidden)]
154#[derive(Copy, Clone, Eq, PartialEq)]
155pub struct Dtcst_SPEC;
156impl crate::sealed::RegSpec for Dtcst_SPEC {
157    type DataType = u8;
158}
159
160#[doc = "DTC Module Start Register"]
161pub type Dtcst = crate::RegValueT<Dtcst_SPEC>;
162
163impl Dtcst {
164    #[doc = "DTC Module Start"]
165    #[inline(always)]
166    pub fn dtcst(
167        self,
168    ) -> crate::common::RegisterField<
169        0,
170        0x1,
171        1,
172        0,
173        dtcst::Dtcst,
174        dtcst::Dtcst,
175        Dtcst_SPEC,
176        crate::common::RW,
177    > {
178        crate::common::RegisterField::<
179            0,
180            0x1,
181            1,
182            0,
183            dtcst::Dtcst,
184            dtcst::Dtcst,
185            Dtcst_SPEC,
186            crate::common::RW,
187        >::from_register(self, 0)
188    }
189}
190impl ::core::default::Default for Dtcst {
191    #[inline(always)]
192    fn default() -> Dtcst {
193        <crate::RegValueT<Dtcst_SPEC> as RegisterValue<_>>::new(0)
194    }
195}
196pub mod dtcst {
197
198    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
199    pub struct Dtcst_SPEC;
200    pub type Dtcst = crate::EnumBitfieldStruct<u8, Dtcst_SPEC>;
201    impl Dtcst {
202        #[doc = "DTC module stopped."]
203        pub const _0: Self = Self::new(0);
204
205        #[doc = "DTC module started."]
206        pub const _1: Self = Self::new(1);
207    }
208}
209#[doc(hidden)]
210#[derive(Copy, Clone, Eq, PartialEq)]
211pub struct Dtcsts_SPEC;
212impl crate::sealed::RegSpec for Dtcsts_SPEC {
213    type DataType = u16;
214}
215
216#[doc = "DTC Status Register"]
217pub type Dtcsts = crate::RegValueT<Dtcsts_SPEC>;
218
219impl Dtcsts {
220    #[doc = "DTC-Activating Vector Number Monitoring"]
221    #[inline(always)]
222    pub fn vecn(
223        self,
224    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Dtcsts_SPEC, crate::common::R> {
225        crate::common::RegisterField::<0,0xff,1,0,u8,u8,Dtcsts_SPEC,crate::common::R>::from_register(self,0)
226    }
227
228    #[doc = "DTC Active Flag"]
229    #[inline(always)]
230    pub fn act(
231        self,
232    ) -> crate::common::RegisterField<
233        15,
234        0x1,
235        1,
236        0,
237        dtcsts::Act,
238        dtcsts::Act,
239        Dtcsts_SPEC,
240        crate::common::R,
241    > {
242        crate::common::RegisterField::<
243            15,
244            0x1,
245            1,
246            0,
247            dtcsts::Act,
248            dtcsts::Act,
249            Dtcsts_SPEC,
250            crate::common::R,
251        >::from_register(self, 0)
252    }
253}
254impl ::core::default::Default for Dtcsts {
255    #[inline(always)]
256    fn default() -> Dtcsts {
257        <crate::RegValueT<Dtcsts_SPEC> as RegisterValue<_>>::new(0)
258    }
259}
260pub mod dtcsts {
261
262    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
263    pub struct Act_SPEC;
264    pub type Act = crate::EnumBitfieldStruct<u8, Act_SPEC>;
265    impl Act {
266        #[doc = "DTC transfer operation is not in progress."]
267        pub const _0: Self = Self::new(0);
268
269        #[doc = "DTC transfer operation is in progress."]
270        pub const _1: Self = Self::new(1);
271    }
272}