efm32pg22_pac/efm32pg22c200/syscfg_s/
rootlockstatus.rs

1#[doc = "Register `ROOTLOCKSTATUS` reader"]
2pub struct R(crate::R<ROOTLOCKSTATUS_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<ROOTLOCKSTATUS_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<ROOTLOCKSTATUS_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<ROOTLOCKSTATUS_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `BUSLOCK` reader - Bus Lock"]
17pub type BUSLOCK_R = crate::BitReader<bool>;
18#[doc = "Field `REGLOCK` reader - Register Lock"]
19pub type REGLOCK_R = crate::BitReader<bool>;
20#[doc = "Field `MFRLOCK` reader - Manufacture Lock"]
21pub type MFRLOCK_R = crate::BitReader<bool>;
22#[doc = "Field `ROOTMODELOCK` reader - Root Mode Lock"]
23pub type ROOTMODELOCK_R = crate::BitReader<bool>;
24#[doc = "Field `ROOTDBGLOCK` reader - Root Debug Lock"]
25pub type ROOTDBGLOCK_R = crate::BitReader<bool>;
26#[doc = "Field `USERDBGLOCK` reader - User Invasive Debug Lock"]
27pub type USERDBGLOCK_R = crate::BitReader<bool>;
28#[doc = "Field `USERNIDLOCK` reader - User Non-invasive Debug Lock"]
29pub type USERNIDLOCK_R = crate::BitReader<bool>;
30#[doc = "Field `USERSPIDLOCK` reader - User Secure Invasive Debug Lock"]
31pub type USERSPIDLOCK_R = crate::BitReader<bool>;
32#[doc = "Field `USERSPNIDLOCK` reader - User Secure Non-invasive Debug Lock"]
33pub type USERSPNIDLOCK_R = crate::BitReader<bool>;
34#[doc = "Field `USERDBGAPLOCK` reader - User Debug Access Port Lock"]
35pub type USERDBGAPLOCK_R = crate::BitReader<bool>;
36impl R {
37    #[doc = "Bit 0 - Bus Lock"]
38    #[inline(always)]
39    pub fn buslock(&self) -> BUSLOCK_R {
40        BUSLOCK_R::new((self.bits & 1) != 0)
41    }
42    #[doc = "Bit 1 - Register Lock"]
43    #[inline(always)]
44    pub fn reglock(&self) -> REGLOCK_R {
45        REGLOCK_R::new(((self.bits >> 1) & 1) != 0)
46    }
47    #[doc = "Bit 2 - Manufacture Lock"]
48    #[inline(always)]
49    pub fn mfrlock(&self) -> MFRLOCK_R {
50        MFRLOCK_R::new(((self.bits >> 2) & 1) != 0)
51    }
52    #[doc = "Bit 4 - Root Mode Lock"]
53    #[inline(always)]
54    pub fn rootmodelock(&self) -> ROOTMODELOCK_R {
55        ROOTMODELOCK_R::new(((self.bits >> 4) & 1) != 0)
56    }
57    #[doc = "Bit 8 - Root Debug Lock"]
58    #[inline(always)]
59    pub fn rootdbglock(&self) -> ROOTDBGLOCK_R {
60        ROOTDBGLOCK_R::new(((self.bits >> 8) & 1) != 0)
61    }
62    #[doc = "Bit 16 - User Invasive Debug Lock"]
63    #[inline(always)]
64    pub fn userdbglock(&self) -> USERDBGLOCK_R {
65        USERDBGLOCK_R::new(((self.bits >> 16) & 1) != 0)
66    }
67    #[doc = "Bit 17 - User Non-invasive Debug Lock"]
68    #[inline(always)]
69    pub fn usernidlock(&self) -> USERNIDLOCK_R {
70        USERNIDLOCK_R::new(((self.bits >> 17) & 1) != 0)
71    }
72    #[doc = "Bit 18 - User Secure Invasive Debug Lock"]
73    #[inline(always)]
74    pub fn userspidlock(&self) -> USERSPIDLOCK_R {
75        USERSPIDLOCK_R::new(((self.bits >> 18) & 1) != 0)
76    }
77    #[doc = "Bit 19 - User Secure Non-invasive Debug Lock"]
78    #[inline(always)]
79    pub fn userspnidlock(&self) -> USERSPNIDLOCK_R {
80        USERSPNIDLOCK_R::new(((self.bits >> 19) & 1) != 0)
81    }
82    #[doc = "Bit 20 - User Debug Access Port Lock"]
83    #[inline(always)]
84    pub fn userdbgaplock(&self) -> USERDBGAPLOCK_R {
85        USERDBGAPLOCK_R::new(((self.bits >> 20) & 1) != 0)
86    }
87}
88#[doc = "This register returns the status of the SE managed locks.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rootlockstatus](index.html) module"]
89pub struct ROOTLOCKSTATUS_SPEC;
90impl crate::RegisterSpec for ROOTLOCKSTATUS_SPEC {
91    type Ux = u32;
92}
93#[doc = "`read()` method returns [rootlockstatus::R](R) reader structure"]
94impl crate::Readable for ROOTLOCKSTATUS_SPEC {
95    type Reader = R;
96}
97#[doc = "`reset()` method sets ROOTLOCKSTATUS to value 0x011f_0107"]
98impl crate::Resettable for ROOTLOCKSTATUS_SPEC {
99    const RESET_VALUE: Self::Ux = 0x011f_0107;
100}