ra2e2_pac/
sram.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"SRAM Control"]
28unsafe impl ::core::marker::Send for super::Sram {}
29unsafe impl ::core::marker::Sync for super::Sram {}
30impl super::Sram {
31    #[allow(unused)]
32    #[inline(always)]
33    pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34        self.ptr
35    }
36
37    #[doc = "SRAM Parity Error Operation After Detection Register"]
38    #[inline(always)]
39    pub const fn parioad(
40        &self,
41    ) -> &'static crate::common::Reg<self::Parioad_SPEC, crate::common::RW> {
42        unsafe {
43            crate::common::Reg::<self::Parioad_SPEC, crate::common::RW>::from_ptr(
44                self._svd2pac_as_ptr().add(0usize),
45            )
46        }
47    }
48
49    #[doc = "SRAM Protection Register"]
50    #[inline(always)]
51    pub const fn sramprcr(
52        &self,
53    ) -> &'static crate::common::Reg<self::Sramprcr_SPEC, crate::common::RW> {
54        unsafe {
55            crate::common::Reg::<self::Sramprcr_SPEC, crate::common::RW>::from_ptr(
56                self._svd2pac_as_ptr().add(4usize),
57            )
58        }
59    }
60}
61#[doc(hidden)]
62#[derive(Copy, Clone, Eq, PartialEq)]
63pub struct Parioad_SPEC;
64impl crate::sealed::RegSpec for Parioad_SPEC {
65    type DataType = u8;
66}
67
68#[doc = "SRAM Parity Error Operation After Detection Register"]
69pub type Parioad = crate::RegValueT<Parioad_SPEC>;
70
71impl Parioad {
72    #[doc = "Operation After Detection"]
73    #[inline(always)]
74    pub fn oad(
75        self,
76    ) -> crate::common::RegisterField<
77        0,
78        0x1,
79        1,
80        0,
81        parioad::Oad,
82        parioad::Oad,
83        Parioad_SPEC,
84        crate::common::RW,
85    > {
86        crate::common::RegisterField::<
87            0,
88            0x1,
89            1,
90            0,
91            parioad::Oad,
92            parioad::Oad,
93            Parioad_SPEC,
94            crate::common::RW,
95        >::from_register(self, 0)
96    }
97}
98impl ::core::default::Default for Parioad {
99    #[inline(always)]
100    fn default() -> Parioad {
101        <crate::RegValueT<Parioad_SPEC> as RegisterValue<_>>::new(0)
102    }
103}
104pub mod parioad {
105
106    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
107    pub struct Oad_SPEC;
108    pub type Oad = crate::EnumBitfieldStruct<u8, Oad_SPEC>;
109    impl Oad {
110        #[doc = "Non-maskable interrupt"]
111        pub const _0: Self = Self::new(0);
112
113        #[doc = "Reset"]
114        pub const _1: Self = Self::new(1);
115    }
116}
117#[doc(hidden)]
118#[derive(Copy, Clone, Eq, PartialEq)]
119pub struct Sramprcr_SPEC;
120impl crate::sealed::RegSpec for Sramprcr_SPEC {
121    type DataType = u8;
122}
123
124#[doc = "SRAM Protection Register"]
125pub type Sramprcr = crate::RegValueT<Sramprcr_SPEC>;
126
127impl Sramprcr {
128    #[doc = "Register Write Control"]
129    #[inline(always)]
130    pub fn sramprcr(
131        self,
132    ) -> crate::common::RegisterField<
133        0,
134        0x1,
135        1,
136        0,
137        sramprcr::Sramprcr,
138        sramprcr::Sramprcr,
139        Sramprcr_SPEC,
140        crate::common::RW,
141    > {
142        crate::common::RegisterField::<
143            0,
144            0x1,
145            1,
146            0,
147            sramprcr::Sramprcr,
148            sramprcr::Sramprcr,
149            Sramprcr_SPEC,
150            crate::common::RW,
151        >::from_register(self, 0)
152    }
153
154    #[doc = "Write Key Code"]
155    #[inline(always)]
156    pub fn kw(
157        self,
158    ) -> crate::common::RegisterField<1, 0x7f, 1, 0, u8, u8, Sramprcr_SPEC, crate::common::W> {
159        crate::common::RegisterField::<1,0x7f,1,0,u8,u8,Sramprcr_SPEC,crate::common::W>::from_register(self,0)
160    }
161}
162impl ::core::default::Default for Sramprcr {
163    #[inline(always)]
164    fn default() -> Sramprcr {
165        <crate::RegValueT<Sramprcr_SPEC> as RegisterValue<_>>::new(0)
166    }
167}
168pub mod sramprcr {
169
170    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
171    pub struct Sramprcr_SPEC;
172    pub type Sramprcr = crate::EnumBitfieldStruct<u8, Sramprcr_SPEC>;
173    impl Sramprcr {
174        #[doc = "Disable writes to protected registers"]
175        pub const _0: Self = Self::new(0);
176
177        #[doc = "Enable writes to protected registers"]
178        pub const _1: Self = Self::new(1);
179    }
180}