rsl10_pac/sysctrl/
sysctrl_mem_error.rs1#[doc = "Reader of register SYSCTRL_MEM_ERROR"]
2pub type R = crate::R<u32, super::SYSCTRL_MEM_ERROR>;
3#[doc = "Writer for register SYSCTRL_MEM_ERROR"]
4pub type W = crate::W<u32, super::SYSCTRL_MEM_ERROR>;
5#[doc = "Register SYSCTRL_MEM_ERROR `reset()`'s with value 0"]
6impl crate::ResetValue for super::SYSCTRL_MEM_ERROR {
7 type Type = u32;
8 #[inline(always)]
9 fn reset_value() -> Self::Type {
10 0
11 }
12}
13#[doc = "Write a 1 to clear the memory error flags\n\nValue on reset: 0"]
14#[derive(Clone, Copy, Debug, PartialEq)]
15pub enum MEM_ERROR_CLEAR_AW {
16 #[doc = "1: Clear the memory error flags"]
17 MEM_ERROR_CLEAR = 1,
18}
19impl From<MEM_ERROR_CLEAR_AW> for bool {
20 #[inline(always)]
21 fn from(variant: MEM_ERROR_CLEAR_AW) -> Self {
22 variant as u8 != 0
23 }
24}
25#[doc = "Write proxy for field `MEM_ERROR_CLEAR`"]
26pub struct MEM_ERROR_CLEAR_W<'a> {
27 w: &'a mut W,
28}
29impl<'a> MEM_ERROR_CLEAR_W<'a> {
30 #[doc = r"Writes `variant` to the field"]
31 #[inline(always)]
32 pub fn variant(self, variant: MEM_ERROR_CLEAR_AW) -> &'a mut W {
33 {
34 self.bit(variant.into())
35 }
36 }
37 #[doc = "Clear the memory error flags"]
38 #[inline(always)]
39 pub fn mem_error_clear(self) -> &'a mut W {
40 self.variant(MEM_ERROR_CLEAR_AW::MEM_ERROR_CLEAR)
41 }
42 #[doc = r"Sets the field bit"]
43 #[inline(always)]
44 pub fn set_bit(self) -> &'a mut W {
45 self.bit(true)
46 }
47 #[doc = r"Clears the field bit"]
48 #[inline(always)]
49 pub fn clear_bit(self) -> &'a mut W {
50 self.bit(false)
51 }
52 #[doc = r"Writes raw bits to the field"]
53 #[inline(always)]
54 pub fn bit(self, value: bool) -> &'a mut W {
55 self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
56 self.w
57 }
58}
59#[doc = "Baseband memory error flag\n\nValue on reset: 0"]
60#[derive(Clone, Copy, Debug, PartialEq)]
61pub enum BB_MEM_ERROR_A {
62 #[doc = "0: No baseband memory error detected"]
63 BB_MEM_NO_ERROR_DETECTED = 0,
64 #[doc = "1: Baseband has accessed an isolated memory"]
65 BB_MEM_ERROR_DETECTED = 1,
66}
67impl From<BB_MEM_ERROR_A> for bool {
68 #[inline(always)]
69 fn from(variant: BB_MEM_ERROR_A) -> Self {
70 variant as u8 != 0
71 }
72}
73#[doc = "Reader of field `BB_MEM_ERROR`"]
74pub type BB_MEM_ERROR_R = crate::R<bool, BB_MEM_ERROR_A>;
75impl BB_MEM_ERROR_R {
76 #[doc = r"Get enumerated values variant"]
77 #[inline(always)]
78 pub fn variant(&self) -> BB_MEM_ERROR_A {
79 match self.bits {
80 false => BB_MEM_ERROR_A::BB_MEM_NO_ERROR_DETECTED,
81 true => BB_MEM_ERROR_A::BB_MEM_ERROR_DETECTED,
82 }
83 }
84 #[doc = "Checks if the value of the field is `BB_MEM_NO_ERROR_DETECTED`"]
85 #[inline(always)]
86 pub fn is_bb_mem_no_error_detected(&self) -> bool {
87 *self == BB_MEM_ERROR_A::BB_MEM_NO_ERROR_DETECTED
88 }
89 #[doc = "Checks if the value of the field is `BB_MEM_ERROR_DETECTED`"]
90 #[inline(always)]
91 pub fn is_bb_mem_error_detected(&self) -> bool {
92 *self == BB_MEM_ERROR_A::BB_MEM_ERROR_DETECTED
93 }
94}
95#[doc = "Flash copier memory error flag\n\nValue on reset: 0"]
96#[derive(Clone, Copy, Debug, PartialEq)]
97pub enum FLASH_COPIER_MEM_ERROR_A {
98 #[doc = "0: No Flash copier memory error detected"]
99 FLASH_COPIER_MEM_NO_ERROR_DETECTED = 0,
100 #[doc = "1: Flash copier has accessed an isolated memory"]
101 FLASH_COPIER_MEM_ERROR_DETECTED = 1,
102}
103impl From<FLASH_COPIER_MEM_ERROR_A> for bool {
104 #[inline(always)]
105 fn from(variant: FLASH_COPIER_MEM_ERROR_A) -> Self {
106 variant as u8 != 0
107 }
108}
109#[doc = "Reader of field `FLASH_COPIER_MEM_ERROR`"]
110pub type FLASH_COPIER_MEM_ERROR_R = crate::R<bool, FLASH_COPIER_MEM_ERROR_A>;
111impl FLASH_COPIER_MEM_ERROR_R {
112 #[doc = r"Get enumerated values variant"]
113 #[inline(always)]
114 pub fn variant(&self) -> FLASH_COPIER_MEM_ERROR_A {
115 match self.bits {
116 false => FLASH_COPIER_MEM_ERROR_A::FLASH_COPIER_MEM_NO_ERROR_DETECTED,
117 true => FLASH_COPIER_MEM_ERROR_A::FLASH_COPIER_MEM_ERROR_DETECTED,
118 }
119 }
120 #[doc = "Checks if the value of the field is `FLASH_COPIER_MEM_NO_ERROR_DETECTED`"]
121 #[inline(always)]
122 pub fn is_flash_copier_mem_no_error_detected(&self) -> bool {
123 *self == FLASH_COPIER_MEM_ERROR_A::FLASH_COPIER_MEM_NO_ERROR_DETECTED
124 }
125 #[doc = "Checks if the value of the field is `FLASH_COPIER_MEM_ERROR_DETECTED`"]
126 #[inline(always)]
127 pub fn is_flash_copier_mem_error_detected(&self) -> bool {
128 *self == FLASH_COPIER_MEM_ERROR_A::FLASH_COPIER_MEM_ERROR_DETECTED
129 }
130}
131#[doc = "DMA memory error flag\n\nValue on reset: 0"]
132#[derive(Clone, Copy, Debug, PartialEq)]
133pub enum DMA_MEM_ERROR_A {
134 #[doc = "0: No DMA memory error detected"]
135 DMA_MEM_NO_ERROR_DETECTED = 0,
136 #[doc = "1: DMA has accessed an isolated memory"]
137 DMA_MEM_ERROR_DETECTED = 1,
138}
139impl From<DMA_MEM_ERROR_A> for bool {
140 #[inline(always)]
141 fn from(variant: DMA_MEM_ERROR_A) -> Self {
142 variant as u8 != 0
143 }
144}
145#[doc = "Reader of field `DMA_MEM_ERROR`"]
146pub type DMA_MEM_ERROR_R = crate::R<bool, DMA_MEM_ERROR_A>;
147impl DMA_MEM_ERROR_R {
148 #[doc = r"Get enumerated values variant"]
149 #[inline(always)]
150 pub fn variant(&self) -> DMA_MEM_ERROR_A {
151 match self.bits {
152 false => DMA_MEM_ERROR_A::DMA_MEM_NO_ERROR_DETECTED,
153 true => DMA_MEM_ERROR_A::DMA_MEM_ERROR_DETECTED,
154 }
155 }
156 #[doc = "Checks if the value of the field is `DMA_MEM_NO_ERROR_DETECTED`"]
157 #[inline(always)]
158 pub fn is_dma_mem_no_error_detected(&self) -> bool {
159 *self == DMA_MEM_ERROR_A::DMA_MEM_NO_ERROR_DETECTED
160 }
161 #[doc = "Checks if the value of the field is `DMA_MEM_ERROR_DETECTED`"]
162 #[inline(always)]
163 pub fn is_dma_mem_error_detected(&self) -> bool {
164 *self == DMA_MEM_ERROR_A::DMA_MEM_ERROR_DETECTED
165 }
166}
167#[doc = "LPDSP32 data memory error flag\n\nValue on reset: 0"]
168#[derive(Clone, Copy, Debug, PartialEq)]
169pub enum LPDSP32_DMEM_ERROR_A {
170 #[doc = "0: No LPDSP32 data memory error detected"]
171 LPDSP32_DMEM_NO_ERROR_DETECTED = 0,
172 #[doc = "1: LPDSP32 has accessed an isolated data memory"]
173 LPDSP32_DMEM_ERROR_DETECTED = 1,
174}
175impl From<LPDSP32_DMEM_ERROR_A> for bool {
176 #[inline(always)]
177 fn from(variant: LPDSP32_DMEM_ERROR_A) -> Self {
178 variant as u8 != 0
179 }
180}
181#[doc = "Reader of field `LPDSP32_DMEM_ERROR`"]
182pub type LPDSP32_DMEM_ERROR_R = crate::R<bool, LPDSP32_DMEM_ERROR_A>;
183impl LPDSP32_DMEM_ERROR_R {
184 #[doc = r"Get enumerated values variant"]
185 #[inline(always)]
186 pub fn variant(&self) -> LPDSP32_DMEM_ERROR_A {
187 match self.bits {
188 false => LPDSP32_DMEM_ERROR_A::LPDSP32_DMEM_NO_ERROR_DETECTED,
189 true => LPDSP32_DMEM_ERROR_A::LPDSP32_DMEM_ERROR_DETECTED,
190 }
191 }
192 #[doc = "Checks if the value of the field is `LPDSP32_DMEM_NO_ERROR_DETECTED`"]
193 #[inline(always)]
194 pub fn is_lpdsp32_dmem_no_error_detected(&self) -> bool {
195 *self == LPDSP32_DMEM_ERROR_A::LPDSP32_DMEM_NO_ERROR_DETECTED
196 }
197 #[doc = "Checks if the value of the field is `LPDSP32_DMEM_ERROR_DETECTED`"]
198 #[inline(always)]
199 pub fn is_lpdsp32_dmem_error_detected(&self) -> bool {
200 *self == LPDSP32_DMEM_ERROR_A::LPDSP32_DMEM_ERROR_DETECTED
201 }
202}
203#[doc = "LPDSP32 program memory error flag\n\nValue on reset: 0"]
204#[derive(Clone, Copy, Debug, PartialEq)]
205pub enum LPDSP32_PMEM_ERROR_A {
206 #[doc = "0: No LPDSP32 program memory error detected"]
207 LPDSP32_PMEM_NO_ERROR_DETECTED = 0,
208 #[doc = "1: LPDSP32 has accessed an isolated program memory"]
209 LPDSP32_PMEM_ERROR_DETECTED = 1,
210}
211impl From<LPDSP32_PMEM_ERROR_A> for bool {
212 #[inline(always)]
213 fn from(variant: LPDSP32_PMEM_ERROR_A) -> Self {
214 variant as u8 != 0
215 }
216}
217#[doc = "Reader of field `LPDSP32_PMEM_ERROR`"]
218pub type LPDSP32_PMEM_ERROR_R = crate::R<bool, LPDSP32_PMEM_ERROR_A>;
219impl LPDSP32_PMEM_ERROR_R {
220 #[doc = r"Get enumerated values variant"]
221 #[inline(always)]
222 pub fn variant(&self) -> LPDSP32_PMEM_ERROR_A {
223 match self.bits {
224 false => LPDSP32_PMEM_ERROR_A::LPDSP32_PMEM_NO_ERROR_DETECTED,
225 true => LPDSP32_PMEM_ERROR_A::LPDSP32_PMEM_ERROR_DETECTED,
226 }
227 }
228 #[doc = "Checks if the value of the field is `LPDSP32_PMEM_NO_ERROR_DETECTED`"]
229 #[inline(always)]
230 pub fn is_lpdsp32_pmem_no_error_detected(&self) -> bool {
231 *self == LPDSP32_PMEM_ERROR_A::LPDSP32_PMEM_NO_ERROR_DETECTED
232 }
233 #[doc = "Checks if the value of the field is `LPDSP32_PMEM_ERROR_DETECTED`"]
234 #[inline(always)]
235 pub fn is_lpdsp32_pmem_error_detected(&self) -> bool {
236 *self == LPDSP32_PMEM_ERROR_A::LPDSP32_PMEM_ERROR_DETECTED
237 }
238}
239impl R {
240 #[doc = "Bit 4 - Baseband memory error flag"]
241 #[inline(always)]
242 pub fn bb_mem_error(&self) -> BB_MEM_ERROR_R {
243 BB_MEM_ERROR_R::new(((self.bits >> 4) & 0x01) != 0)
244 }
245 #[doc = "Bit 3 - Flash copier memory error flag"]
246 #[inline(always)]
247 pub fn flash_copier_mem_error(&self) -> FLASH_COPIER_MEM_ERROR_R {
248 FLASH_COPIER_MEM_ERROR_R::new(((self.bits >> 3) & 0x01) != 0)
249 }
250 #[doc = "Bit 2 - DMA memory error flag"]
251 #[inline(always)]
252 pub fn dma_mem_error(&self) -> DMA_MEM_ERROR_R {
253 DMA_MEM_ERROR_R::new(((self.bits >> 2) & 0x01) != 0)
254 }
255 #[doc = "Bit 1 - LPDSP32 data memory error flag"]
256 #[inline(always)]
257 pub fn lpdsp32_dmem_error(&self) -> LPDSP32_DMEM_ERROR_R {
258 LPDSP32_DMEM_ERROR_R::new(((self.bits >> 1) & 0x01) != 0)
259 }
260 #[doc = "Bit 0 - LPDSP32 program memory error flag"]
261 #[inline(always)]
262 pub fn lpdsp32_pmem_error(&self) -> LPDSP32_PMEM_ERROR_R {
263 LPDSP32_PMEM_ERROR_R::new((self.bits & 0x01) != 0)
264 }
265}
266impl W {
267 #[doc = "Bit 5 - Write a 1 to clear the memory error flags"]
268 #[inline(always)]
269 pub fn mem_error_clear(&mut self) -> MEM_ERROR_CLEAR_W {
270 MEM_ERROR_CLEAR_W { w: self }
271 }
272}