1#[doc = "Register `REGIONEN` reader"]
2pub struct R(crate::R<REGIONEN_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<REGIONEN_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<REGIONEN_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<REGIONEN_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `REGIONEN` writer"]
17pub struct W(crate::W<REGIONEN_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<REGIONEN_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<REGIONEN_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<REGIONEN_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `RGN0WA` reader - Enable/disable write access watch in region\\[0\\]"]
38pub type RGN0WA_R = crate::BitReader<RGN0WA_A>;
39#[doc = "Enable/disable write access watch in region\\[0\\]\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq)]
41pub enum RGN0WA_A {
42 #[doc = "0: Disable write access watch in this region"]
43 DISABLE = 0,
44 #[doc = "1: Enable write access watch in this region"]
45 ENABLE = 1,
46}
47impl From<RGN0WA_A> for bool {
48 #[inline(always)]
49 fn from(variant: RGN0WA_A) -> Self {
50 variant as u8 != 0
51 }
52}
53impl RGN0WA_R {
54 #[doc = "Get enumerated values variant"]
55 #[inline(always)]
56 pub fn variant(&self) -> RGN0WA_A {
57 match self.bits {
58 false => RGN0WA_A::DISABLE,
59 true => RGN0WA_A::ENABLE,
60 }
61 }
62 #[doc = "Checks if the value of the field is `DISABLE`"]
63 #[inline(always)]
64 pub fn is_disable(&self) -> bool {
65 *self == RGN0WA_A::DISABLE
66 }
67 #[doc = "Checks if the value of the field is `ENABLE`"]
68 #[inline(always)]
69 pub fn is_enable(&self) -> bool {
70 *self == RGN0WA_A::ENABLE
71 }
72}
73#[doc = "Field `RGN0WA` writer - Enable/disable write access watch in region\\[0\\]"]
74pub type RGN0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, RGN0WA_A, O>;
75impl<'a, const O: u8> RGN0WA_W<'a, O> {
76 #[doc = "Disable write access watch in this region"]
77 #[inline(always)]
78 pub fn disable(self) -> &'a mut W {
79 self.variant(RGN0WA_A::DISABLE)
80 }
81 #[doc = "Enable write access watch in this region"]
82 #[inline(always)]
83 pub fn enable(self) -> &'a mut W {
84 self.variant(RGN0WA_A::ENABLE)
85 }
86}
87#[doc = "Field `RGN0RA` reader - Enable/disable read access watch in region\\[0\\]"]
88pub type RGN0RA_R = crate::BitReader<RGN0RA_A>;
89#[doc = "Enable/disable read access watch in region\\[0\\]\n\nValue on reset: 0"]
90#[derive(Clone, Copy, Debug, PartialEq)]
91pub enum RGN0RA_A {
92 #[doc = "0: Disable read access watch in this region"]
93 DISABLE = 0,
94 #[doc = "1: Enable read access watch in this region"]
95 ENABLE = 1,
96}
97impl From<RGN0RA_A> for bool {
98 #[inline(always)]
99 fn from(variant: RGN0RA_A) -> Self {
100 variant as u8 != 0
101 }
102}
103impl RGN0RA_R {
104 #[doc = "Get enumerated values variant"]
105 #[inline(always)]
106 pub fn variant(&self) -> RGN0RA_A {
107 match self.bits {
108 false => RGN0RA_A::DISABLE,
109 true => RGN0RA_A::ENABLE,
110 }
111 }
112 #[doc = "Checks if the value of the field is `DISABLE`"]
113 #[inline(always)]
114 pub fn is_disable(&self) -> bool {
115 *self == RGN0RA_A::DISABLE
116 }
117 #[doc = "Checks if the value of the field is `ENABLE`"]
118 #[inline(always)]
119 pub fn is_enable(&self) -> bool {
120 *self == RGN0RA_A::ENABLE
121 }
122}
123#[doc = "Field `RGN0RA` writer - Enable/disable read access watch in region\\[0\\]"]
124pub type RGN0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, RGN0RA_A, O>;
125impl<'a, const O: u8> RGN0RA_W<'a, O> {
126 #[doc = "Disable read access watch in this region"]
127 #[inline(always)]
128 pub fn disable(self) -> &'a mut W {
129 self.variant(RGN0RA_A::DISABLE)
130 }
131 #[doc = "Enable read access watch in this region"]
132 #[inline(always)]
133 pub fn enable(self) -> &'a mut W {
134 self.variant(RGN0RA_A::ENABLE)
135 }
136}
137#[doc = "Field `RGN1WA` reader - Enable/disable write access watch in region\\[1\\]"]
138pub type RGN1WA_R = crate::BitReader<RGN1WA_A>;
139#[doc = "Enable/disable write access watch in region\\[1\\]\n\nValue on reset: 0"]
140#[derive(Clone, Copy, Debug, PartialEq)]
141pub enum RGN1WA_A {
142 #[doc = "0: Disable write access watch in this region"]
143 DISABLE = 0,
144 #[doc = "1: Enable write access watch in this region"]
145 ENABLE = 1,
146}
147impl From<RGN1WA_A> for bool {
148 #[inline(always)]
149 fn from(variant: RGN1WA_A) -> Self {
150 variant as u8 != 0
151 }
152}
153impl RGN1WA_R {
154 #[doc = "Get enumerated values variant"]
155 #[inline(always)]
156 pub fn variant(&self) -> RGN1WA_A {
157 match self.bits {
158 false => RGN1WA_A::DISABLE,
159 true => RGN1WA_A::ENABLE,
160 }
161 }
162 #[doc = "Checks if the value of the field is `DISABLE`"]
163 #[inline(always)]
164 pub fn is_disable(&self) -> bool {
165 *self == RGN1WA_A::DISABLE
166 }
167 #[doc = "Checks if the value of the field is `ENABLE`"]
168 #[inline(always)]
169 pub fn is_enable(&self) -> bool {
170 *self == RGN1WA_A::ENABLE
171 }
172}
173#[doc = "Field `RGN1WA` writer - Enable/disable write access watch in region\\[1\\]"]
174pub type RGN1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, RGN1WA_A, O>;
175impl<'a, const O: u8> RGN1WA_W<'a, O> {
176 #[doc = "Disable write access watch in this region"]
177 #[inline(always)]
178 pub fn disable(self) -> &'a mut W {
179 self.variant(RGN1WA_A::DISABLE)
180 }
181 #[doc = "Enable write access watch in this region"]
182 #[inline(always)]
183 pub fn enable(self) -> &'a mut W {
184 self.variant(RGN1WA_A::ENABLE)
185 }
186}
187#[doc = "Field `RGN1RA` reader - Enable/disable read access watch in region\\[1\\]"]
188pub type RGN1RA_R = crate::BitReader<RGN1RA_A>;
189#[doc = "Enable/disable read access watch in region\\[1\\]\n\nValue on reset: 0"]
190#[derive(Clone, Copy, Debug, PartialEq)]
191pub enum RGN1RA_A {
192 #[doc = "0: Disable read access watch in this region"]
193 DISABLE = 0,
194 #[doc = "1: Enable read access watch in this region"]
195 ENABLE = 1,
196}
197impl From<RGN1RA_A> for bool {
198 #[inline(always)]
199 fn from(variant: RGN1RA_A) -> Self {
200 variant as u8 != 0
201 }
202}
203impl RGN1RA_R {
204 #[doc = "Get enumerated values variant"]
205 #[inline(always)]
206 pub fn variant(&self) -> RGN1RA_A {
207 match self.bits {
208 false => RGN1RA_A::DISABLE,
209 true => RGN1RA_A::ENABLE,
210 }
211 }
212 #[doc = "Checks if the value of the field is `DISABLE`"]
213 #[inline(always)]
214 pub fn is_disable(&self) -> bool {
215 *self == RGN1RA_A::DISABLE
216 }
217 #[doc = "Checks if the value of the field is `ENABLE`"]
218 #[inline(always)]
219 pub fn is_enable(&self) -> bool {
220 *self == RGN1RA_A::ENABLE
221 }
222}
223#[doc = "Field `RGN1RA` writer - Enable/disable read access watch in region\\[1\\]"]
224pub type RGN1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, RGN1RA_A, O>;
225impl<'a, const O: u8> RGN1RA_W<'a, O> {
226 #[doc = "Disable read access watch in this region"]
227 #[inline(always)]
228 pub fn disable(self) -> &'a mut W {
229 self.variant(RGN1RA_A::DISABLE)
230 }
231 #[doc = "Enable read access watch in this region"]
232 #[inline(always)]
233 pub fn enable(self) -> &'a mut W {
234 self.variant(RGN1RA_A::ENABLE)
235 }
236}
237#[doc = "Field `RGN2WA` reader - Enable/disable write access watch in region\\[2\\]"]
238pub type RGN2WA_R = crate::BitReader<RGN2WA_A>;
239#[doc = "Enable/disable write access watch in region\\[2\\]\n\nValue on reset: 0"]
240#[derive(Clone, Copy, Debug, PartialEq)]
241pub enum RGN2WA_A {
242 #[doc = "0: Disable write access watch in this region"]
243 DISABLE = 0,
244 #[doc = "1: Enable write access watch in this region"]
245 ENABLE = 1,
246}
247impl From<RGN2WA_A> for bool {
248 #[inline(always)]
249 fn from(variant: RGN2WA_A) -> Self {
250 variant as u8 != 0
251 }
252}
253impl RGN2WA_R {
254 #[doc = "Get enumerated values variant"]
255 #[inline(always)]
256 pub fn variant(&self) -> RGN2WA_A {
257 match self.bits {
258 false => RGN2WA_A::DISABLE,
259 true => RGN2WA_A::ENABLE,
260 }
261 }
262 #[doc = "Checks if the value of the field is `DISABLE`"]
263 #[inline(always)]
264 pub fn is_disable(&self) -> bool {
265 *self == RGN2WA_A::DISABLE
266 }
267 #[doc = "Checks if the value of the field is `ENABLE`"]
268 #[inline(always)]
269 pub fn is_enable(&self) -> bool {
270 *self == RGN2WA_A::ENABLE
271 }
272}
273#[doc = "Field `RGN2WA` writer - Enable/disable write access watch in region\\[2\\]"]
274pub type RGN2WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, RGN2WA_A, O>;
275impl<'a, const O: u8> RGN2WA_W<'a, O> {
276 #[doc = "Disable write access watch in this region"]
277 #[inline(always)]
278 pub fn disable(self) -> &'a mut W {
279 self.variant(RGN2WA_A::DISABLE)
280 }
281 #[doc = "Enable write access watch in this region"]
282 #[inline(always)]
283 pub fn enable(self) -> &'a mut W {
284 self.variant(RGN2WA_A::ENABLE)
285 }
286}
287#[doc = "Field `RGN2RA` reader - Enable/disable read access watch in region\\[2\\]"]
288pub type RGN2RA_R = crate::BitReader<RGN2RA_A>;
289#[doc = "Enable/disable read access watch in region\\[2\\]\n\nValue on reset: 0"]
290#[derive(Clone, Copy, Debug, PartialEq)]
291pub enum RGN2RA_A {
292 #[doc = "0: Disable read access watch in this region"]
293 DISABLE = 0,
294 #[doc = "1: Enable read access watch in this region"]
295 ENABLE = 1,
296}
297impl From<RGN2RA_A> for bool {
298 #[inline(always)]
299 fn from(variant: RGN2RA_A) -> Self {
300 variant as u8 != 0
301 }
302}
303impl RGN2RA_R {
304 #[doc = "Get enumerated values variant"]
305 #[inline(always)]
306 pub fn variant(&self) -> RGN2RA_A {
307 match self.bits {
308 false => RGN2RA_A::DISABLE,
309 true => RGN2RA_A::ENABLE,
310 }
311 }
312 #[doc = "Checks if the value of the field is `DISABLE`"]
313 #[inline(always)]
314 pub fn is_disable(&self) -> bool {
315 *self == RGN2RA_A::DISABLE
316 }
317 #[doc = "Checks if the value of the field is `ENABLE`"]
318 #[inline(always)]
319 pub fn is_enable(&self) -> bool {
320 *self == RGN2RA_A::ENABLE
321 }
322}
323#[doc = "Field `RGN2RA` writer - Enable/disable read access watch in region\\[2\\]"]
324pub type RGN2RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, RGN2RA_A, O>;
325impl<'a, const O: u8> RGN2RA_W<'a, O> {
326 #[doc = "Disable read access watch in this region"]
327 #[inline(always)]
328 pub fn disable(self) -> &'a mut W {
329 self.variant(RGN2RA_A::DISABLE)
330 }
331 #[doc = "Enable read access watch in this region"]
332 #[inline(always)]
333 pub fn enable(self) -> &'a mut W {
334 self.variant(RGN2RA_A::ENABLE)
335 }
336}
337#[doc = "Field `RGN3WA` reader - Enable/disable write access watch in region\\[3\\]"]
338pub type RGN3WA_R = crate::BitReader<RGN3WA_A>;
339#[doc = "Enable/disable write access watch in region\\[3\\]\n\nValue on reset: 0"]
340#[derive(Clone, Copy, Debug, PartialEq)]
341pub enum RGN3WA_A {
342 #[doc = "0: Disable write access watch in this region"]
343 DISABLE = 0,
344 #[doc = "1: Enable write access watch in this region"]
345 ENABLE = 1,
346}
347impl From<RGN3WA_A> for bool {
348 #[inline(always)]
349 fn from(variant: RGN3WA_A) -> Self {
350 variant as u8 != 0
351 }
352}
353impl RGN3WA_R {
354 #[doc = "Get enumerated values variant"]
355 #[inline(always)]
356 pub fn variant(&self) -> RGN3WA_A {
357 match self.bits {
358 false => RGN3WA_A::DISABLE,
359 true => RGN3WA_A::ENABLE,
360 }
361 }
362 #[doc = "Checks if the value of the field is `DISABLE`"]
363 #[inline(always)]
364 pub fn is_disable(&self) -> bool {
365 *self == RGN3WA_A::DISABLE
366 }
367 #[doc = "Checks if the value of the field is `ENABLE`"]
368 #[inline(always)]
369 pub fn is_enable(&self) -> bool {
370 *self == RGN3WA_A::ENABLE
371 }
372}
373#[doc = "Field `RGN3WA` writer - Enable/disable write access watch in region\\[3\\]"]
374pub type RGN3WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, RGN3WA_A, O>;
375impl<'a, const O: u8> RGN3WA_W<'a, O> {
376 #[doc = "Disable write access watch in this region"]
377 #[inline(always)]
378 pub fn disable(self) -> &'a mut W {
379 self.variant(RGN3WA_A::DISABLE)
380 }
381 #[doc = "Enable write access watch in this region"]
382 #[inline(always)]
383 pub fn enable(self) -> &'a mut W {
384 self.variant(RGN3WA_A::ENABLE)
385 }
386}
387#[doc = "Field `RGN3RA` reader - Enable/disable read access watch in region\\[3\\]"]
388pub type RGN3RA_R = crate::BitReader<RGN3RA_A>;
389#[doc = "Enable/disable read access watch in region\\[3\\]\n\nValue on reset: 0"]
390#[derive(Clone, Copy, Debug, PartialEq)]
391pub enum RGN3RA_A {
392 #[doc = "0: Disable read access watch in this region"]
393 DISABLE = 0,
394 #[doc = "1: Enable read access watch in this region"]
395 ENABLE = 1,
396}
397impl From<RGN3RA_A> for bool {
398 #[inline(always)]
399 fn from(variant: RGN3RA_A) -> Self {
400 variant as u8 != 0
401 }
402}
403impl RGN3RA_R {
404 #[doc = "Get enumerated values variant"]
405 #[inline(always)]
406 pub fn variant(&self) -> RGN3RA_A {
407 match self.bits {
408 false => RGN3RA_A::DISABLE,
409 true => RGN3RA_A::ENABLE,
410 }
411 }
412 #[doc = "Checks if the value of the field is `DISABLE`"]
413 #[inline(always)]
414 pub fn is_disable(&self) -> bool {
415 *self == RGN3RA_A::DISABLE
416 }
417 #[doc = "Checks if the value of the field is `ENABLE`"]
418 #[inline(always)]
419 pub fn is_enable(&self) -> bool {
420 *self == RGN3RA_A::ENABLE
421 }
422}
423#[doc = "Field `RGN3RA` writer - Enable/disable read access watch in region\\[3\\]"]
424pub type RGN3RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, RGN3RA_A, O>;
425impl<'a, const O: u8> RGN3RA_W<'a, O> {
426 #[doc = "Disable read access watch in this region"]
427 #[inline(always)]
428 pub fn disable(self) -> &'a mut W {
429 self.variant(RGN3RA_A::DISABLE)
430 }
431 #[doc = "Enable read access watch in this region"]
432 #[inline(always)]
433 pub fn enable(self) -> &'a mut W {
434 self.variant(RGN3RA_A::ENABLE)
435 }
436}
437#[doc = "Field `PRGN0WA` reader - Enable/disable write access watch in PREGION\\[0\\]"]
438pub type PRGN0WA_R = crate::BitReader<PRGN0WA_A>;
439#[doc = "Enable/disable write access watch in PREGION\\[0\\]\n\nValue on reset: 0"]
440#[derive(Clone, Copy, Debug, PartialEq)]
441pub enum PRGN0WA_A {
442 #[doc = "0: Disable write access watch in this PREGION"]
443 DISABLE = 0,
444 #[doc = "1: Enable write access watch in this PREGION"]
445 ENABLE = 1,
446}
447impl From<PRGN0WA_A> for bool {
448 #[inline(always)]
449 fn from(variant: PRGN0WA_A) -> Self {
450 variant as u8 != 0
451 }
452}
453impl PRGN0WA_R {
454 #[doc = "Get enumerated values variant"]
455 #[inline(always)]
456 pub fn variant(&self) -> PRGN0WA_A {
457 match self.bits {
458 false => PRGN0WA_A::DISABLE,
459 true => PRGN0WA_A::ENABLE,
460 }
461 }
462 #[doc = "Checks if the value of the field is `DISABLE`"]
463 #[inline(always)]
464 pub fn is_disable(&self) -> bool {
465 *self == PRGN0WA_A::DISABLE
466 }
467 #[doc = "Checks if the value of the field is `ENABLE`"]
468 #[inline(always)]
469 pub fn is_enable(&self) -> bool {
470 *self == PRGN0WA_A::ENABLE
471 }
472}
473#[doc = "Field `PRGN0WA` writer - Enable/disable write access watch in PREGION\\[0\\]"]
474pub type PRGN0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, PRGN0WA_A, O>;
475impl<'a, const O: u8> PRGN0WA_W<'a, O> {
476 #[doc = "Disable write access watch in this PREGION"]
477 #[inline(always)]
478 pub fn disable(self) -> &'a mut W {
479 self.variant(PRGN0WA_A::DISABLE)
480 }
481 #[doc = "Enable write access watch in this PREGION"]
482 #[inline(always)]
483 pub fn enable(self) -> &'a mut W {
484 self.variant(PRGN0WA_A::ENABLE)
485 }
486}
487#[doc = "Field `PRGN0RA` reader - Enable/disable read access watch in PREGION\\[0\\]"]
488pub type PRGN0RA_R = crate::BitReader<PRGN0RA_A>;
489#[doc = "Enable/disable read access watch in PREGION\\[0\\]\n\nValue on reset: 0"]
490#[derive(Clone, Copy, Debug, PartialEq)]
491pub enum PRGN0RA_A {
492 #[doc = "0: Disable read access watch in this PREGION"]
493 DISABLE = 0,
494 #[doc = "1: Enable read access watch in this PREGION"]
495 ENABLE = 1,
496}
497impl From<PRGN0RA_A> for bool {
498 #[inline(always)]
499 fn from(variant: PRGN0RA_A) -> Self {
500 variant as u8 != 0
501 }
502}
503impl PRGN0RA_R {
504 #[doc = "Get enumerated values variant"]
505 #[inline(always)]
506 pub fn variant(&self) -> PRGN0RA_A {
507 match self.bits {
508 false => PRGN0RA_A::DISABLE,
509 true => PRGN0RA_A::ENABLE,
510 }
511 }
512 #[doc = "Checks if the value of the field is `DISABLE`"]
513 #[inline(always)]
514 pub fn is_disable(&self) -> bool {
515 *self == PRGN0RA_A::DISABLE
516 }
517 #[doc = "Checks if the value of the field is `ENABLE`"]
518 #[inline(always)]
519 pub fn is_enable(&self) -> bool {
520 *self == PRGN0RA_A::ENABLE
521 }
522}
523#[doc = "Field `PRGN0RA` writer - Enable/disable read access watch in PREGION\\[0\\]"]
524pub type PRGN0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, PRGN0RA_A, O>;
525impl<'a, const O: u8> PRGN0RA_W<'a, O> {
526 #[doc = "Disable read access watch in this PREGION"]
527 #[inline(always)]
528 pub fn disable(self) -> &'a mut W {
529 self.variant(PRGN0RA_A::DISABLE)
530 }
531 #[doc = "Enable read access watch in this PREGION"]
532 #[inline(always)]
533 pub fn enable(self) -> &'a mut W {
534 self.variant(PRGN0RA_A::ENABLE)
535 }
536}
537#[doc = "Field `PRGN1WA` reader - Enable/disable write access watch in PREGION\\[1\\]"]
538pub type PRGN1WA_R = crate::BitReader<PRGN1WA_A>;
539#[doc = "Enable/disable write access watch in PREGION\\[1\\]\n\nValue on reset: 0"]
540#[derive(Clone, Copy, Debug, PartialEq)]
541pub enum PRGN1WA_A {
542 #[doc = "0: Disable write access watch in this PREGION"]
543 DISABLE = 0,
544 #[doc = "1: Enable write access watch in this PREGION"]
545 ENABLE = 1,
546}
547impl From<PRGN1WA_A> for bool {
548 #[inline(always)]
549 fn from(variant: PRGN1WA_A) -> Self {
550 variant as u8 != 0
551 }
552}
553impl PRGN1WA_R {
554 #[doc = "Get enumerated values variant"]
555 #[inline(always)]
556 pub fn variant(&self) -> PRGN1WA_A {
557 match self.bits {
558 false => PRGN1WA_A::DISABLE,
559 true => PRGN1WA_A::ENABLE,
560 }
561 }
562 #[doc = "Checks if the value of the field is `DISABLE`"]
563 #[inline(always)]
564 pub fn is_disable(&self) -> bool {
565 *self == PRGN1WA_A::DISABLE
566 }
567 #[doc = "Checks if the value of the field is `ENABLE`"]
568 #[inline(always)]
569 pub fn is_enable(&self) -> bool {
570 *self == PRGN1WA_A::ENABLE
571 }
572}
573#[doc = "Field `PRGN1WA` writer - Enable/disable write access watch in PREGION\\[1\\]"]
574pub type PRGN1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, PRGN1WA_A, O>;
575impl<'a, const O: u8> PRGN1WA_W<'a, O> {
576 #[doc = "Disable write access watch in this PREGION"]
577 #[inline(always)]
578 pub fn disable(self) -> &'a mut W {
579 self.variant(PRGN1WA_A::DISABLE)
580 }
581 #[doc = "Enable write access watch in this PREGION"]
582 #[inline(always)]
583 pub fn enable(self) -> &'a mut W {
584 self.variant(PRGN1WA_A::ENABLE)
585 }
586}
587#[doc = "Field `PRGN1RA` reader - Enable/disable read access watch in PREGION\\[1\\]"]
588pub type PRGN1RA_R = crate::BitReader<PRGN1RA_A>;
589#[doc = "Enable/disable read access watch in PREGION\\[1\\]\n\nValue on reset: 0"]
590#[derive(Clone, Copy, Debug, PartialEq)]
591pub enum PRGN1RA_A {
592 #[doc = "0: Disable read access watch in this PREGION"]
593 DISABLE = 0,
594 #[doc = "1: Enable read access watch in this PREGION"]
595 ENABLE = 1,
596}
597impl From<PRGN1RA_A> for bool {
598 #[inline(always)]
599 fn from(variant: PRGN1RA_A) -> Self {
600 variant as u8 != 0
601 }
602}
603impl PRGN1RA_R {
604 #[doc = "Get enumerated values variant"]
605 #[inline(always)]
606 pub fn variant(&self) -> PRGN1RA_A {
607 match self.bits {
608 false => PRGN1RA_A::DISABLE,
609 true => PRGN1RA_A::ENABLE,
610 }
611 }
612 #[doc = "Checks if the value of the field is `DISABLE`"]
613 #[inline(always)]
614 pub fn is_disable(&self) -> bool {
615 *self == PRGN1RA_A::DISABLE
616 }
617 #[doc = "Checks if the value of the field is `ENABLE`"]
618 #[inline(always)]
619 pub fn is_enable(&self) -> bool {
620 *self == PRGN1RA_A::ENABLE
621 }
622}
623#[doc = "Field `PRGN1RA` writer - Enable/disable read access watch in PREGION\\[1\\]"]
624pub type PRGN1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, PRGN1RA_A, O>;
625impl<'a, const O: u8> PRGN1RA_W<'a, O> {
626 #[doc = "Disable read access watch in this PREGION"]
627 #[inline(always)]
628 pub fn disable(self) -> &'a mut W {
629 self.variant(PRGN1RA_A::DISABLE)
630 }
631 #[doc = "Enable read access watch in this PREGION"]
632 #[inline(always)]
633 pub fn enable(self) -> &'a mut W {
634 self.variant(PRGN1RA_A::ENABLE)
635 }
636}
637impl R {
638 #[doc = "Bit 0 - Enable/disable write access watch in region\\[0\\]"]
639 #[inline(always)]
640 pub fn rgn0wa(&self) -> RGN0WA_R {
641 RGN0WA_R::new((self.bits & 1) != 0)
642 }
643 #[doc = "Bit 1 - Enable/disable read access watch in region\\[0\\]"]
644 #[inline(always)]
645 pub fn rgn0ra(&self) -> RGN0RA_R {
646 RGN0RA_R::new(((self.bits >> 1) & 1) != 0)
647 }
648 #[doc = "Bit 2 - Enable/disable write access watch in region\\[1\\]"]
649 #[inline(always)]
650 pub fn rgn1wa(&self) -> RGN1WA_R {
651 RGN1WA_R::new(((self.bits >> 2) & 1) != 0)
652 }
653 #[doc = "Bit 3 - Enable/disable read access watch in region\\[1\\]"]
654 #[inline(always)]
655 pub fn rgn1ra(&self) -> RGN1RA_R {
656 RGN1RA_R::new(((self.bits >> 3) & 1) != 0)
657 }
658 #[doc = "Bit 4 - Enable/disable write access watch in region\\[2\\]"]
659 #[inline(always)]
660 pub fn rgn2wa(&self) -> RGN2WA_R {
661 RGN2WA_R::new(((self.bits >> 4) & 1) != 0)
662 }
663 #[doc = "Bit 5 - Enable/disable read access watch in region\\[2\\]"]
664 #[inline(always)]
665 pub fn rgn2ra(&self) -> RGN2RA_R {
666 RGN2RA_R::new(((self.bits >> 5) & 1) != 0)
667 }
668 #[doc = "Bit 6 - Enable/disable write access watch in region\\[3\\]"]
669 #[inline(always)]
670 pub fn rgn3wa(&self) -> RGN3WA_R {
671 RGN3WA_R::new(((self.bits >> 6) & 1) != 0)
672 }
673 #[doc = "Bit 7 - Enable/disable read access watch in region\\[3\\]"]
674 #[inline(always)]
675 pub fn rgn3ra(&self) -> RGN3RA_R {
676 RGN3RA_R::new(((self.bits >> 7) & 1) != 0)
677 }
678 #[doc = "Bit 24 - Enable/disable write access watch in PREGION\\[0\\]"]
679 #[inline(always)]
680 pub fn prgn0wa(&self) -> PRGN0WA_R {
681 PRGN0WA_R::new(((self.bits >> 24) & 1) != 0)
682 }
683 #[doc = "Bit 25 - Enable/disable read access watch in PREGION\\[0\\]"]
684 #[inline(always)]
685 pub fn prgn0ra(&self) -> PRGN0RA_R {
686 PRGN0RA_R::new(((self.bits >> 25) & 1) != 0)
687 }
688 #[doc = "Bit 26 - Enable/disable write access watch in PREGION\\[1\\]"]
689 #[inline(always)]
690 pub fn prgn1wa(&self) -> PRGN1WA_R {
691 PRGN1WA_R::new(((self.bits >> 26) & 1) != 0)
692 }
693 #[doc = "Bit 27 - Enable/disable read access watch in PREGION\\[1\\]"]
694 #[inline(always)]
695 pub fn prgn1ra(&self) -> PRGN1RA_R {
696 PRGN1RA_R::new(((self.bits >> 27) & 1) != 0)
697 }
698}
699impl W {
700 #[doc = "Bit 0 - Enable/disable write access watch in region\\[0\\]"]
701 #[inline(always)]
702 pub fn rgn0wa(&mut self) -> RGN0WA_W<0> {
703 RGN0WA_W::new(self)
704 }
705 #[doc = "Bit 1 - Enable/disable read access watch in region\\[0\\]"]
706 #[inline(always)]
707 pub fn rgn0ra(&mut self) -> RGN0RA_W<1> {
708 RGN0RA_W::new(self)
709 }
710 #[doc = "Bit 2 - Enable/disable write access watch in region\\[1\\]"]
711 #[inline(always)]
712 pub fn rgn1wa(&mut self) -> RGN1WA_W<2> {
713 RGN1WA_W::new(self)
714 }
715 #[doc = "Bit 3 - Enable/disable read access watch in region\\[1\\]"]
716 #[inline(always)]
717 pub fn rgn1ra(&mut self) -> RGN1RA_W<3> {
718 RGN1RA_W::new(self)
719 }
720 #[doc = "Bit 4 - Enable/disable write access watch in region\\[2\\]"]
721 #[inline(always)]
722 pub fn rgn2wa(&mut self) -> RGN2WA_W<4> {
723 RGN2WA_W::new(self)
724 }
725 #[doc = "Bit 5 - Enable/disable read access watch in region\\[2\\]"]
726 #[inline(always)]
727 pub fn rgn2ra(&mut self) -> RGN2RA_W<5> {
728 RGN2RA_W::new(self)
729 }
730 #[doc = "Bit 6 - Enable/disable write access watch in region\\[3\\]"]
731 #[inline(always)]
732 pub fn rgn3wa(&mut self) -> RGN3WA_W<6> {
733 RGN3WA_W::new(self)
734 }
735 #[doc = "Bit 7 - Enable/disable read access watch in region\\[3\\]"]
736 #[inline(always)]
737 pub fn rgn3ra(&mut self) -> RGN3RA_W<7> {
738 RGN3RA_W::new(self)
739 }
740 #[doc = "Bit 24 - Enable/disable write access watch in PREGION\\[0\\]"]
741 #[inline(always)]
742 pub fn prgn0wa(&mut self) -> PRGN0WA_W<24> {
743 PRGN0WA_W::new(self)
744 }
745 #[doc = "Bit 25 - Enable/disable read access watch in PREGION\\[0\\]"]
746 #[inline(always)]
747 pub fn prgn0ra(&mut self) -> PRGN0RA_W<25> {
748 PRGN0RA_W::new(self)
749 }
750 #[doc = "Bit 26 - Enable/disable write access watch in PREGION\\[1\\]"]
751 #[inline(always)]
752 pub fn prgn1wa(&mut self) -> PRGN1WA_W<26> {
753 PRGN1WA_W::new(self)
754 }
755 #[doc = "Bit 27 - Enable/disable read access watch in PREGION\\[1\\]"]
756 #[inline(always)]
757 pub fn prgn1ra(&mut self) -> PRGN1RA_W<27> {
758 PRGN1RA_W::new(self)
759 }
760 #[doc = "Writes raw bits to the register."]
761 #[inline(always)]
762 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
763 self.0.bits(bits);
764 self
765 }
766}
767#[doc = "Enable/disable regions watch\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [regionen](index.html) module"]
768pub struct REGIONEN_SPEC;
769impl crate::RegisterSpec for REGIONEN_SPEC {
770 type Ux = u32;
771}
772#[doc = "`read()` method returns [regionen::R](R) reader structure"]
773impl crate::Readable for REGIONEN_SPEC {
774 type Reader = R;
775}
776#[doc = "`write(|w| ..)` method takes [regionen::W](W) writer structure"]
777impl crate::Writable for REGIONEN_SPEC {
778 type Writer = W;
779}
780#[doc = "`reset()` method sets REGIONEN to value 0"]
781impl crate::Resettable for REGIONEN_SPEC {
782 #[inline(always)]
783 fn reset_value() -> Self::Ux {
784 0
785 }
786}