nrf52811_pac/bprot/
config1.rs

1#[doc = "Register `CONFIG1` reader"]
2pub struct R(crate::R<CONFIG1_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<CONFIG1_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<CONFIG1_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<CONFIG1_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `CONFIG1` writer"]
17pub struct W(crate::W<CONFIG1_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<CONFIG1_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<CONFIG1_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<CONFIG1_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `REGION32` reader - Enable protection for region 32. Write '0' has no effect."]
38pub type REGION32_R = crate::BitReader<REGION32_A>;
39#[doc = "Enable protection for region 32. Write '0' has no effect.\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq)]
41pub enum REGION32_A {
42    #[doc = "0: Protection disabled"]
43    DISABLED = 0,
44    #[doc = "1: Protection enabled"]
45    ENABLED = 1,
46}
47impl From<REGION32_A> for bool {
48    #[inline(always)]
49    fn from(variant: REGION32_A) -> Self {
50        variant as u8 != 0
51    }
52}
53impl REGION32_R {
54    #[doc = "Get enumerated values variant"]
55    #[inline(always)]
56    pub fn variant(&self) -> REGION32_A {
57        match self.bits {
58            false => REGION32_A::DISABLED,
59            true => REGION32_A::ENABLED,
60        }
61    }
62    #[doc = "Checks if the value of the field is `DISABLED`"]
63    #[inline(always)]
64    pub fn is_disabled(&self) -> bool {
65        *self == REGION32_A::DISABLED
66    }
67    #[doc = "Checks if the value of the field is `ENABLED`"]
68    #[inline(always)]
69    pub fn is_enabled(&self) -> bool {
70        *self == REGION32_A::ENABLED
71    }
72}
73#[doc = "Field `REGION32` writer - Enable protection for region 32. Write '0' has no effect."]
74pub type REGION32_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION32_A, O>;
75impl<'a, const O: u8> REGION32_W<'a, O> {
76    #[doc = "Protection disabled"]
77    #[inline(always)]
78    pub fn disabled(self) -> &'a mut W {
79        self.variant(REGION32_A::DISABLED)
80    }
81    #[doc = "Protection enabled"]
82    #[inline(always)]
83    pub fn enabled(self) -> &'a mut W {
84        self.variant(REGION32_A::ENABLED)
85    }
86}
87#[doc = "Field `REGION33` reader - Enable protection for region 33. Write '0' has no effect."]
88pub type REGION33_R = crate::BitReader<REGION33_A>;
89#[doc = "Enable protection for region 33. Write '0' has no effect.\n\nValue on reset: 0"]
90#[derive(Clone, Copy, Debug, PartialEq)]
91pub enum REGION33_A {
92    #[doc = "0: Protection disabled"]
93    DISABLED = 0,
94    #[doc = "1: Protection enabled"]
95    ENABLED = 1,
96}
97impl From<REGION33_A> for bool {
98    #[inline(always)]
99    fn from(variant: REGION33_A) -> Self {
100        variant as u8 != 0
101    }
102}
103impl REGION33_R {
104    #[doc = "Get enumerated values variant"]
105    #[inline(always)]
106    pub fn variant(&self) -> REGION33_A {
107        match self.bits {
108            false => REGION33_A::DISABLED,
109            true => REGION33_A::ENABLED,
110        }
111    }
112    #[doc = "Checks if the value of the field is `DISABLED`"]
113    #[inline(always)]
114    pub fn is_disabled(&self) -> bool {
115        *self == REGION33_A::DISABLED
116    }
117    #[doc = "Checks if the value of the field is `ENABLED`"]
118    #[inline(always)]
119    pub fn is_enabled(&self) -> bool {
120        *self == REGION33_A::ENABLED
121    }
122}
123#[doc = "Field `REGION33` writer - Enable protection for region 33. Write '0' has no effect."]
124pub type REGION33_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION33_A, O>;
125impl<'a, const O: u8> REGION33_W<'a, O> {
126    #[doc = "Protection disabled"]
127    #[inline(always)]
128    pub fn disabled(self) -> &'a mut W {
129        self.variant(REGION33_A::DISABLED)
130    }
131    #[doc = "Protection enabled"]
132    #[inline(always)]
133    pub fn enabled(self) -> &'a mut W {
134        self.variant(REGION33_A::ENABLED)
135    }
136}
137#[doc = "Field `REGION34` reader - Enable protection for region 34. Write '0' has no effect."]
138pub type REGION34_R = crate::BitReader<REGION34_A>;
139#[doc = "Enable protection for region 34. Write '0' has no effect.\n\nValue on reset: 0"]
140#[derive(Clone, Copy, Debug, PartialEq)]
141pub enum REGION34_A {
142    #[doc = "0: Protection disabled"]
143    DISABLED = 0,
144    #[doc = "1: Protection enabled"]
145    ENABLED = 1,
146}
147impl From<REGION34_A> for bool {
148    #[inline(always)]
149    fn from(variant: REGION34_A) -> Self {
150        variant as u8 != 0
151    }
152}
153impl REGION34_R {
154    #[doc = "Get enumerated values variant"]
155    #[inline(always)]
156    pub fn variant(&self) -> REGION34_A {
157        match self.bits {
158            false => REGION34_A::DISABLED,
159            true => REGION34_A::ENABLED,
160        }
161    }
162    #[doc = "Checks if the value of the field is `DISABLED`"]
163    #[inline(always)]
164    pub fn is_disabled(&self) -> bool {
165        *self == REGION34_A::DISABLED
166    }
167    #[doc = "Checks if the value of the field is `ENABLED`"]
168    #[inline(always)]
169    pub fn is_enabled(&self) -> bool {
170        *self == REGION34_A::ENABLED
171    }
172}
173#[doc = "Field `REGION34` writer - Enable protection for region 34. Write '0' has no effect."]
174pub type REGION34_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION34_A, O>;
175impl<'a, const O: u8> REGION34_W<'a, O> {
176    #[doc = "Protection disabled"]
177    #[inline(always)]
178    pub fn disabled(self) -> &'a mut W {
179        self.variant(REGION34_A::DISABLED)
180    }
181    #[doc = "Protection enabled"]
182    #[inline(always)]
183    pub fn enabled(self) -> &'a mut W {
184        self.variant(REGION34_A::ENABLED)
185    }
186}
187#[doc = "Field `REGION35` reader - Enable protection for region 35. Write '0' has no effect."]
188pub type REGION35_R = crate::BitReader<REGION35_A>;
189#[doc = "Enable protection for region 35. Write '0' has no effect.\n\nValue on reset: 0"]
190#[derive(Clone, Copy, Debug, PartialEq)]
191pub enum REGION35_A {
192    #[doc = "0: Protection disabled"]
193    DISABLED = 0,
194    #[doc = "1: Protection enabled"]
195    ENABLED = 1,
196}
197impl From<REGION35_A> for bool {
198    #[inline(always)]
199    fn from(variant: REGION35_A) -> Self {
200        variant as u8 != 0
201    }
202}
203impl REGION35_R {
204    #[doc = "Get enumerated values variant"]
205    #[inline(always)]
206    pub fn variant(&self) -> REGION35_A {
207        match self.bits {
208            false => REGION35_A::DISABLED,
209            true => REGION35_A::ENABLED,
210        }
211    }
212    #[doc = "Checks if the value of the field is `DISABLED`"]
213    #[inline(always)]
214    pub fn is_disabled(&self) -> bool {
215        *self == REGION35_A::DISABLED
216    }
217    #[doc = "Checks if the value of the field is `ENABLED`"]
218    #[inline(always)]
219    pub fn is_enabled(&self) -> bool {
220        *self == REGION35_A::ENABLED
221    }
222}
223#[doc = "Field `REGION35` writer - Enable protection for region 35. Write '0' has no effect."]
224pub type REGION35_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION35_A, O>;
225impl<'a, const O: u8> REGION35_W<'a, O> {
226    #[doc = "Protection disabled"]
227    #[inline(always)]
228    pub fn disabled(self) -> &'a mut W {
229        self.variant(REGION35_A::DISABLED)
230    }
231    #[doc = "Protection enabled"]
232    #[inline(always)]
233    pub fn enabled(self) -> &'a mut W {
234        self.variant(REGION35_A::ENABLED)
235    }
236}
237#[doc = "Field `REGION36` reader - Enable protection for region 36. Write '0' has no effect."]
238pub type REGION36_R = crate::BitReader<REGION36_A>;
239#[doc = "Enable protection for region 36. Write '0' has no effect.\n\nValue on reset: 0"]
240#[derive(Clone, Copy, Debug, PartialEq)]
241pub enum REGION36_A {
242    #[doc = "0: Protection disabled"]
243    DISABLED = 0,
244    #[doc = "1: Protection enabled"]
245    ENABLED = 1,
246}
247impl From<REGION36_A> for bool {
248    #[inline(always)]
249    fn from(variant: REGION36_A) -> Self {
250        variant as u8 != 0
251    }
252}
253impl REGION36_R {
254    #[doc = "Get enumerated values variant"]
255    #[inline(always)]
256    pub fn variant(&self) -> REGION36_A {
257        match self.bits {
258            false => REGION36_A::DISABLED,
259            true => REGION36_A::ENABLED,
260        }
261    }
262    #[doc = "Checks if the value of the field is `DISABLED`"]
263    #[inline(always)]
264    pub fn is_disabled(&self) -> bool {
265        *self == REGION36_A::DISABLED
266    }
267    #[doc = "Checks if the value of the field is `ENABLED`"]
268    #[inline(always)]
269    pub fn is_enabled(&self) -> bool {
270        *self == REGION36_A::ENABLED
271    }
272}
273#[doc = "Field `REGION36` writer - Enable protection for region 36. Write '0' has no effect."]
274pub type REGION36_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION36_A, O>;
275impl<'a, const O: u8> REGION36_W<'a, O> {
276    #[doc = "Protection disabled"]
277    #[inline(always)]
278    pub fn disabled(self) -> &'a mut W {
279        self.variant(REGION36_A::DISABLED)
280    }
281    #[doc = "Protection enabled"]
282    #[inline(always)]
283    pub fn enabled(self) -> &'a mut W {
284        self.variant(REGION36_A::ENABLED)
285    }
286}
287#[doc = "Field `REGION37` reader - Enable protection for region 37. Write '0' has no effect."]
288pub type REGION37_R = crate::BitReader<REGION37_A>;
289#[doc = "Enable protection for region 37. Write '0' has no effect.\n\nValue on reset: 0"]
290#[derive(Clone, Copy, Debug, PartialEq)]
291pub enum REGION37_A {
292    #[doc = "0: Protection disabled"]
293    DISABLED = 0,
294    #[doc = "1: Protection enabled"]
295    ENABLED = 1,
296}
297impl From<REGION37_A> for bool {
298    #[inline(always)]
299    fn from(variant: REGION37_A) -> Self {
300        variant as u8 != 0
301    }
302}
303impl REGION37_R {
304    #[doc = "Get enumerated values variant"]
305    #[inline(always)]
306    pub fn variant(&self) -> REGION37_A {
307        match self.bits {
308            false => REGION37_A::DISABLED,
309            true => REGION37_A::ENABLED,
310        }
311    }
312    #[doc = "Checks if the value of the field is `DISABLED`"]
313    #[inline(always)]
314    pub fn is_disabled(&self) -> bool {
315        *self == REGION37_A::DISABLED
316    }
317    #[doc = "Checks if the value of the field is `ENABLED`"]
318    #[inline(always)]
319    pub fn is_enabled(&self) -> bool {
320        *self == REGION37_A::ENABLED
321    }
322}
323#[doc = "Field `REGION37` writer - Enable protection for region 37. Write '0' has no effect."]
324pub type REGION37_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION37_A, O>;
325impl<'a, const O: u8> REGION37_W<'a, O> {
326    #[doc = "Protection disabled"]
327    #[inline(always)]
328    pub fn disabled(self) -> &'a mut W {
329        self.variant(REGION37_A::DISABLED)
330    }
331    #[doc = "Protection enabled"]
332    #[inline(always)]
333    pub fn enabled(self) -> &'a mut W {
334        self.variant(REGION37_A::ENABLED)
335    }
336}
337#[doc = "Field `REGION38` reader - Enable protection for region 38. Write '0' has no effect."]
338pub type REGION38_R = crate::BitReader<REGION38_A>;
339#[doc = "Enable protection for region 38. Write '0' has no effect.\n\nValue on reset: 0"]
340#[derive(Clone, Copy, Debug, PartialEq)]
341pub enum REGION38_A {
342    #[doc = "0: Protection disabled"]
343    DISABLED = 0,
344    #[doc = "1: Protection enabled"]
345    ENABLED = 1,
346}
347impl From<REGION38_A> for bool {
348    #[inline(always)]
349    fn from(variant: REGION38_A) -> Self {
350        variant as u8 != 0
351    }
352}
353impl REGION38_R {
354    #[doc = "Get enumerated values variant"]
355    #[inline(always)]
356    pub fn variant(&self) -> REGION38_A {
357        match self.bits {
358            false => REGION38_A::DISABLED,
359            true => REGION38_A::ENABLED,
360        }
361    }
362    #[doc = "Checks if the value of the field is `DISABLED`"]
363    #[inline(always)]
364    pub fn is_disabled(&self) -> bool {
365        *self == REGION38_A::DISABLED
366    }
367    #[doc = "Checks if the value of the field is `ENABLED`"]
368    #[inline(always)]
369    pub fn is_enabled(&self) -> bool {
370        *self == REGION38_A::ENABLED
371    }
372}
373#[doc = "Field `REGION38` writer - Enable protection for region 38. Write '0' has no effect."]
374pub type REGION38_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION38_A, O>;
375impl<'a, const O: u8> REGION38_W<'a, O> {
376    #[doc = "Protection disabled"]
377    #[inline(always)]
378    pub fn disabled(self) -> &'a mut W {
379        self.variant(REGION38_A::DISABLED)
380    }
381    #[doc = "Protection enabled"]
382    #[inline(always)]
383    pub fn enabled(self) -> &'a mut W {
384        self.variant(REGION38_A::ENABLED)
385    }
386}
387#[doc = "Field `REGION39` reader - Enable protection for region 39. Write '0' has no effect."]
388pub type REGION39_R = crate::BitReader<REGION39_A>;
389#[doc = "Enable protection for region 39. Write '0' has no effect.\n\nValue on reset: 0"]
390#[derive(Clone, Copy, Debug, PartialEq)]
391pub enum REGION39_A {
392    #[doc = "0: Protection disabled"]
393    DISABLED = 0,
394    #[doc = "1: Protection enabled"]
395    ENABLED = 1,
396}
397impl From<REGION39_A> for bool {
398    #[inline(always)]
399    fn from(variant: REGION39_A) -> Self {
400        variant as u8 != 0
401    }
402}
403impl REGION39_R {
404    #[doc = "Get enumerated values variant"]
405    #[inline(always)]
406    pub fn variant(&self) -> REGION39_A {
407        match self.bits {
408            false => REGION39_A::DISABLED,
409            true => REGION39_A::ENABLED,
410        }
411    }
412    #[doc = "Checks if the value of the field is `DISABLED`"]
413    #[inline(always)]
414    pub fn is_disabled(&self) -> bool {
415        *self == REGION39_A::DISABLED
416    }
417    #[doc = "Checks if the value of the field is `ENABLED`"]
418    #[inline(always)]
419    pub fn is_enabled(&self) -> bool {
420        *self == REGION39_A::ENABLED
421    }
422}
423#[doc = "Field `REGION39` writer - Enable protection for region 39. Write '0' has no effect."]
424pub type REGION39_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION39_A, O>;
425impl<'a, const O: u8> REGION39_W<'a, O> {
426    #[doc = "Protection disabled"]
427    #[inline(always)]
428    pub fn disabled(self) -> &'a mut W {
429        self.variant(REGION39_A::DISABLED)
430    }
431    #[doc = "Protection enabled"]
432    #[inline(always)]
433    pub fn enabled(self) -> &'a mut W {
434        self.variant(REGION39_A::ENABLED)
435    }
436}
437#[doc = "Field `REGION40` reader - Enable protection for region 40. Write '0' has no effect."]
438pub type REGION40_R = crate::BitReader<REGION40_A>;
439#[doc = "Enable protection for region 40. Write '0' has no effect.\n\nValue on reset: 0"]
440#[derive(Clone, Copy, Debug, PartialEq)]
441pub enum REGION40_A {
442    #[doc = "0: Protection disabled"]
443    DISABLED = 0,
444    #[doc = "1: Protection enabled"]
445    ENABLED = 1,
446}
447impl From<REGION40_A> for bool {
448    #[inline(always)]
449    fn from(variant: REGION40_A) -> Self {
450        variant as u8 != 0
451    }
452}
453impl REGION40_R {
454    #[doc = "Get enumerated values variant"]
455    #[inline(always)]
456    pub fn variant(&self) -> REGION40_A {
457        match self.bits {
458            false => REGION40_A::DISABLED,
459            true => REGION40_A::ENABLED,
460        }
461    }
462    #[doc = "Checks if the value of the field is `DISABLED`"]
463    #[inline(always)]
464    pub fn is_disabled(&self) -> bool {
465        *self == REGION40_A::DISABLED
466    }
467    #[doc = "Checks if the value of the field is `ENABLED`"]
468    #[inline(always)]
469    pub fn is_enabled(&self) -> bool {
470        *self == REGION40_A::ENABLED
471    }
472}
473#[doc = "Field `REGION40` writer - Enable protection for region 40. Write '0' has no effect."]
474pub type REGION40_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION40_A, O>;
475impl<'a, const O: u8> REGION40_W<'a, O> {
476    #[doc = "Protection disabled"]
477    #[inline(always)]
478    pub fn disabled(self) -> &'a mut W {
479        self.variant(REGION40_A::DISABLED)
480    }
481    #[doc = "Protection enabled"]
482    #[inline(always)]
483    pub fn enabled(self) -> &'a mut W {
484        self.variant(REGION40_A::ENABLED)
485    }
486}
487#[doc = "Field `REGION41` reader - Enable protection for region 41. Write '0' has no effect."]
488pub type REGION41_R = crate::BitReader<REGION41_A>;
489#[doc = "Enable protection for region 41. Write '0' has no effect.\n\nValue on reset: 0"]
490#[derive(Clone, Copy, Debug, PartialEq)]
491pub enum REGION41_A {
492    #[doc = "0: Protection disabled"]
493    DISABLED = 0,
494    #[doc = "1: Protection enabled"]
495    ENABLED = 1,
496}
497impl From<REGION41_A> for bool {
498    #[inline(always)]
499    fn from(variant: REGION41_A) -> Self {
500        variant as u8 != 0
501    }
502}
503impl REGION41_R {
504    #[doc = "Get enumerated values variant"]
505    #[inline(always)]
506    pub fn variant(&self) -> REGION41_A {
507        match self.bits {
508            false => REGION41_A::DISABLED,
509            true => REGION41_A::ENABLED,
510        }
511    }
512    #[doc = "Checks if the value of the field is `DISABLED`"]
513    #[inline(always)]
514    pub fn is_disabled(&self) -> bool {
515        *self == REGION41_A::DISABLED
516    }
517    #[doc = "Checks if the value of the field is `ENABLED`"]
518    #[inline(always)]
519    pub fn is_enabled(&self) -> bool {
520        *self == REGION41_A::ENABLED
521    }
522}
523#[doc = "Field `REGION41` writer - Enable protection for region 41. Write '0' has no effect."]
524pub type REGION41_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION41_A, O>;
525impl<'a, const O: u8> REGION41_W<'a, O> {
526    #[doc = "Protection disabled"]
527    #[inline(always)]
528    pub fn disabled(self) -> &'a mut W {
529        self.variant(REGION41_A::DISABLED)
530    }
531    #[doc = "Protection enabled"]
532    #[inline(always)]
533    pub fn enabled(self) -> &'a mut W {
534        self.variant(REGION41_A::ENABLED)
535    }
536}
537#[doc = "Field `REGION42` reader - Enable protection for region 42. Write '0' has no effect."]
538pub type REGION42_R = crate::BitReader<REGION42_A>;
539#[doc = "Enable protection for region 42. Write '0' has no effect.\n\nValue on reset: 0"]
540#[derive(Clone, Copy, Debug, PartialEq)]
541pub enum REGION42_A {
542    #[doc = "0: Protection disabled"]
543    DISABLED = 0,
544    #[doc = "1: Protection enabled"]
545    ENABLED = 1,
546}
547impl From<REGION42_A> for bool {
548    #[inline(always)]
549    fn from(variant: REGION42_A) -> Self {
550        variant as u8 != 0
551    }
552}
553impl REGION42_R {
554    #[doc = "Get enumerated values variant"]
555    #[inline(always)]
556    pub fn variant(&self) -> REGION42_A {
557        match self.bits {
558            false => REGION42_A::DISABLED,
559            true => REGION42_A::ENABLED,
560        }
561    }
562    #[doc = "Checks if the value of the field is `DISABLED`"]
563    #[inline(always)]
564    pub fn is_disabled(&self) -> bool {
565        *self == REGION42_A::DISABLED
566    }
567    #[doc = "Checks if the value of the field is `ENABLED`"]
568    #[inline(always)]
569    pub fn is_enabled(&self) -> bool {
570        *self == REGION42_A::ENABLED
571    }
572}
573#[doc = "Field `REGION42` writer - Enable protection for region 42. Write '0' has no effect."]
574pub type REGION42_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION42_A, O>;
575impl<'a, const O: u8> REGION42_W<'a, O> {
576    #[doc = "Protection disabled"]
577    #[inline(always)]
578    pub fn disabled(self) -> &'a mut W {
579        self.variant(REGION42_A::DISABLED)
580    }
581    #[doc = "Protection enabled"]
582    #[inline(always)]
583    pub fn enabled(self) -> &'a mut W {
584        self.variant(REGION42_A::ENABLED)
585    }
586}
587#[doc = "Field `REGION43` reader - Enable protection for region 43. Write '0' has no effect."]
588pub type REGION43_R = crate::BitReader<REGION43_A>;
589#[doc = "Enable protection for region 43. Write '0' has no effect.\n\nValue on reset: 0"]
590#[derive(Clone, Copy, Debug, PartialEq)]
591pub enum REGION43_A {
592    #[doc = "0: Protection disabled"]
593    DISABLED = 0,
594    #[doc = "1: Protection enabled"]
595    ENABLED = 1,
596}
597impl From<REGION43_A> for bool {
598    #[inline(always)]
599    fn from(variant: REGION43_A) -> Self {
600        variant as u8 != 0
601    }
602}
603impl REGION43_R {
604    #[doc = "Get enumerated values variant"]
605    #[inline(always)]
606    pub fn variant(&self) -> REGION43_A {
607        match self.bits {
608            false => REGION43_A::DISABLED,
609            true => REGION43_A::ENABLED,
610        }
611    }
612    #[doc = "Checks if the value of the field is `DISABLED`"]
613    #[inline(always)]
614    pub fn is_disabled(&self) -> bool {
615        *self == REGION43_A::DISABLED
616    }
617    #[doc = "Checks if the value of the field is `ENABLED`"]
618    #[inline(always)]
619    pub fn is_enabled(&self) -> bool {
620        *self == REGION43_A::ENABLED
621    }
622}
623#[doc = "Field `REGION43` writer - Enable protection for region 43. Write '0' has no effect."]
624pub type REGION43_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION43_A, O>;
625impl<'a, const O: u8> REGION43_W<'a, O> {
626    #[doc = "Protection disabled"]
627    #[inline(always)]
628    pub fn disabled(self) -> &'a mut W {
629        self.variant(REGION43_A::DISABLED)
630    }
631    #[doc = "Protection enabled"]
632    #[inline(always)]
633    pub fn enabled(self) -> &'a mut W {
634        self.variant(REGION43_A::ENABLED)
635    }
636}
637#[doc = "Field `REGION44` reader - Enable protection for region 44. Write '0' has no effect."]
638pub type REGION44_R = crate::BitReader<REGION44_A>;
639#[doc = "Enable protection for region 44. Write '0' has no effect.\n\nValue on reset: 0"]
640#[derive(Clone, Copy, Debug, PartialEq)]
641pub enum REGION44_A {
642    #[doc = "0: Protection disabled"]
643    DISABLED = 0,
644    #[doc = "1: Protection enabled"]
645    ENABLED = 1,
646}
647impl From<REGION44_A> for bool {
648    #[inline(always)]
649    fn from(variant: REGION44_A) -> Self {
650        variant as u8 != 0
651    }
652}
653impl REGION44_R {
654    #[doc = "Get enumerated values variant"]
655    #[inline(always)]
656    pub fn variant(&self) -> REGION44_A {
657        match self.bits {
658            false => REGION44_A::DISABLED,
659            true => REGION44_A::ENABLED,
660        }
661    }
662    #[doc = "Checks if the value of the field is `DISABLED`"]
663    #[inline(always)]
664    pub fn is_disabled(&self) -> bool {
665        *self == REGION44_A::DISABLED
666    }
667    #[doc = "Checks if the value of the field is `ENABLED`"]
668    #[inline(always)]
669    pub fn is_enabled(&self) -> bool {
670        *self == REGION44_A::ENABLED
671    }
672}
673#[doc = "Field `REGION44` writer - Enable protection for region 44. Write '0' has no effect."]
674pub type REGION44_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION44_A, O>;
675impl<'a, const O: u8> REGION44_W<'a, O> {
676    #[doc = "Protection disabled"]
677    #[inline(always)]
678    pub fn disabled(self) -> &'a mut W {
679        self.variant(REGION44_A::DISABLED)
680    }
681    #[doc = "Protection enabled"]
682    #[inline(always)]
683    pub fn enabled(self) -> &'a mut W {
684        self.variant(REGION44_A::ENABLED)
685    }
686}
687#[doc = "Field `REGION45` reader - Enable protection for region 45. Write '0' has no effect."]
688pub type REGION45_R = crate::BitReader<REGION45_A>;
689#[doc = "Enable protection for region 45. Write '0' has no effect.\n\nValue on reset: 0"]
690#[derive(Clone, Copy, Debug, PartialEq)]
691pub enum REGION45_A {
692    #[doc = "0: Protection disabled"]
693    DISABLED = 0,
694    #[doc = "1: Protection enabled"]
695    ENABLED = 1,
696}
697impl From<REGION45_A> for bool {
698    #[inline(always)]
699    fn from(variant: REGION45_A) -> Self {
700        variant as u8 != 0
701    }
702}
703impl REGION45_R {
704    #[doc = "Get enumerated values variant"]
705    #[inline(always)]
706    pub fn variant(&self) -> REGION45_A {
707        match self.bits {
708            false => REGION45_A::DISABLED,
709            true => REGION45_A::ENABLED,
710        }
711    }
712    #[doc = "Checks if the value of the field is `DISABLED`"]
713    #[inline(always)]
714    pub fn is_disabled(&self) -> bool {
715        *self == REGION45_A::DISABLED
716    }
717    #[doc = "Checks if the value of the field is `ENABLED`"]
718    #[inline(always)]
719    pub fn is_enabled(&self) -> bool {
720        *self == REGION45_A::ENABLED
721    }
722}
723#[doc = "Field `REGION45` writer - Enable protection for region 45. Write '0' has no effect."]
724pub type REGION45_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION45_A, O>;
725impl<'a, const O: u8> REGION45_W<'a, O> {
726    #[doc = "Protection disabled"]
727    #[inline(always)]
728    pub fn disabled(self) -> &'a mut W {
729        self.variant(REGION45_A::DISABLED)
730    }
731    #[doc = "Protection enabled"]
732    #[inline(always)]
733    pub fn enabled(self) -> &'a mut W {
734        self.variant(REGION45_A::ENABLED)
735    }
736}
737#[doc = "Field `REGION46` reader - Enable protection for region 46. Write '0' has no effect."]
738pub type REGION46_R = crate::BitReader<REGION46_A>;
739#[doc = "Enable protection for region 46. Write '0' has no effect.\n\nValue on reset: 0"]
740#[derive(Clone, Copy, Debug, PartialEq)]
741pub enum REGION46_A {
742    #[doc = "0: Protection disabled"]
743    DISABLED = 0,
744    #[doc = "1: Protection enabled"]
745    ENABLED = 1,
746}
747impl From<REGION46_A> for bool {
748    #[inline(always)]
749    fn from(variant: REGION46_A) -> Self {
750        variant as u8 != 0
751    }
752}
753impl REGION46_R {
754    #[doc = "Get enumerated values variant"]
755    #[inline(always)]
756    pub fn variant(&self) -> REGION46_A {
757        match self.bits {
758            false => REGION46_A::DISABLED,
759            true => REGION46_A::ENABLED,
760        }
761    }
762    #[doc = "Checks if the value of the field is `DISABLED`"]
763    #[inline(always)]
764    pub fn is_disabled(&self) -> bool {
765        *self == REGION46_A::DISABLED
766    }
767    #[doc = "Checks if the value of the field is `ENABLED`"]
768    #[inline(always)]
769    pub fn is_enabled(&self) -> bool {
770        *self == REGION46_A::ENABLED
771    }
772}
773#[doc = "Field `REGION46` writer - Enable protection for region 46. Write '0' has no effect."]
774pub type REGION46_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION46_A, O>;
775impl<'a, const O: u8> REGION46_W<'a, O> {
776    #[doc = "Protection disabled"]
777    #[inline(always)]
778    pub fn disabled(self) -> &'a mut W {
779        self.variant(REGION46_A::DISABLED)
780    }
781    #[doc = "Protection enabled"]
782    #[inline(always)]
783    pub fn enabled(self) -> &'a mut W {
784        self.variant(REGION46_A::ENABLED)
785    }
786}
787#[doc = "Field `REGION47` reader - Enable protection for region 47. Write '0' has no effect."]
788pub type REGION47_R = crate::BitReader<REGION47_A>;
789#[doc = "Enable protection for region 47. Write '0' has no effect.\n\nValue on reset: 0"]
790#[derive(Clone, Copy, Debug, PartialEq)]
791pub enum REGION47_A {
792    #[doc = "0: Protection disabled"]
793    DISABLED = 0,
794    #[doc = "1: Protection enabled"]
795    ENABLED = 1,
796}
797impl From<REGION47_A> for bool {
798    #[inline(always)]
799    fn from(variant: REGION47_A) -> Self {
800        variant as u8 != 0
801    }
802}
803impl REGION47_R {
804    #[doc = "Get enumerated values variant"]
805    #[inline(always)]
806    pub fn variant(&self) -> REGION47_A {
807        match self.bits {
808            false => REGION47_A::DISABLED,
809            true => REGION47_A::ENABLED,
810        }
811    }
812    #[doc = "Checks if the value of the field is `DISABLED`"]
813    #[inline(always)]
814    pub fn is_disabled(&self) -> bool {
815        *self == REGION47_A::DISABLED
816    }
817    #[doc = "Checks if the value of the field is `ENABLED`"]
818    #[inline(always)]
819    pub fn is_enabled(&self) -> bool {
820        *self == REGION47_A::ENABLED
821    }
822}
823#[doc = "Field `REGION47` writer - Enable protection for region 47. Write '0' has no effect."]
824pub type REGION47_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION47_A, O>;
825impl<'a, const O: u8> REGION47_W<'a, O> {
826    #[doc = "Protection disabled"]
827    #[inline(always)]
828    pub fn disabled(self) -> &'a mut W {
829        self.variant(REGION47_A::DISABLED)
830    }
831    #[doc = "Protection enabled"]
832    #[inline(always)]
833    pub fn enabled(self) -> &'a mut W {
834        self.variant(REGION47_A::ENABLED)
835    }
836}
837impl R {
838    #[doc = "Bit 0 - Enable protection for region 32. Write '0' has no effect."]
839    #[inline(always)]
840    pub fn region32(&self) -> REGION32_R {
841        REGION32_R::new((self.bits & 1) != 0)
842    }
843    #[doc = "Bit 1 - Enable protection for region 33. Write '0' has no effect."]
844    #[inline(always)]
845    pub fn region33(&self) -> REGION33_R {
846        REGION33_R::new(((self.bits >> 1) & 1) != 0)
847    }
848    #[doc = "Bit 2 - Enable protection for region 34. Write '0' has no effect."]
849    #[inline(always)]
850    pub fn region34(&self) -> REGION34_R {
851        REGION34_R::new(((self.bits >> 2) & 1) != 0)
852    }
853    #[doc = "Bit 3 - Enable protection for region 35. Write '0' has no effect."]
854    #[inline(always)]
855    pub fn region35(&self) -> REGION35_R {
856        REGION35_R::new(((self.bits >> 3) & 1) != 0)
857    }
858    #[doc = "Bit 4 - Enable protection for region 36. Write '0' has no effect."]
859    #[inline(always)]
860    pub fn region36(&self) -> REGION36_R {
861        REGION36_R::new(((self.bits >> 4) & 1) != 0)
862    }
863    #[doc = "Bit 5 - Enable protection for region 37. Write '0' has no effect."]
864    #[inline(always)]
865    pub fn region37(&self) -> REGION37_R {
866        REGION37_R::new(((self.bits >> 5) & 1) != 0)
867    }
868    #[doc = "Bit 6 - Enable protection for region 38. Write '0' has no effect."]
869    #[inline(always)]
870    pub fn region38(&self) -> REGION38_R {
871        REGION38_R::new(((self.bits >> 6) & 1) != 0)
872    }
873    #[doc = "Bit 7 - Enable protection for region 39. Write '0' has no effect."]
874    #[inline(always)]
875    pub fn region39(&self) -> REGION39_R {
876        REGION39_R::new(((self.bits >> 7) & 1) != 0)
877    }
878    #[doc = "Bit 8 - Enable protection for region 40. Write '0' has no effect."]
879    #[inline(always)]
880    pub fn region40(&self) -> REGION40_R {
881        REGION40_R::new(((self.bits >> 8) & 1) != 0)
882    }
883    #[doc = "Bit 9 - Enable protection for region 41. Write '0' has no effect."]
884    #[inline(always)]
885    pub fn region41(&self) -> REGION41_R {
886        REGION41_R::new(((self.bits >> 9) & 1) != 0)
887    }
888    #[doc = "Bit 10 - Enable protection for region 42. Write '0' has no effect."]
889    #[inline(always)]
890    pub fn region42(&self) -> REGION42_R {
891        REGION42_R::new(((self.bits >> 10) & 1) != 0)
892    }
893    #[doc = "Bit 11 - Enable protection for region 43. Write '0' has no effect."]
894    #[inline(always)]
895    pub fn region43(&self) -> REGION43_R {
896        REGION43_R::new(((self.bits >> 11) & 1) != 0)
897    }
898    #[doc = "Bit 12 - Enable protection for region 44. Write '0' has no effect."]
899    #[inline(always)]
900    pub fn region44(&self) -> REGION44_R {
901        REGION44_R::new(((self.bits >> 12) & 1) != 0)
902    }
903    #[doc = "Bit 13 - Enable protection for region 45. Write '0' has no effect."]
904    #[inline(always)]
905    pub fn region45(&self) -> REGION45_R {
906        REGION45_R::new(((self.bits >> 13) & 1) != 0)
907    }
908    #[doc = "Bit 14 - Enable protection for region 46. Write '0' has no effect."]
909    #[inline(always)]
910    pub fn region46(&self) -> REGION46_R {
911        REGION46_R::new(((self.bits >> 14) & 1) != 0)
912    }
913    #[doc = "Bit 15 - Enable protection for region 47. Write '0' has no effect."]
914    #[inline(always)]
915    pub fn region47(&self) -> REGION47_R {
916        REGION47_R::new(((self.bits >> 15) & 1) != 0)
917    }
918}
919impl W {
920    #[doc = "Bit 0 - Enable protection for region 32. Write '0' has no effect."]
921    #[inline(always)]
922    pub fn region32(&mut self) -> REGION32_W<0> {
923        REGION32_W::new(self)
924    }
925    #[doc = "Bit 1 - Enable protection for region 33. Write '0' has no effect."]
926    #[inline(always)]
927    pub fn region33(&mut self) -> REGION33_W<1> {
928        REGION33_W::new(self)
929    }
930    #[doc = "Bit 2 - Enable protection for region 34. Write '0' has no effect."]
931    #[inline(always)]
932    pub fn region34(&mut self) -> REGION34_W<2> {
933        REGION34_W::new(self)
934    }
935    #[doc = "Bit 3 - Enable protection for region 35. Write '0' has no effect."]
936    #[inline(always)]
937    pub fn region35(&mut self) -> REGION35_W<3> {
938        REGION35_W::new(self)
939    }
940    #[doc = "Bit 4 - Enable protection for region 36. Write '0' has no effect."]
941    #[inline(always)]
942    pub fn region36(&mut self) -> REGION36_W<4> {
943        REGION36_W::new(self)
944    }
945    #[doc = "Bit 5 - Enable protection for region 37. Write '0' has no effect."]
946    #[inline(always)]
947    pub fn region37(&mut self) -> REGION37_W<5> {
948        REGION37_W::new(self)
949    }
950    #[doc = "Bit 6 - Enable protection for region 38. Write '0' has no effect."]
951    #[inline(always)]
952    pub fn region38(&mut self) -> REGION38_W<6> {
953        REGION38_W::new(self)
954    }
955    #[doc = "Bit 7 - Enable protection for region 39. Write '0' has no effect."]
956    #[inline(always)]
957    pub fn region39(&mut self) -> REGION39_W<7> {
958        REGION39_W::new(self)
959    }
960    #[doc = "Bit 8 - Enable protection for region 40. Write '0' has no effect."]
961    #[inline(always)]
962    pub fn region40(&mut self) -> REGION40_W<8> {
963        REGION40_W::new(self)
964    }
965    #[doc = "Bit 9 - Enable protection for region 41. Write '0' has no effect."]
966    #[inline(always)]
967    pub fn region41(&mut self) -> REGION41_W<9> {
968        REGION41_W::new(self)
969    }
970    #[doc = "Bit 10 - Enable protection for region 42. Write '0' has no effect."]
971    #[inline(always)]
972    pub fn region42(&mut self) -> REGION42_W<10> {
973        REGION42_W::new(self)
974    }
975    #[doc = "Bit 11 - Enable protection for region 43. Write '0' has no effect."]
976    #[inline(always)]
977    pub fn region43(&mut self) -> REGION43_W<11> {
978        REGION43_W::new(self)
979    }
980    #[doc = "Bit 12 - Enable protection for region 44. Write '0' has no effect."]
981    #[inline(always)]
982    pub fn region44(&mut self) -> REGION44_W<12> {
983        REGION44_W::new(self)
984    }
985    #[doc = "Bit 13 - Enable protection for region 45. Write '0' has no effect."]
986    #[inline(always)]
987    pub fn region45(&mut self) -> REGION45_W<13> {
988        REGION45_W::new(self)
989    }
990    #[doc = "Bit 14 - Enable protection for region 46. Write '0' has no effect."]
991    #[inline(always)]
992    pub fn region46(&mut self) -> REGION46_W<14> {
993        REGION46_W::new(self)
994    }
995    #[doc = "Bit 15 - Enable protection for region 47. Write '0' has no effect."]
996    #[inline(always)]
997    pub fn region47(&mut self) -> REGION47_W<15> {
998        REGION47_W::new(self)
999    }
1000    #[doc = "Writes raw bits to the register."]
1001    #[inline(always)]
1002    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1003        self.0.bits(bits);
1004        self
1005    }
1006}
1007#[doc = "Block protect configuration register 1\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 [config1](index.html) module"]
1008pub struct CONFIG1_SPEC;
1009impl crate::RegisterSpec for CONFIG1_SPEC {
1010    type Ux = u32;
1011}
1012#[doc = "`read()` method returns [config1::R](R) reader structure"]
1013impl crate::Readable for CONFIG1_SPEC {
1014    type Reader = R;
1015}
1016#[doc = "`write(|w| ..)` method takes [config1::W](W) writer structure"]
1017impl crate::Writable for CONFIG1_SPEC {
1018    type Writer = W;
1019}
1020#[doc = "`reset()` method sets CONFIG1 to value 0"]
1021impl crate::Resettable for CONFIG1_SPEC {
1022    #[inline(always)]
1023    fn reset_value() -> Self::Ux {
1024        0
1025    }
1026}