ra8e2_pac/
doc_b.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.00.01, with svd2pac 0.6.0 on Thu, 24 Jul 2025 04:54:26 +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::DocB {}
29unsafe impl ::core::marker::Sync for super::DocB {}
30impl super::DocB {
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 Flag Status Register"]
48    #[inline(always)]
49    pub const fn dosr(&self) -> &'static crate::common::Reg<self::Dosr_SPEC, crate::common::R> {
50        unsafe {
51            crate::common::Reg::<self::Dosr_SPEC, crate::common::R>::from_ptr(
52                self._svd2pac_as_ptr().add(4usize),
53            )
54        }
55    }
56
57    #[doc = "DOC Flag Status Clear Register"]
58    #[inline(always)]
59    pub const fn doscr(&self) -> &'static crate::common::Reg<self::Doscr_SPEC, crate::common::W> {
60        unsafe {
61            crate::common::Reg::<self::Doscr_SPEC, crate::common::W>::from_ptr(
62                self._svd2pac_as_ptr().add(8usize),
63            )
64        }
65    }
66
67    #[doc = "DOC Data Input Register"]
68    #[inline(always)]
69    pub const fn dodir(&self) -> &'static crate::common::Reg<self::Dodir_SPEC, crate::common::RW> {
70        unsafe {
71            crate::common::Reg::<self::Dodir_SPEC, crate::common::RW>::from_ptr(
72                self._svd2pac_as_ptr().add(12usize),
73            )
74        }
75    }
76
77    #[doc = "DOC Data Setting Register 0"]
78    #[inline(always)]
79    pub const fn dodsr0(
80        &self,
81    ) -> &'static crate::common::Reg<self::Dodsr0_SPEC, crate::common::RW> {
82        unsafe {
83            crate::common::Reg::<self::Dodsr0_SPEC, crate::common::RW>::from_ptr(
84                self._svd2pac_as_ptr().add(16usize),
85            )
86        }
87    }
88
89    #[doc = "DOC Data Setting Register 1"]
90    #[inline(always)]
91    pub const fn dodsr1(
92        &self,
93    ) -> &'static crate::common::Reg<self::Dodsr1_SPEC, crate::common::RW> {
94        unsafe {
95            crate::common::Reg::<self::Dodsr1_SPEC, crate::common::RW>::from_ptr(
96                self._svd2pac_as_ptr().add(20usize),
97            )
98        }
99    }
100}
101#[doc(hidden)]
102#[derive(Copy, Clone, Eq, PartialEq)]
103pub struct Docr_SPEC;
104impl crate::sealed::RegSpec for Docr_SPEC {
105    type DataType = u8;
106}
107
108#[doc = "DOC Control Register"]
109pub type Docr = crate::RegValueT<Docr_SPEC>;
110
111impl Docr {
112    #[doc = "Operating Mode Select"]
113    #[inline(always)]
114    pub fn oms(
115        self,
116    ) -> crate::common::RegisterField<
117        0,
118        0x3,
119        1,
120        0,
121        docr::Oms,
122        docr::Oms,
123        Docr_SPEC,
124        crate::common::RW,
125    > {
126        crate::common::RegisterField::<
127            0,
128            0x3,
129            1,
130            0,
131            docr::Oms,
132            docr::Oms,
133            Docr_SPEC,
134            crate::common::RW,
135        >::from_register(self, 0)
136    }
137
138    #[doc = "Data Operation Bit Width Select"]
139    #[inline(always)]
140    pub fn dobw(
141        self,
142    ) -> crate::common::RegisterField<
143        3,
144        0x1,
145        1,
146        0,
147        docr::Dobw,
148        docr::Dobw,
149        Docr_SPEC,
150        crate::common::RW,
151    > {
152        crate::common::RegisterField::<
153            3,
154            0x1,
155            1,
156            0,
157            docr::Dobw,
158            docr::Dobw,
159            Docr_SPEC,
160            crate::common::RW,
161        >::from_register(self, 0)
162    }
163
164    #[doc = "Detection Condition Select"]
165    #[inline(always)]
166    pub fn dcsel(
167        self,
168    ) -> crate::common::RegisterField<
169        4,
170        0x7,
171        1,
172        0,
173        docr::Dcsel,
174        docr::Dcsel,
175        Docr_SPEC,
176        crate::common::RW,
177    > {
178        crate::common::RegisterField::<
179            4,
180            0x7,
181            1,
182            0,
183            docr::Dcsel,
184            docr::Dcsel,
185            Docr_SPEC,
186            crate::common::RW,
187        >::from_register(self, 0)
188    }
189}
190impl ::core::default::Default for Docr {
191    #[inline(always)]
192    fn default() -> Docr {
193        <crate::RegValueT<Docr_SPEC> as RegisterValue<_>>::new(0)
194    }
195}
196pub mod docr {
197
198    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
199    pub struct Oms_SPEC;
200    pub type Oms = crate::EnumBitfieldStruct<u8, Oms_SPEC>;
201    impl Oms {
202        #[doc = "Data comparison mode"]
203        pub const _00: Self = Self::new(0);
204
205        #[doc = "Data addition mode"]
206        pub const _01: Self = Self::new(1);
207
208        #[doc = "Data subtraction mode"]
209        pub const _10: Self = Self::new(2);
210
211        #[doc = "Setting prohibited"]
212        pub const _11: Self = Self::new(3);
213    }
214    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
215    pub struct Dobw_SPEC;
216    pub type Dobw = crate::EnumBitfieldStruct<u8, Dobw_SPEC>;
217    impl Dobw {
218        #[doc = "16-bit"]
219        pub const _0: Self = Self::new(0);
220
221        #[doc = "32-bit"]
222        pub const _1: Self = Self::new(1);
223    }
224    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
225    pub struct Dcsel_SPEC;
226    pub type Dcsel = crate::EnumBitfieldStruct<u8, Dcsel_SPEC>;
227    impl Dcsel {
228        #[doc = "Mismatch (DODSR0 ≠ DODIR)"]
229        pub const _000: Self = Self::new(0);
230
231        #[doc = "Match (DODSR0 = DODIR)"]
232        pub const _001: Self = Self::new(1);
233
234        #[doc = "Lower (DODSR0 > DODIR)"]
235        pub const _010: Self = Self::new(2);
236
237        #[doc = "Upper (DODSR0 < DODIR)"]
238        pub const _011: Self = Self::new(3);
239
240        #[doc = "Inside window (DODSR0 < DODIR < DODSR1)"]
241        pub const _100: Self = Self::new(4);
242
243        #[doc = "Outside window (DODIR < DODSR0, DODSR1 < DODIR)"]
244        pub const _101: Self = Self::new(5);
245
246        #[doc = "Setting prohibited"]
247        pub const OTHERS: Self = Self::new(0);
248    }
249}
250#[doc(hidden)]
251#[derive(Copy, Clone, Eq, PartialEq)]
252pub struct Dosr_SPEC;
253impl crate::sealed::RegSpec for Dosr_SPEC {
254    type DataType = u8;
255}
256
257#[doc = "DOC Flag Status Register"]
258pub type Dosr = crate::RegValueT<Dosr_SPEC>;
259
260impl Dosr {
261    #[doc = "Data Operation Circuit Flag"]
262    #[inline(always)]
263    pub fn dopcf(self) -> crate::common::RegisterFieldBool<0, 1, 0, Dosr_SPEC, crate::common::R> {
264        crate::common::RegisterFieldBool::<0, 1, 0, Dosr_SPEC, crate::common::R>::from_register(
265            self, 0,
266        )
267    }
268}
269impl ::core::default::Default for Dosr {
270    #[inline(always)]
271    fn default() -> Dosr {
272        <crate::RegValueT<Dosr_SPEC> as RegisterValue<_>>::new(0)
273    }
274}
275
276#[doc(hidden)]
277#[derive(Copy, Clone, Eq, PartialEq)]
278pub struct Doscr_SPEC;
279impl crate::sealed::RegSpec for Doscr_SPEC {
280    type DataType = u8;
281}
282
283#[doc = "DOC Flag Status Clear Register"]
284pub type Doscr = crate::RegValueT<Doscr_SPEC>;
285
286impl Doscr {
287    #[doc = "DOPCF Clear"]
288    #[inline(always)]
289    pub fn dopcfcl(
290        self,
291    ) -> crate::common::RegisterField<
292        0,
293        0x1,
294        1,
295        0,
296        doscr::Dopcfcl,
297        doscr::Dopcfcl,
298        Doscr_SPEC,
299        crate::common::W,
300    > {
301        crate::common::RegisterField::<
302            0,
303            0x1,
304            1,
305            0,
306            doscr::Dopcfcl,
307            doscr::Dopcfcl,
308            Doscr_SPEC,
309            crate::common::W,
310        >::from_register(self, 0)
311    }
312}
313impl ::core::default::Default for Doscr {
314    #[inline(always)]
315    fn default() -> Doscr {
316        <crate::RegValueT<Doscr_SPEC> as RegisterValue<_>>::new(0)
317    }
318}
319pub mod doscr {
320
321    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
322    pub struct Dopcfcl_SPEC;
323    pub type Dopcfcl = crate::EnumBitfieldStruct<u8, Dopcfcl_SPEC>;
324    impl Dopcfcl {
325        #[doc = "Maintains the DOPCF flag state."]
326        pub const _0: Self = Self::new(0);
327
328        #[doc = "Clears the DOPCF flag."]
329        pub const _1: Self = Self::new(1);
330    }
331}
332#[doc(hidden)]
333#[derive(Copy, Clone, Eq, PartialEq)]
334pub struct Dodir_SPEC;
335impl crate::sealed::RegSpec for Dodir_SPEC {
336    type DataType = u32;
337}
338
339#[doc = "DOC Data Input Register"]
340pub type Dodir = crate::RegValueT<Dodir_SPEC>;
341
342impl NoBitfieldReg<Dodir_SPEC> for Dodir {}
343impl ::core::default::Default for Dodir {
344    #[inline(always)]
345    fn default() -> Dodir {
346        <crate::RegValueT<Dodir_SPEC> as RegisterValue<_>>::new(0)
347    }
348}
349
350#[doc(hidden)]
351#[derive(Copy, Clone, Eq, PartialEq)]
352pub struct Dodsr0_SPEC;
353impl crate::sealed::RegSpec for Dodsr0_SPEC {
354    type DataType = u32;
355}
356
357#[doc = "DOC Data Setting Register 0"]
358pub type Dodsr0 = crate::RegValueT<Dodsr0_SPEC>;
359
360impl NoBitfieldReg<Dodsr0_SPEC> for Dodsr0 {}
361impl ::core::default::Default for Dodsr0 {
362    #[inline(always)]
363    fn default() -> Dodsr0 {
364        <crate::RegValueT<Dodsr0_SPEC> as RegisterValue<_>>::new(0)
365    }
366}
367
368#[doc(hidden)]
369#[derive(Copy, Clone, Eq, PartialEq)]
370pub struct Dodsr1_SPEC;
371impl crate::sealed::RegSpec for Dodsr1_SPEC {
372    type DataType = u32;
373}
374
375#[doc = "DOC Data Setting Register 1"]
376pub type Dodsr1 = crate::RegValueT<Dodsr1_SPEC>;
377
378impl NoBitfieldReg<Dodsr1_SPEC> for Dodsr1 {}
379impl ::core::default::Default for Dodsr1 {
380    #[inline(always)]
381    fn default() -> Dodsr1 {
382        <crate::RegValueT<Dodsr1_SPEC> as RegisterValue<_>>::new(0)
383    }
384}