lpc55_pac/ahb_secure_ctrl/
sec_ctrl_apb_bridge1_mem_ctrl3.rs

1#[doc = "Register `SEC_CTRL_APB_BRIDGE1_MEM_CTRL3` reader"]
2pub struct R(crate::R<SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `SEC_CTRL_APB_BRIDGE1_MEM_CTRL3` writer"]
17pub struct W(crate::W<SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_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<SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "USB High Speed Phy controller\n\nValue on reset: 0"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39#[repr(u8)]
40pub enum USBHPHY_RULE_A {
41    #[doc = "0: Non-secure and Non-priviledge user access allowed."]
42    ENUM_NS_NP = 0,
43    #[doc = "1: Non-secure and Privilege access allowed."]
44    ENUM_NS_P = 1,
45    #[doc = "2: Secure and Non-priviledge user access allowed."]
46    ENUM_S_NP = 2,
47    #[doc = "3: Secure and Priviledge user access allowed."]
48    ENUM_S_P = 3,
49}
50impl From<USBHPHY_RULE_A> for u8 {
51    #[inline(always)]
52    fn from(variant: USBHPHY_RULE_A) -> Self {
53        variant as _
54    }
55}
56#[doc = "Field `USBHPHY_RULE` reader - USB High Speed Phy controller"]
57pub struct USBHPHY_RULE_R(crate::FieldReader<u8, USBHPHY_RULE_A>);
58impl USBHPHY_RULE_R {
59    #[inline(always)]
60    pub(crate) fn new(bits: u8) -> Self {
61        USBHPHY_RULE_R(crate::FieldReader::new(bits))
62    }
63    #[doc = r"Get enumerated values variant"]
64    #[inline(always)]
65    pub fn variant(&self) -> USBHPHY_RULE_A {
66        match self.bits {
67            0 => USBHPHY_RULE_A::ENUM_NS_NP,
68            1 => USBHPHY_RULE_A::ENUM_NS_P,
69            2 => USBHPHY_RULE_A::ENUM_S_NP,
70            3 => USBHPHY_RULE_A::ENUM_S_P,
71            _ => unreachable!(),
72        }
73    }
74    #[doc = "Checks if the value of the field is `ENUM_NS_NP`"]
75    #[inline(always)]
76    pub fn is_enum_ns_np(&self) -> bool {
77        **self == USBHPHY_RULE_A::ENUM_NS_NP
78    }
79    #[doc = "Checks if the value of the field is `ENUM_NS_P`"]
80    #[inline(always)]
81    pub fn is_enum_ns_p(&self) -> bool {
82        **self == USBHPHY_RULE_A::ENUM_NS_P
83    }
84    #[doc = "Checks if the value of the field is `ENUM_S_NP`"]
85    #[inline(always)]
86    pub fn is_enum_s_np(&self) -> bool {
87        **self == USBHPHY_RULE_A::ENUM_S_NP
88    }
89    #[doc = "Checks if the value of the field is `ENUM_S_P`"]
90    #[inline(always)]
91    pub fn is_enum_s_p(&self) -> bool {
92        **self == USBHPHY_RULE_A::ENUM_S_P
93    }
94}
95impl core::ops::Deref for USBHPHY_RULE_R {
96    type Target = crate::FieldReader<u8, USBHPHY_RULE_A>;
97    #[inline(always)]
98    fn deref(&self) -> &Self::Target {
99        &self.0
100    }
101}
102#[doc = "Field `USBHPHY_RULE` writer - USB High Speed Phy controller"]
103pub struct USBHPHY_RULE_W<'a> {
104    w: &'a mut W,
105}
106impl<'a> USBHPHY_RULE_W<'a> {
107    #[doc = r"Writes `variant` to the field"]
108    #[inline(always)]
109    pub fn variant(self, variant: USBHPHY_RULE_A) -> &'a mut W {
110        self.bits(variant.into())
111    }
112    #[doc = "Non-secure and Non-priviledge user access allowed."]
113    #[inline(always)]
114    pub fn enum_ns_np(self) -> &'a mut W {
115        self.variant(USBHPHY_RULE_A::ENUM_NS_NP)
116    }
117    #[doc = "Non-secure and Privilege access allowed."]
118    #[inline(always)]
119    pub fn enum_ns_p(self) -> &'a mut W {
120        self.variant(USBHPHY_RULE_A::ENUM_NS_P)
121    }
122    #[doc = "Secure and Non-priviledge user access allowed."]
123    #[inline(always)]
124    pub fn enum_s_np(self) -> &'a mut W {
125        self.variant(USBHPHY_RULE_A::ENUM_S_NP)
126    }
127    #[doc = "Secure and Priviledge user access allowed."]
128    #[inline(always)]
129    pub fn enum_s_p(self) -> &'a mut W {
130        self.variant(USBHPHY_RULE_A::ENUM_S_P)
131    }
132    #[doc = r"Writes raw bits to the field"]
133    #[inline(always)]
134    pub fn bits(self, value: u8) -> &'a mut W {
135        self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03);
136        self.w
137    }
138}
139#[doc = "True Random Number Generator\n\nValue on reset: 0"]
140#[derive(Clone, Copy, Debug, PartialEq)]
141#[repr(u8)]
142pub enum RNG_RULE_A {
143    #[doc = "0: Non-secure and Non-priviledge user access allowed."]
144    ENUM_NS_NP = 0,
145    #[doc = "1: Non-secure and Privilege access allowed."]
146    ENUM_NS_P = 1,
147    #[doc = "2: Secure and Non-priviledge user access allowed."]
148    ENUM_S_NP = 2,
149    #[doc = "3: Secure and Priviledge user access allowed."]
150    ENUM_S_P = 3,
151}
152impl From<RNG_RULE_A> for u8 {
153    #[inline(always)]
154    fn from(variant: RNG_RULE_A) -> Self {
155        variant as _
156    }
157}
158#[doc = "Field `RNG_RULE` reader - True Random Number Generator"]
159pub struct RNG_RULE_R(crate::FieldReader<u8, RNG_RULE_A>);
160impl RNG_RULE_R {
161    #[inline(always)]
162    pub(crate) fn new(bits: u8) -> Self {
163        RNG_RULE_R(crate::FieldReader::new(bits))
164    }
165    #[doc = r"Get enumerated values variant"]
166    #[inline(always)]
167    pub fn variant(&self) -> RNG_RULE_A {
168        match self.bits {
169            0 => RNG_RULE_A::ENUM_NS_NP,
170            1 => RNG_RULE_A::ENUM_NS_P,
171            2 => RNG_RULE_A::ENUM_S_NP,
172            3 => RNG_RULE_A::ENUM_S_P,
173            _ => unreachable!(),
174        }
175    }
176    #[doc = "Checks if the value of the field is `ENUM_NS_NP`"]
177    #[inline(always)]
178    pub fn is_enum_ns_np(&self) -> bool {
179        **self == RNG_RULE_A::ENUM_NS_NP
180    }
181    #[doc = "Checks if the value of the field is `ENUM_NS_P`"]
182    #[inline(always)]
183    pub fn is_enum_ns_p(&self) -> bool {
184        **self == RNG_RULE_A::ENUM_NS_P
185    }
186    #[doc = "Checks if the value of the field is `ENUM_S_NP`"]
187    #[inline(always)]
188    pub fn is_enum_s_np(&self) -> bool {
189        **self == RNG_RULE_A::ENUM_S_NP
190    }
191    #[doc = "Checks if the value of the field is `ENUM_S_P`"]
192    #[inline(always)]
193    pub fn is_enum_s_p(&self) -> bool {
194        **self == RNG_RULE_A::ENUM_S_P
195    }
196}
197impl core::ops::Deref for RNG_RULE_R {
198    type Target = crate::FieldReader<u8, RNG_RULE_A>;
199    #[inline(always)]
200    fn deref(&self) -> &Self::Target {
201        &self.0
202    }
203}
204#[doc = "Field `RNG_RULE` writer - True Random Number Generator"]
205pub struct RNG_RULE_W<'a> {
206    w: &'a mut W,
207}
208impl<'a> RNG_RULE_W<'a> {
209    #[doc = r"Writes `variant` to the field"]
210    #[inline(always)]
211    pub fn variant(self, variant: RNG_RULE_A) -> &'a mut W {
212        self.bits(variant.into())
213    }
214    #[doc = "Non-secure and Non-priviledge user access allowed."]
215    #[inline(always)]
216    pub fn enum_ns_np(self) -> &'a mut W {
217        self.variant(RNG_RULE_A::ENUM_NS_NP)
218    }
219    #[doc = "Non-secure and Privilege access allowed."]
220    #[inline(always)]
221    pub fn enum_ns_p(self) -> &'a mut W {
222        self.variant(RNG_RULE_A::ENUM_NS_P)
223    }
224    #[doc = "Secure and Non-priviledge user access allowed."]
225    #[inline(always)]
226    pub fn enum_s_np(self) -> &'a mut W {
227        self.variant(RNG_RULE_A::ENUM_S_NP)
228    }
229    #[doc = "Secure and Priviledge user access allowed."]
230    #[inline(always)]
231    pub fn enum_s_p(self) -> &'a mut W {
232        self.variant(RNG_RULE_A::ENUM_S_P)
233    }
234    #[doc = r"Writes raw bits to the field"]
235    #[inline(always)]
236    pub fn bits(self, value: u8) -> &'a mut W {
237        self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8);
238        self.w
239    }
240}
241#[doc = "PUF\n\nValue on reset: 0"]
242#[derive(Clone, Copy, Debug, PartialEq)]
243#[repr(u8)]
244pub enum PUF_RULE_A {
245    #[doc = "0: Non-secure and Non-priviledge user access allowed."]
246    ENUM_NS_NP = 0,
247    #[doc = "1: Non-secure and Privilege access allowed."]
248    ENUM_NS_P = 1,
249    #[doc = "2: Secure and Non-priviledge user access allowed."]
250    ENUM_S_NP = 2,
251    #[doc = "3: Secure and Priviledge user access allowed."]
252    ENUM_S_P = 3,
253}
254impl From<PUF_RULE_A> for u8 {
255    #[inline(always)]
256    fn from(variant: PUF_RULE_A) -> Self {
257        variant as _
258    }
259}
260#[doc = "Field `PUF_RULE` reader - PUF"]
261pub struct PUF_RULE_R(crate::FieldReader<u8, PUF_RULE_A>);
262impl PUF_RULE_R {
263    #[inline(always)]
264    pub(crate) fn new(bits: u8) -> Self {
265        PUF_RULE_R(crate::FieldReader::new(bits))
266    }
267    #[doc = r"Get enumerated values variant"]
268    #[inline(always)]
269    pub fn variant(&self) -> PUF_RULE_A {
270        match self.bits {
271            0 => PUF_RULE_A::ENUM_NS_NP,
272            1 => PUF_RULE_A::ENUM_NS_P,
273            2 => PUF_RULE_A::ENUM_S_NP,
274            3 => PUF_RULE_A::ENUM_S_P,
275            _ => unreachable!(),
276        }
277    }
278    #[doc = "Checks if the value of the field is `ENUM_NS_NP`"]
279    #[inline(always)]
280    pub fn is_enum_ns_np(&self) -> bool {
281        **self == PUF_RULE_A::ENUM_NS_NP
282    }
283    #[doc = "Checks if the value of the field is `ENUM_NS_P`"]
284    #[inline(always)]
285    pub fn is_enum_ns_p(&self) -> bool {
286        **self == PUF_RULE_A::ENUM_NS_P
287    }
288    #[doc = "Checks if the value of the field is `ENUM_S_NP`"]
289    #[inline(always)]
290    pub fn is_enum_s_np(&self) -> bool {
291        **self == PUF_RULE_A::ENUM_S_NP
292    }
293    #[doc = "Checks if the value of the field is `ENUM_S_P`"]
294    #[inline(always)]
295    pub fn is_enum_s_p(&self) -> bool {
296        **self == PUF_RULE_A::ENUM_S_P
297    }
298}
299impl core::ops::Deref for PUF_RULE_R {
300    type Target = crate::FieldReader<u8, PUF_RULE_A>;
301    #[inline(always)]
302    fn deref(&self) -> &Self::Target {
303        &self.0
304    }
305}
306#[doc = "Field `PUF_RULE` writer - PUF"]
307pub struct PUF_RULE_W<'a> {
308    w: &'a mut W,
309}
310impl<'a> PUF_RULE_W<'a> {
311    #[doc = r"Writes `variant` to the field"]
312    #[inline(always)]
313    pub fn variant(self, variant: PUF_RULE_A) -> &'a mut W {
314        self.bits(variant.into())
315    }
316    #[doc = "Non-secure and Non-priviledge user access allowed."]
317    #[inline(always)]
318    pub fn enum_ns_np(self) -> &'a mut W {
319        self.variant(PUF_RULE_A::ENUM_NS_NP)
320    }
321    #[doc = "Non-secure and Privilege access allowed."]
322    #[inline(always)]
323    pub fn enum_ns_p(self) -> &'a mut W {
324        self.variant(PUF_RULE_A::ENUM_NS_P)
325    }
326    #[doc = "Secure and Non-priviledge user access allowed."]
327    #[inline(always)]
328    pub fn enum_s_np(self) -> &'a mut W {
329        self.variant(PUF_RULE_A::ENUM_S_NP)
330    }
331    #[doc = "Secure and Priviledge user access allowed."]
332    #[inline(always)]
333    pub fn enum_s_p(self) -> &'a mut W {
334        self.variant(PUF_RULE_A::ENUM_S_P)
335    }
336    #[doc = r"Writes raw bits to the field"]
337    #[inline(always)]
338    pub fn bits(self, value: u8) -> &'a mut W {
339        self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12);
340        self.w
341    }
342}
343#[doc = "Programmable Look-Up logic\n\nValue on reset: 0"]
344#[derive(Clone, Copy, Debug, PartialEq)]
345#[repr(u8)]
346pub enum PLU_RULE_A {
347    #[doc = "0: Non-secure and Non-priviledge user access allowed."]
348    ENUM_NS_NP = 0,
349    #[doc = "1: Non-secure and Privilege access allowed."]
350    ENUM_NS_P = 1,
351    #[doc = "2: Secure and Non-priviledge user access allowed."]
352    ENUM_S_NP = 2,
353    #[doc = "3: Secure and Priviledge user access allowed."]
354    ENUM_S_P = 3,
355}
356impl From<PLU_RULE_A> for u8 {
357    #[inline(always)]
358    fn from(variant: PLU_RULE_A) -> Self {
359        variant as _
360    }
361}
362#[doc = "Field `PLU_RULE` reader - Programmable Look-Up logic"]
363pub struct PLU_RULE_R(crate::FieldReader<u8, PLU_RULE_A>);
364impl PLU_RULE_R {
365    #[inline(always)]
366    pub(crate) fn new(bits: u8) -> Self {
367        PLU_RULE_R(crate::FieldReader::new(bits))
368    }
369    #[doc = r"Get enumerated values variant"]
370    #[inline(always)]
371    pub fn variant(&self) -> PLU_RULE_A {
372        match self.bits {
373            0 => PLU_RULE_A::ENUM_NS_NP,
374            1 => PLU_RULE_A::ENUM_NS_P,
375            2 => PLU_RULE_A::ENUM_S_NP,
376            3 => PLU_RULE_A::ENUM_S_P,
377            _ => unreachable!(),
378        }
379    }
380    #[doc = "Checks if the value of the field is `ENUM_NS_NP`"]
381    #[inline(always)]
382    pub fn is_enum_ns_np(&self) -> bool {
383        **self == PLU_RULE_A::ENUM_NS_NP
384    }
385    #[doc = "Checks if the value of the field is `ENUM_NS_P`"]
386    #[inline(always)]
387    pub fn is_enum_ns_p(&self) -> bool {
388        **self == PLU_RULE_A::ENUM_NS_P
389    }
390    #[doc = "Checks if the value of the field is `ENUM_S_NP`"]
391    #[inline(always)]
392    pub fn is_enum_s_np(&self) -> bool {
393        **self == PLU_RULE_A::ENUM_S_NP
394    }
395    #[doc = "Checks if the value of the field is `ENUM_S_P`"]
396    #[inline(always)]
397    pub fn is_enum_s_p(&self) -> bool {
398        **self == PLU_RULE_A::ENUM_S_P
399    }
400}
401impl core::ops::Deref for PLU_RULE_R {
402    type Target = crate::FieldReader<u8, PLU_RULE_A>;
403    #[inline(always)]
404    fn deref(&self) -> &Self::Target {
405        &self.0
406    }
407}
408#[doc = "Field `PLU_RULE` writer - Programmable Look-Up logic"]
409pub struct PLU_RULE_W<'a> {
410    w: &'a mut W,
411}
412impl<'a> PLU_RULE_W<'a> {
413    #[doc = r"Writes `variant` to the field"]
414    #[inline(always)]
415    pub fn variant(self, variant: PLU_RULE_A) -> &'a mut W {
416        self.bits(variant.into())
417    }
418    #[doc = "Non-secure and Non-priviledge user access allowed."]
419    #[inline(always)]
420    pub fn enum_ns_np(self) -> &'a mut W {
421        self.variant(PLU_RULE_A::ENUM_NS_NP)
422    }
423    #[doc = "Non-secure and Privilege access allowed."]
424    #[inline(always)]
425    pub fn enum_ns_p(self) -> &'a mut W {
426        self.variant(PLU_RULE_A::ENUM_NS_P)
427    }
428    #[doc = "Secure and Non-priviledge user access allowed."]
429    #[inline(always)]
430    pub fn enum_s_np(self) -> &'a mut W {
431        self.variant(PLU_RULE_A::ENUM_S_NP)
432    }
433    #[doc = "Secure and Priviledge user access allowed."]
434    #[inline(always)]
435    pub fn enum_s_p(self) -> &'a mut W {
436        self.variant(PLU_RULE_A::ENUM_S_P)
437    }
438    #[doc = r"Writes raw bits to the field"]
439    #[inline(always)]
440    pub fn bits(self, value: u8) -> &'a mut W {
441        self.w.bits = (self.w.bits & !(0x03 << 20)) | ((value as u32 & 0x03) << 20);
442        self.w
443    }
444}
445#[doc = "ROM patch unit access\n\nValue on reset: 0"]
446#[derive(Clone, Copy, Debug, PartialEq)]
447#[repr(u8)]
448pub enum RPU_RULE_A {
449    #[doc = "0: Non-secure and Non-priviledge user access allowed."]
450    ENUM_NS_NP = 0,
451    #[doc = "1: Non-secure and Priviledge user access allowed."]
452    ENUM_NS_P = 1,
453    #[doc = "2: Secure and Non-priviledge user access allowed."]
454    ENUM_S_NP = 2,
455    #[doc = "3: Secure and Priviledge user access allowed."]
456    ENUM_S_P = 3,
457}
458impl From<RPU_RULE_A> for u8 {
459    #[inline(always)]
460    fn from(variant: RPU_RULE_A) -> Self {
461        variant as _
462    }
463}
464#[doc = "Field `RPU_RULE` reader - ROM patch unit access"]
465pub struct RPU_RULE_R(crate::FieldReader<u8, RPU_RULE_A>);
466impl RPU_RULE_R {
467    #[inline(always)]
468    pub(crate) fn new(bits: u8) -> Self {
469        RPU_RULE_R(crate::FieldReader::new(bits))
470    }
471    #[doc = r"Get enumerated values variant"]
472    #[inline(always)]
473    pub fn variant(&self) -> RPU_RULE_A {
474        match self.bits {
475            0 => RPU_RULE_A::ENUM_NS_NP,
476            1 => RPU_RULE_A::ENUM_NS_P,
477            2 => RPU_RULE_A::ENUM_S_NP,
478            3 => RPU_RULE_A::ENUM_S_P,
479            _ => unreachable!(),
480        }
481    }
482    #[doc = "Checks if the value of the field is `ENUM_NS_NP`"]
483    #[inline(always)]
484    pub fn is_enum_ns_np(&self) -> bool {
485        **self == RPU_RULE_A::ENUM_NS_NP
486    }
487    #[doc = "Checks if the value of the field is `ENUM_NS_P`"]
488    #[inline(always)]
489    pub fn is_enum_ns_p(&self) -> bool {
490        **self == RPU_RULE_A::ENUM_NS_P
491    }
492    #[doc = "Checks if the value of the field is `ENUM_S_NP`"]
493    #[inline(always)]
494    pub fn is_enum_s_np(&self) -> bool {
495        **self == RPU_RULE_A::ENUM_S_NP
496    }
497    #[doc = "Checks if the value of the field is `ENUM_S_P`"]
498    #[inline(always)]
499    pub fn is_enum_s_p(&self) -> bool {
500        **self == RPU_RULE_A::ENUM_S_P
501    }
502}
503impl core::ops::Deref for RPU_RULE_R {
504    type Target = crate::FieldReader<u8, RPU_RULE_A>;
505    #[inline(always)]
506    fn deref(&self) -> &Self::Target {
507        &self.0
508    }
509}
510#[doc = "Field `RPU_RULE` writer - ROM patch unit access"]
511pub struct RPU_RULE_W<'a> {
512    w: &'a mut W,
513}
514impl<'a> RPU_RULE_W<'a> {
515    #[doc = r"Writes `variant` to the field"]
516    #[inline(always)]
517    pub fn variant(self, variant: RPU_RULE_A) -> &'a mut W {
518        self.bits(variant.into())
519    }
520    #[doc = "Non-secure and Non-priviledge user access allowed."]
521    #[inline(always)]
522    pub fn enum_ns_np(self) -> &'a mut W {
523        self.variant(RPU_RULE_A::ENUM_NS_NP)
524    }
525    #[doc = "Non-secure and Priviledge user access allowed."]
526    #[inline(always)]
527    pub fn enum_ns_p(self) -> &'a mut W {
528        self.variant(RPU_RULE_A::ENUM_NS_P)
529    }
530    #[doc = "Secure and Non-priviledge user access allowed."]
531    #[inline(always)]
532    pub fn enum_s_np(self) -> &'a mut W {
533        self.variant(RPU_RULE_A::ENUM_S_NP)
534    }
535    #[doc = "Secure and Priviledge user access allowed."]
536    #[inline(always)]
537    pub fn enum_s_p(self) -> &'a mut W {
538        self.variant(RPU_RULE_A::ENUM_S_P)
539    }
540    #[doc = r"Writes raw bits to the field"]
541    #[inline(always)]
542    pub fn bits(self, value: u8) -> &'a mut W {
543        self.w.bits = (self.w.bits & !(0x03 << 24)) | ((value as u32 & 0x03) << 24);
544        self.w
545    }
546}
547impl R {
548    #[doc = "Bits 0:1 - USB High Speed Phy controller"]
549    #[inline(always)]
550    pub fn usbhphy_rule(&self) -> USBHPHY_RULE_R {
551        USBHPHY_RULE_R::new((self.bits & 0x03) as u8)
552    }
553    #[doc = "Bits 8:9 - True Random Number Generator"]
554    #[inline(always)]
555    pub fn rng_rule(&self) -> RNG_RULE_R {
556        RNG_RULE_R::new(((self.bits >> 8) & 0x03) as u8)
557    }
558    #[doc = "Bits 12:13 - PUF"]
559    #[inline(always)]
560    pub fn puf_rule(&self) -> PUF_RULE_R {
561        PUF_RULE_R::new(((self.bits >> 12) & 0x03) as u8)
562    }
563    #[doc = "Bits 20:21 - Programmable Look-Up logic"]
564    #[inline(always)]
565    pub fn plu_rule(&self) -> PLU_RULE_R {
566        PLU_RULE_R::new(((self.bits >> 20) & 0x03) as u8)
567    }
568    #[doc = "Bits 24:25 - ROM patch unit access"]
569    #[inline(always)]
570    pub fn rpu_rule(&self) -> RPU_RULE_R {
571        RPU_RULE_R::new(((self.bits >> 24) & 0x03) as u8)
572    }
573}
574impl W {
575    #[doc = "Bits 0:1 - USB High Speed Phy controller"]
576    #[inline(always)]
577    pub fn usbhphy_rule(&mut self) -> USBHPHY_RULE_W {
578        USBHPHY_RULE_W { w: self }
579    }
580    #[doc = "Bits 8:9 - True Random Number Generator"]
581    #[inline(always)]
582    pub fn rng_rule(&mut self) -> RNG_RULE_W {
583        RNG_RULE_W { w: self }
584    }
585    #[doc = "Bits 12:13 - PUF"]
586    #[inline(always)]
587    pub fn puf_rule(&mut self) -> PUF_RULE_W {
588        PUF_RULE_W { w: self }
589    }
590    #[doc = "Bits 20:21 - Programmable Look-Up logic"]
591    #[inline(always)]
592    pub fn plu_rule(&mut self) -> PLU_RULE_W {
593        PLU_RULE_W { w: self }
594    }
595    #[doc = "Bits 24:25 - ROM patch unit access"]
596    #[inline(always)]
597    pub fn rpu_rule(&mut self) -> RPU_RULE_W {
598        RPU_RULE_W { w: self }
599    }
600    #[doc = "Writes raw bits to the register."]
601    #[inline(always)]
602    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
603        self.0.bits(bits);
604        self
605    }
606}
607#[doc = "Security access rules for APB Bridge 1 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 1 sectors in total.\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 [sec_ctrl_apb_bridge1_mem_ctrl3](index.html) module"]
608pub struct SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_SPEC;
609impl crate::RegisterSpec for SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_SPEC {
610    type Ux = u32;
611}
612#[doc = "`read()` method returns [sec_ctrl_apb_bridge1_mem_ctrl3::R](R) reader structure"]
613impl crate::Readable for SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_SPEC {
614    type Reader = R;
615}
616#[doc = "`write(|w| ..)` method takes [sec_ctrl_apb_bridge1_mem_ctrl3::W](W) writer structure"]
617impl crate::Writable for SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_SPEC {
618    type Writer = W;
619}
620#[doc = "`reset()` method sets SEC_CTRL_APB_BRIDGE1_MEM_CTRL3 to value 0"]
621impl crate::Resettable for SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_SPEC {
622    #[inline(always)]
623    fn reset_value() -> Self::Ux {
624        0
625    }
626}