Skip to main content

ra6m2_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.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"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 = "Do not skip transfer information read"]
129        pub const _0: Self = Self::new(0);
130
131        #[doc = "Skip transfer information read 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 Dtcvbr {
146    #[doc = "DTC Vector Base Address.Note: A value cannot be set in the lower-order 10 bits. These bits are fixed to 0."]
147    #[inline(always)]
148    pub fn dtcvbr(
149        self,
150    ) -> crate::common::RegisterField<0, 0xffffffff, 1, 0, u32, u32, Dtcvbr_SPEC, crate::common::RW>
151    {
152        crate::common::RegisterField::<0,0xffffffff,1,0,u32,u32,Dtcvbr_SPEC,crate::common::RW>::from_register(self,0)
153    }
154}
155impl ::core::default::Default for Dtcvbr {
156    #[inline(always)]
157    fn default() -> Dtcvbr {
158        <crate::RegValueT<Dtcvbr_SPEC> as RegisterValue<_>>::new(0)
159    }
160}
161
162#[doc(hidden)]
163#[derive(Copy, Clone, Eq, PartialEq)]
164pub struct Dtcst_SPEC;
165impl crate::sealed::RegSpec for Dtcst_SPEC {
166    type DataType = u8;
167}
168
169#[doc = "DTC Module Start Register"]
170pub type Dtcst = crate::RegValueT<Dtcst_SPEC>;
171
172impl Dtcst {
173    #[doc = "DTC Module Start"]
174    #[inline(always)]
175    pub fn dtcst(
176        self,
177    ) -> crate::common::RegisterField<
178        0,
179        0x1,
180        1,
181        0,
182        dtcst::Dtcst,
183        dtcst::Dtcst,
184        Dtcst_SPEC,
185        crate::common::RW,
186    > {
187        crate::common::RegisterField::<
188            0,
189            0x1,
190            1,
191            0,
192            dtcst::Dtcst,
193            dtcst::Dtcst,
194            Dtcst_SPEC,
195            crate::common::RW,
196        >::from_register(self, 0)
197    }
198}
199impl ::core::default::Default for Dtcst {
200    #[inline(always)]
201    fn default() -> Dtcst {
202        <crate::RegValueT<Dtcst_SPEC> as RegisterValue<_>>::new(0)
203    }
204}
205pub mod dtcst {
206
207    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
208    pub struct Dtcst_SPEC;
209    pub type Dtcst = crate::EnumBitfieldStruct<u8, Dtcst_SPEC>;
210    impl Dtcst {
211        #[doc = "DTC module stop"]
212        pub const _0: Self = Self::new(0);
213
214        #[doc = "DTC module start"]
215        pub const _1: Self = Self::new(1);
216    }
217}
218#[doc(hidden)]
219#[derive(Copy, Clone, Eq, PartialEq)]
220pub struct Dtcsts_SPEC;
221impl crate::sealed::RegSpec for Dtcsts_SPEC {
222    type DataType = u16;
223}
224
225#[doc = "DTC Status Register"]
226pub type Dtcsts = crate::RegValueT<Dtcsts_SPEC>;
227
228impl Dtcsts {
229    #[doc = "DTC Active Flag"]
230    #[inline(always)]
231    pub fn act(
232        self,
233    ) -> crate::common::RegisterField<
234        15,
235        0x1,
236        1,
237        0,
238        dtcsts::Act,
239        dtcsts::Act,
240        Dtcsts_SPEC,
241        crate::common::R,
242    > {
243        crate::common::RegisterField::<
244            15,
245            0x1,
246            1,
247            0,
248            dtcsts::Act,
249            dtcsts::Act,
250            Dtcsts_SPEC,
251            crate::common::R,
252        >::from_register(self, 0)
253    }
254
255    #[doc = "DTC-Activating Vector Number MonitoringThese bits indicate the vector number for the activating source when DTC transfer is in progress.The value is only valid if DTC transfer is in progress (the value of the ACT flag is 1)"]
256    #[inline(always)]
257    pub fn vecn(
258        self,
259    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Dtcsts_SPEC, crate::common::R> {
260        crate::common::RegisterField::<0,0xff,1,0,u8,u8,Dtcsts_SPEC,crate::common::R>::from_register(self,0)
261    }
262}
263impl ::core::default::Default for Dtcsts {
264    #[inline(always)]
265    fn default() -> Dtcsts {
266        <crate::RegValueT<Dtcsts_SPEC> as RegisterValue<_>>::new(0)
267    }
268}
269pub mod dtcsts {
270
271    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
272    pub struct Act_SPEC;
273    pub type Act = crate::EnumBitfieldStruct<u8, Act_SPEC>;
274    impl Act {
275        #[doc = "DTC transfer operation is not in progress."]
276        pub const _0: Self = Self::new(0);
277
278        #[doc = "DTC transfer operation is in progress."]
279        pub const _1: Self = Self::new(1);
280    }
281}