ra6e1_pac/
doc.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 Operation Circuit"]
28unsafe impl ::core::marker::Send for super::Doc {}
29unsafe impl ::core::marker::Sync for super::Doc {}
30impl super::Doc {
31    #[allow(unused)]
32    #[inline(always)]
33    pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34        self.ptr
35    }
36
37    #[doc = "DOC Control Register"]
38    #[inline(always)]
39    pub const fn docr(&self) -> &'static crate::common::Reg<self::Docr_SPEC, crate::common::RW> {
40        unsafe {
41            crate::common::Reg::<self::Docr_SPEC, crate::common::RW>::from_ptr(
42                self._svd2pac_as_ptr().add(0usize),
43            )
44        }
45    }
46
47    #[doc = "DOC Data Input Register"]
48    #[inline(always)]
49    pub const fn dodir(&self) -> &'static crate::common::Reg<self::Dodir_SPEC, crate::common::RW> {
50        unsafe {
51            crate::common::Reg::<self::Dodir_SPEC, crate::common::RW>::from_ptr(
52                self._svd2pac_as_ptr().add(2usize),
53            )
54        }
55    }
56
57    #[doc = "DOC Data Setting Register"]
58    #[inline(always)]
59    pub const fn dodsr(&self) -> &'static crate::common::Reg<self::Dodsr_SPEC, crate::common::RW> {
60        unsafe {
61            crate::common::Reg::<self::Dodsr_SPEC, crate::common::RW>::from_ptr(
62                self._svd2pac_as_ptr().add(4usize),
63            )
64        }
65    }
66}
67#[doc(hidden)]
68#[derive(Copy, Clone, Eq, PartialEq)]
69pub struct Docr_SPEC;
70impl crate::sealed::RegSpec for Docr_SPEC {
71    type DataType = u8;
72}
73
74#[doc = "DOC Control Register"]
75pub type Docr = crate::RegValueT<Docr_SPEC>;
76
77impl Docr {
78    #[doc = "Operating Mode Select"]
79    #[inline(always)]
80    pub fn oms(
81        self,
82    ) -> crate::common::RegisterField<
83        0,
84        0x3,
85        1,
86        0,
87        docr::Oms,
88        docr::Oms,
89        Docr_SPEC,
90        crate::common::RW,
91    > {
92        crate::common::RegisterField::<
93            0,
94            0x3,
95            1,
96            0,
97            docr::Oms,
98            docr::Oms,
99            Docr_SPEC,
100            crate::common::RW,
101        >::from_register(self, 0)
102    }
103
104    #[doc = "Detection Condition Select"]
105    #[inline(always)]
106    pub fn dcsel(
107        self,
108    ) -> crate::common::RegisterField<
109        2,
110        0x1,
111        1,
112        0,
113        docr::Dcsel,
114        docr::Dcsel,
115        Docr_SPEC,
116        crate::common::RW,
117    > {
118        crate::common::RegisterField::<
119            2,
120            0x1,
121            1,
122            0,
123            docr::Dcsel,
124            docr::Dcsel,
125            Docr_SPEC,
126            crate::common::RW,
127        >::from_register(self, 0)
128    }
129
130    #[doc = "DOC Flag"]
131    #[inline(always)]
132    pub fn dopcf(self) -> crate::common::RegisterFieldBool<5, 1, 0, Docr_SPEC, crate::common::R> {
133        crate::common::RegisterFieldBool::<5, 1, 0, Docr_SPEC, crate::common::R>::from_register(
134            self, 0,
135        )
136    }
137
138    #[doc = "DOPCF Clear"]
139    #[inline(always)]
140    pub fn dopcfcl(
141        self,
142    ) -> crate::common::RegisterField<
143        6,
144        0x1,
145        1,
146        0,
147        docr::Dopcfcl,
148        docr::Dopcfcl,
149        Docr_SPEC,
150        crate::common::RW,
151    > {
152        crate::common::RegisterField::<
153            6,
154            0x1,
155            1,
156            0,
157            docr::Dopcfcl,
158            docr::Dopcfcl,
159            Docr_SPEC,
160            crate::common::RW,
161        >::from_register(self, 0)
162    }
163}
164impl ::core::default::Default for Docr {
165    #[inline(always)]
166    fn default() -> Docr {
167        <crate::RegValueT<Docr_SPEC> as RegisterValue<_>>::new(0)
168    }
169}
170pub mod docr {
171
172    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
173    pub struct Oms_SPEC;
174    pub type Oms = crate::EnumBitfieldStruct<u8, Oms_SPEC>;
175    impl Oms {
176        #[doc = "Data comparison mode"]
177        pub const _00: Self = Self::new(0);
178
179        #[doc = "Data addition mode"]
180        pub const _01: Self = Self::new(1);
181
182        #[doc = "Data subtraction mode"]
183        pub const _10: Self = Self::new(2);
184
185        #[doc = "Setting prohibited"]
186        pub const _11: Self = Self::new(3);
187    }
188    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
189    pub struct Dcsel_SPEC;
190    pub type Dcsel = crate::EnumBitfieldStruct<u8, Dcsel_SPEC>;
191    impl Dcsel {
192        #[doc = "Set DOPCF flag when data mismatch is detected"]
193        pub const _0: Self = Self::new(0);
194
195        #[doc = "Set DOPCF flag when data match is detected"]
196        pub const _1: Self = Self::new(1);
197    }
198    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
199    pub struct Dopcfcl_SPEC;
200    pub type Dopcfcl = crate::EnumBitfieldStruct<u8, Dopcfcl_SPEC>;
201    impl Dopcfcl {
202        #[doc = "Retain DOPCF flag state"]
203        pub const _0: Self = Self::new(0);
204
205        #[doc = "Clear DOPCF flag"]
206        pub const _1: Self = Self::new(1);
207    }
208}
209#[doc(hidden)]
210#[derive(Copy, Clone, Eq, PartialEq)]
211pub struct Dodir_SPEC;
212impl crate::sealed::RegSpec for Dodir_SPEC {
213    type DataType = u16;
214}
215
216#[doc = "DOC Data Input Register"]
217pub type Dodir = crate::RegValueT<Dodir_SPEC>;
218
219impl NoBitfieldReg<Dodir_SPEC> for Dodir {}
220impl ::core::default::Default for Dodir {
221    #[inline(always)]
222    fn default() -> Dodir {
223        <crate::RegValueT<Dodir_SPEC> as RegisterValue<_>>::new(0)
224    }
225}
226
227#[doc(hidden)]
228#[derive(Copy, Clone, Eq, PartialEq)]
229pub struct Dodsr_SPEC;
230impl crate::sealed::RegSpec for Dodsr_SPEC {
231    type DataType = u16;
232}
233
234#[doc = "DOC Data Setting Register"]
235pub type Dodsr = crate::RegValueT<Dodsr_SPEC>;
236
237impl NoBitfieldReg<Dodsr_SPEC> for Dodsr {}
238impl ::core::default::Default for Dodsr {
239    #[inline(always)]
240    fn default() -> Dodsr {
241        <crate::RegValueT<Dodsr_SPEC> as RegisterValue<_>>::new(0)
242    }
243}