ra4e2_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.30.00, with svd2pac 0.4.0 on Sat, 12 Apr 2025 22:15:35 +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    #[doc = "DOC Control Register"]
37    #[inline(always)]
38    pub const fn docr(&self) -> &'static crate::common::Reg<self::Docr_SPEC, crate::common::RW> {
39        unsafe {
40            crate::common::Reg::<self::Docr_SPEC, crate::common::RW>::from_ptr(
41                self._svd2pac_as_ptr().add(0usize),
42            )
43        }
44    }
45
46    #[doc = "DOC Data Input Register"]
47    #[inline(always)]
48    pub const fn dodir(&self) -> &'static crate::common::Reg<self::Dodir_SPEC, crate::common::RW> {
49        unsafe {
50            crate::common::Reg::<self::Dodir_SPEC, crate::common::RW>::from_ptr(
51                self._svd2pac_as_ptr().add(2usize),
52            )
53        }
54    }
55
56    #[doc = "DOC Data Setting Register"]
57    #[inline(always)]
58    pub const fn dodsr(&self) -> &'static crate::common::Reg<self::Dodsr_SPEC, crate::common::RW> {
59        unsafe {
60            crate::common::Reg::<self::Dodsr_SPEC, crate::common::RW>::from_ptr(
61                self._svd2pac_as_ptr().add(4usize),
62            )
63        }
64    }
65}
66#[doc(hidden)]
67#[derive(Copy, Clone, Eq, PartialEq)]
68pub struct Docr_SPEC;
69impl crate::sealed::RegSpec for Docr_SPEC {
70    type DataType = u8;
71}
72#[doc = "DOC Control Register"]
73pub type Docr = crate::RegValueT<Docr_SPEC>;
74
75impl Docr {
76    #[doc = "Operating Mode Select"]
77    #[inline(always)]
78    pub fn oms(
79        self,
80    ) -> crate::common::RegisterField<0, 0x3, 1, 0, docr::Oms, Docr_SPEC, crate::common::RW> {
81        crate::common::RegisterField::<0,0x3,1,0,docr::Oms, Docr_SPEC,crate::common::RW>::from_register(self,0)
82    }
83    #[doc = "Detection Condition Select"]
84    #[inline(always)]
85    pub fn dcsel(
86        self,
87    ) -> crate::common::RegisterField<2, 0x1, 1, 0, docr::Dcsel, Docr_SPEC, crate::common::RW> {
88        crate::common::RegisterField::<2,0x1,1,0,docr::Dcsel, Docr_SPEC,crate::common::RW>::from_register(self,0)
89    }
90    #[doc = "DOC Flag"]
91    #[inline(always)]
92    pub fn dopcf(self) -> crate::common::RegisterFieldBool<5, 1, 0, Docr_SPEC, crate::common::R> {
93        crate::common::RegisterFieldBool::<5, 1, 0, Docr_SPEC, crate::common::R>::from_register(
94            self, 0,
95        )
96    }
97    #[doc = "DOPCF Clear"]
98    #[inline(always)]
99    pub fn dopcfcl(
100        self,
101    ) -> crate::common::RegisterField<6, 0x1, 1, 0, docr::Dopcfcl, Docr_SPEC, crate::common::RW>
102    {
103        crate::common::RegisterField::<6,0x1,1,0,docr::Dopcfcl, Docr_SPEC,crate::common::RW>::from_register(self,0)
104    }
105}
106impl ::core::default::Default for Docr {
107    #[inline(always)]
108    fn default() -> Docr {
109        <crate::RegValueT<Docr_SPEC> as RegisterValue<_>>::new(0)
110    }
111}
112pub mod docr {
113
114    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
115    pub struct Oms_SPEC;
116    pub type Oms = crate::EnumBitfieldStruct<u8, Oms_SPEC>;
117    impl Oms {
118        #[doc = "Data comparison mode"]
119        pub const _00: Self = Self::new(0);
120        #[doc = "Data addition mode"]
121        pub const _01: Self = Self::new(1);
122        #[doc = "Data subtraction mode"]
123        pub const _10: Self = Self::new(2);
124        #[doc = "Setting prohibited"]
125        pub const _11: Self = Self::new(3);
126    }
127    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
128    pub struct Dcsel_SPEC;
129    pub type Dcsel = crate::EnumBitfieldStruct<u8, Dcsel_SPEC>;
130    impl Dcsel {
131        #[doc = "Set DOPCF flag when data mismatch is detected"]
132        pub const _0: Self = Self::new(0);
133        #[doc = "Set DOPCF flag when data match is detected"]
134        pub const _1: Self = Self::new(1);
135    }
136    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
137    pub struct Dopcfcl_SPEC;
138    pub type Dopcfcl = crate::EnumBitfieldStruct<u8, Dopcfcl_SPEC>;
139    impl Dopcfcl {
140        #[doc = "Retain DOPCF flag state"]
141        pub const _0: Self = Self::new(0);
142        #[doc = "Clear DOPCF flag"]
143        pub const _1: Self = Self::new(1);
144    }
145}
146#[doc(hidden)]
147#[derive(Copy, Clone, Eq, PartialEq)]
148pub struct Dodir_SPEC;
149impl crate::sealed::RegSpec for Dodir_SPEC {
150    type DataType = u16;
151}
152#[doc = "DOC Data Input Register"]
153pub type Dodir = crate::RegValueT<Dodir_SPEC>;
154
155impl NoBitfieldReg<Dodir_SPEC> for Dodir {}
156impl ::core::default::Default for Dodir {
157    #[inline(always)]
158    fn default() -> Dodir {
159        <crate::RegValueT<Dodir_SPEC> as RegisterValue<_>>::new(0)
160    }
161}
162
163#[doc(hidden)]
164#[derive(Copy, Clone, Eq, PartialEq)]
165pub struct Dodsr_SPEC;
166impl crate::sealed::RegSpec for Dodsr_SPEC {
167    type DataType = u16;
168}
169#[doc = "DOC Data Setting Register"]
170pub type Dodsr = crate::RegValueT<Dodsr_SPEC>;
171
172impl NoBitfieldReg<Dodsr_SPEC> for Dodsr {}
173impl ::core::default::Default for Dodsr {
174    #[inline(always)]
175    fn default() -> Dodsr {
176        <crate::RegValueT<Dodsr_SPEC> as RegisterValue<_>>::new(0)
177    }
178}