bl602_pac/tzc_nsec/
tzc_rom_ctrl.rs

1#[doc = "Register `tzc_rom_ctrl` reader"]
2pub struct R(crate::R<TZC_ROM_CTRL_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<TZC_ROM_CTRL_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<TZC_ROM_CTRL_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<TZC_ROM_CTRL_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `tzc_rom0_r0_id0_en` reader - "]
17pub type TZC_ROM0_R0_ID0_EN_R = crate::BitReader<bool>;
18#[doc = "Field `tzc_rom0_r1_id0_en` reader - "]
19pub type TZC_ROM0_R1_ID0_EN_R = crate::BitReader<bool>;
20#[doc = "Field `tzc_rom1_r0_id0_en` reader - "]
21pub type TZC_ROM1_R0_ID0_EN_R = crate::BitReader<bool>;
22#[doc = "Field `tzc_rom1_r1_id0_en` reader - "]
23pub type TZC_ROM1_R1_ID0_EN_R = crate::BitReader<bool>;
24#[doc = "Field `tzc_rom0_r0_id1_en` reader - "]
25pub type TZC_ROM0_R0_ID1_EN_R = crate::BitReader<bool>;
26#[doc = "Field `tzc_rom0_r1_id1_en` reader - "]
27pub type TZC_ROM0_R1_ID1_EN_R = crate::BitReader<bool>;
28#[doc = "Field `tzc_rom1_r0_id1_en` reader - "]
29pub type TZC_ROM1_R0_ID1_EN_R = crate::BitReader<bool>;
30#[doc = "Field `tzc_rom1_r1_id1_en` reader - "]
31pub type TZC_ROM1_R1_ID1_EN_R = crate::BitReader<bool>;
32#[doc = "Field `tzc_rom0_r0_en` reader - "]
33pub type TZC_ROM0_R0_EN_R = crate::BitReader<bool>;
34#[doc = "Field `tzc_rom0_r1_en` reader - "]
35pub type TZC_ROM0_R1_EN_R = crate::BitReader<bool>;
36#[doc = "Field `tzc_rom1_r0_en` reader - "]
37pub type TZC_ROM1_R0_EN_R = crate::BitReader<bool>;
38#[doc = "Field `tzc_rom1_r1_en` reader - "]
39pub type TZC_ROM1_R1_EN_R = crate::BitReader<bool>;
40#[doc = "Field `tzc_rom0_r0_lock` reader - "]
41pub type TZC_ROM0_R0_LOCK_R = crate::BitReader<bool>;
42#[doc = "Field `tzc_rom0_r1_lock` reader - "]
43pub type TZC_ROM0_R1_LOCK_R = crate::BitReader<bool>;
44#[doc = "Field `tzc_rom1_r0_lock` reader - "]
45pub type TZC_ROM1_R0_LOCK_R = crate::BitReader<bool>;
46#[doc = "Field `tzc_rom1_r1_lock` reader - "]
47pub type TZC_ROM1_R1_LOCK_R = crate::BitReader<bool>;
48#[doc = "Field `tzc_sboot_done` reader - "]
49pub type TZC_SBOOT_DONE_R = crate::FieldReader<u8, u8>;
50impl R {
51    #[doc = "Bit 0"]
52    #[inline(always)]
53    pub fn tzc_rom0_r0_id0_en(&self) -> TZC_ROM0_R0_ID0_EN_R {
54        TZC_ROM0_R0_ID0_EN_R::new((self.bits & 1) != 0)
55    }
56    #[doc = "Bit 1"]
57    #[inline(always)]
58    pub fn tzc_rom0_r1_id0_en(&self) -> TZC_ROM0_R1_ID0_EN_R {
59        TZC_ROM0_R1_ID0_EN_R::new(((self.bits >> 1) & 1) != 0)
60    }
61    #[doc = "Bit 2"]
62    #[inline(always)]
63    pub fn tzc_rom1_r0_id0_en(&self) -> TZC_ROM1_R0_ID0_EN_R {
64        TZC_ROM1_R0_ID0_EN_R::new(((self.bits >> 2) & 1) != 0)
65    }
66    #[doc = "Bit 3"]
67    #[inline(always)]
68    pub fn tzc_rom1_r1_id0_en(&self) -> TZC_ROM1_R1_ID0_EN_R {
69        TZC_ROM1_R1_ID0_EN_R::new(((self.bits >> 3) & 1) != 0)
70    }
71    #[doc = "Bit 8"]
72    #[inline(always)]
73    pub fn tzc_rom0_r0_id1_en(&self) -> TZC_ROM0_R0_ID1_EN_R {
74        TZC_ROM0_R0_ID1_EN_R::new(((self.bits >> 8) & 1) != 0)
75    }
76    #[doc = "Bit 9"]
77    #[inline(always)]
78    pub fn tzc_rom0_r1_id1_en(&self) -> TZC_ROM0_R1_ID1_EN_R {
79        TZC_ROM0_R1_ID1_EN_R::new(((self.bits >> 9) & 1) != 0)
80    }
81    #[doc = "Bit 10"]
82    #[inline(always)]
83    pub fn tzc_rom1_r0_id1_en(&self) -> TZC_ROM1_R0_ID1_EN_R {
84        TZC_ROM1_R0_ID1_EN_R::new(((self.bits >> 10) & 1) != 0)
85    }
86    #[doc = "Bit 11"]
87    #[inline(always)]
88    pub fn tzc_rom1_r1_id1_en(&self) -> TZC_ROM1_R1_ID1_EN_R {
89        TZC_ROM1_R1_ID1_EN_R::new(((self.bits >> 11) & 1) != 0)
90    }
91    #[doc = "Bit 16"]
92    #[inline(always)]
93    pub fn tzc_rom0_r0_en(&self) -> TZC_ROM0_R0_EN_R {
94        TZC_ROM0_R0_EN_R::new(((self.bits >> 16) & 1) != 0)
95    }
96    #[doc = "Bit 17"]
97    #[inline(always)]
98    pub fn tzc_rom0_r1_en(&self) -> TZC_ROM0_R1_EN_R {
99        TZC_ROM0_R1_EN_R::new(((self.bits >> 17) & 1) != 0)
100    }
101    #[doc = "Bit 18"]
102    #[inline(always)]
103    pub fn tzc_rom1_r0_en(&self) -> TZC_ROM1_R0_EN_R {
104        TZC_ROM1_R0_EN_R::new(((self.bits >> 18) & 1) != 0)
105    }
106    #[doc = "Bit 19"]
107    #[inline(always)]
108    pub fn tzc_rom1_r1_en(&self) -> TZC_ROM1_R1_EN_R {
109        TZC_ROM1_R1_EN_R::new(((self.bits >> 19) & 1) != 0)
110    }
111    #[doc = "Bit 24"]
112    #[inline(always)]
113    pub fn tzc_rom0_r0_lock(&self) -> TZC_ROM0_R0_LOCK_R {
114        TZC_ROM0_R0_LOCK_R::new(((self.bits >> 24) & 1) != 0)
115    }
116    #[doc = "Bit 25"]
117    #[inline(always)]
118    pub fn tzc_rom0_r1_lock(&self) -> TZC_ROM0_R1_LOCK_R {
119        TZC_ROM0_R1_LOCK_R::new(((self.bits >> 25) & 1) != 0)
120    }
121    #[doc = "Bit 26"]
122    #[inline(always)]
123    pub fn tzc_rom1_r0_lock(&self) -> TZC_ROM1_R0_LOCK_R {
124        TZC_ROM1_R0_LOCK_R::new(((self.bits >> 26) & 1) != 0)
125    }
126    #[doc = "Bit 27"]
127    #[inline(always)]
128    pub fn tzc_rom1_r1_lock(&self) -> TZC_ROM1_R1_LOCK_R {
129        TZC_ROM1_R1_LOCK_R::new(((self.bits >> 27) & 1) != 0)
130    }
131    #[doc = "Bits 28:31"]
132    #[inline(always)]
133    pub fn tzc_sboot_done(&self) -> TZC_SBOOT_DONE_R {
134        TZC_SBOOT_DONE_R::new(((self.bits >> 28) & 0x0f) as u8)
135    }
136}
137#[doc = "tzc_rom_ctrl.\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 [tzc_rom_ctrl](index.html) module"]
138pub struct TZC_ROM_CTRL_SPEC;
139impl crate::RegisterSpec for TZC_ROM_CTRL_SPEC {
140    type Ux = u32;
141}
142#[doc = "`read()` method returns [tzc_rom_ctrl::R](R) reader structure"]
143impl crate::Readable for TZC_ROM_CTRL_SPEC {
144    type Reader = R;
145}
146#[doc = "`reset()` method sets tzc_rom_ctrl to value 0x0f0f"]
147impl crate::Resettable for TZC_ROM_CTRL_SPEC {
148    const RESET_VALUE: Self::Ux = 0x0f0f;
149}