bl602_pac/ef_ctrl/
ef_if_ctrl_0.rs1#[doc = "Register `ef_if_ctrl_0` reader"]
2pub struct R(crate::R<EF_IF_CTRL_0_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<EF_IF_CTRL_0_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<EF_IF_CTRL_0_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<EF_IF_CTRL_0_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `ef_if_ctrl_0` writer"]
17pub struct W(crate::W<EF_IF_CTRL_0_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<EF_IF_CTRL_0_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<EF_IF_CTRL_0_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<EF_IF_CTRL_0_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `ef_if_0_autoload_p1_done` reader - "]
38pub type EF_IF_0_AUTOLOAD_P1_DONE_R = crate::BitReader<bool>;
39#[doc = "Field `ef_if_0_autoload_done` reader - "]
40pub type EF_IF_0_AUTOLOAD_DONE_R = crate::BitReader<bool>;
41#[doc = "Field `ef_if_0_busy` reader - "]
42pub type EF_IF_0_BUSY_R = crate::BitReader<bool>;
43#[doc = "Field `ef_if_0_rw` reader - "]
44pub type EF_IF_0_RW_R = crate::BitReader<bool>;
45#[doc = "Field `ef_if_0_rw` writer - "]
46pub type EF_IF_0_RW_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_IF_CTRL_0_SPEC, bool, O>;
47#[doc = "Field `ef_if_0_trig` reader - "]
48pub type EF_IF_0_TRIG_R = crate::BitReader<bool>;
49#[doc = "Field `ef_if_0_trig` writer - "]
50pub type EF_IF_0_TRIG_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_IF_CTRL_0_SPEC, bool, O>;
51#[doc = "Field `ef_if_0_manual_en` reader - "]
52pub type EF_IF_0_MANUAL_EN_R = crate::BitReader<bool>;
53#[doc = "Field `ef_if_0_manual_en` writer - "]
54pub type EF_IF_0_MANUAL_EN_W<'a, const O: u8> =
55 crate::BitWriter<'a, u32, EF_IF_CTRL_0_SPEC, bool, O>;
56#[doc = "Field `ef_if_0_cyc_modify` reader - "]
57pub type EF_IF_0_CYC_MODIFY_R = crate::BitReader<bool>;
58#[doc = "Field `ef_if_0_cyc_modify` writer - "]
59pub type EF_IF_0_CYC_MODIFY_W<'a, const O: u8> =
60 crate::BitWriter<'a, u32, EF_IF_CTRL_0_SPEC, bool, O>;
61#[doc = "Field `ef_clk_sahb_data_sel` reader - "]
62pub type EF_CLK_SAHB_DATA_SEL_R = crate::BitReader<bool>;
63#[doc = "Field `ef_clk_sahb_data_sel` writer - "]
64pub type EF_CLK_SAHB_DATA_SEL_W<'a, const O: u8> =
65 crate::BitWriter<'a, u32, EF_IF_CTRL_0_SPEC, bool, O>;
66#[doc = "Field `ef_if_prot_code_ctrl` reader - "]
67pub type EF_IF_PROT_CODE_CTRL_R = crate::FieldReader<u8, u8>;
68#[doc = "Field `ef_if_prot_code_ctrl` writer - "]
69pub type EF_IF_PROT_CODE_CTRL_W<'a, const O: u8> =
70 crate::FieldWriter<'a, u32, EF_IF_CTRL_0_SPEC, u8, u8, 8, O>;
71#[doc = "Field `ef_if_por_dig` reader - "]
72pub type EF_IF_POR_DIG_R = crate::BitReader<bool>;
73#[doc = "Field `ef_if_por_dig` writer - "]
74pub type EF_IF_POR_DIG_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_IF_CTRL_0_SPEC, bool, O>;
75#[doc = "Field `ef_clk_sahb_data_gate` reader - "]
76pub type EF_CLK_SAHB_DATA_GATE_R = crate::BitReader<bool>;
77#[doc = "Field `ef_clk_sahb_data_gate` writer - "]
78pub type EF_CLK_SAHB_DATA_GATE_W<'a, const O: u8> =
79 crate::BitWriter<'a, u32, EF_IF_CTRL_0_SPEC, bool, O>;
80#[doc = "Field `ef_if_auto_rd_en` reader - "]
81pub type EF_IF_AUTO_RD_EN_R = crate::BitReader<bool>;
82#[doc = "Field `ef_if_auto_rd_en` writer - "]
83pub type EF_IF_AUTO_RD_EN_W<'a, const O: u8> =
84 crate::BitWriter<'a, u32, EF_IF_CTRL_0_SPEC, bool, O>;
85#[doc = "Field `ef_if_cyc_modify_lock` reader - "]
86pub type EF_IF_CYC_MODIFY_LOCK_R = crate::BitReader<bool>;
87#[doc = "Field `ef_if_cyc_modify_lock` writer - "]
88pub type EF_IF_CYC_MODIFY_LOCK_W<'a, const O: u8> =
89 crate::BitWriter<'a, u32, EF_IF_CTRL_0_SPEC, bool, O>;
90#[doc = "Field `ef_if_0_int` reader - "]
91pub type EF_IF_0_INT_R = crate::BitReader<bool>;
92#[doc = "Field `ef_if_0_int_clr` reader - "]
93pub type EF_IF_0_INT_CLR_R = crate::BitReader<bool>;
94#[doc = "Field `ef_if_0_int_clr` writer - "]
95pub type EF_IF_0_INT_CLR_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_IF_CTRL_0_SPEC, bool, O>;
96#[doc = "Field `ef_if_0_int_set` reader - "]
97pub type EF_IF_0_INT_SET_R = crate::BitReader<bool>;
98#[doc = "Field `ef_if_0_int_set` writer - "]
99pub type EF_IF_0_INT_SET_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_IF_CTRL_0_SPEC, bool, O>;
100#[doc = "Field `ef_if_prot_code_cyc` reader - "]
101pub type EF_IF_PROT_CODE_CYC_R = crate::FieldReader<u8, u8>;
102#[doc = "Field `ef_if_prot_code_cyc` writer - "]
103pub type EF_IF_PROT_CODE_CYC_W<'a, const O: u8> =
104 crate::FieldWriter<'a, u32, EF_IF_CTRL_0_SPEC, u8, u8, 8, O>;
105impl R {
106 #[doc = "Bit 0"]
107 #[inline(always)]
108 pub fn ef_if_0_autoload_p1_done(&self) -> EF_IF_0_AUTOLOAD_P1_DONE_R {
109 EF_IF_0_AUTOLOAD_P1_DONE_R::new((self.bits & 1) != 0)
110 }
111 #[doc = "Bit 1"]
112 #[inline(always)]
113 pub fn ef_if_0_autoload_done(&self) -> EF_IF_0_AUTOLOAD_DONE_R {
114 EF_IF_0_AUTOLOAD_DONE_R::new(((self.bits >> 1) & 1) != 0)
115 }
116 #[doc = "Bit 2"]
117 #[inline(always)]
118 pub fn ef_if_0_busy(&self) -> EF_IF_0_BUSY_R {
119 EF_IF_0_BUSY_R::new(((self.bits >> 2) & 1) != 0)
120 }
121 #[doc = "Bit 3"]
122 #[inline(always)]
123 pub fn ef_if_0_rw(&self) -> EF_IF_0_RW_R {
124 EF_IF_0_RW_R::new(((self.bits >> 3) & 1) != 0)
125 }
126 #[doc = "Bit 4"]
127 #[inline(always)]
128 pub fn ef_if_0_trig(&self) -> EF_IF_0_TRIG_R {
129 EF_IF_0_TRIG_R::new(((self.bits >> 4) & 1) != 0)
130 }
131 #[doc = "Bit 5"]
132 #[inline(always)]
133 pub fn ef_if_0_manual_en(&self) -> EF_IF_0_MANUAL_EN_R {
134 EF_IF_0_MANUAL_EN_R::new(((self.bits >> 5) & 1) != 0)
135 }
136 #[doc = "Bit 6"]
137 #[inline(always)]
138 pub fn ef_if_0_cyc_modify(&self) -> EF_IF_0_CYC_MODIFY_R {
139 EF_IF_0_CYC_MODIFY_R::new(((self.bits >> 6) & 1) != 0)
140 }
141 #[doc = "Bit 7"]
142 #[inline(always)]
143 pub fn ef_clk_sahb_data_sel(&self) -> EF_CLK_SAHB_DATA_SEL_R {
144 EF_CLK_SAHB_DATA_SEL_R::new(((self.bits >> 7) & 1) != 0)
145 }
146 #[doc = "Bits 8:15"]
147 #[inline(always)]
148 pub fn ef_if_prot_code_ctrl(&self) -> EF_IF_PROT_CODE_CTRL_R {
149 EF_IF_PROT_CODE_CTRL_R::new(((self.bits >> 8) & 0xff) as u8)
150 }
151 #[doc = "Bit 16"]
152 #[inline(always)]
153 pub fn ef_if_por_dig(&self) -> EF_IF_POR_DIG_R {
154 EF_IF_POR_DIG_R::new(((self.bits >> 16) & 1) != 0)
155 }
156 #[doc = "Bit 17"]
157 #[inline(always)]
158 pub fn ef_clk_sahb_data_gate(&self) -> EF_CLK_SAHB_DATA_GATE_R {
159 EF_CLK_SAHB_DATA_GATE_R::new(((self.bits >> 17) & 1) != 0)
160 }
161 #[doc = "Bit 18"]
162 #[inline(always)]
163 pub fn ef_if_auto_rd_en(&self) -> EF_IF_AUTO_RD_EN_R {
164 EF_IF_AUTO_RD_EN_R::new(((self.bits >> 18) & 1) != 0)
165 }
166 #[doc = "Bit 19"]
167 #[inline(always)]
168 pub fn ef_if_cyc_modify_lock(&self) -> EF_IF_CYC_MODIFY_LOCK_R {
169 EF_IF_CYC_MODIFY_LOCK_R::new(((self.bits >> 19) & 1) != 0)
170 }
171 #[doc = "Bit 20"]
172 #[inline(always)]
173 pub fn ef_if_0_int(&self) -> EF_IF_0_INT_R {
174 EF_IF_0_INT_R::new(((self.bits >> 20) & 1) != 0)
175 }
176 #[doc = "Bit 21"]
177 #[inline(always)]
178 pub fn ef_if_0_int_clr(&self) -> EF_IF_0_INT_CLR_R {
179 EF_IF_0_INT_CLR_R::new(((self.bits >> 21) & 1) != 0)
180 }
181 #[doc = "Bit 22"]
182 #[inline(always)]
183 pub fn ef_if_0_int_set(&self) -> EF_IF_0_INT_SET_R {
184 EF_IF_0_INT_SET_R::new(((self.bits >> 22) & 1) != 0)
185 }
186 #[doc = "Bits 24:31"]
187 #[inline(always)]
188 pub fn ef_if_prot_code_cyc(&self) -> EF_IF_PROT_CODE_CYC_R {
189 EF_IF_PROT_CODE_CYC_R::new(((self.bits >> 24) & 0xff) as u8)
190 }
191}
192impl W {
193 #[doc = "Bit 3"]
194 #[inline(always)]
195 #[must_use]
196 pub fn ef_if_0_rw(&mut self) -> EF_IF_0_RW_W<3> {
197 EF_IF_0_RW_W::new(self)
198 }
199 #[doc = "Bit 4"]
200 #[inline(always)]
201 #[must_use]
202 pub fn ef_if_0_trig(&mut self) -> EF_IF_0_TRIG_W<4> {
203 EF_IF_0_TRIG_W::new(self)
204 }
205 #[doc = "Bit 5"]
206 #[inline(always)]
207 #[must_use]
208 pub fn ef_if_0_manual_en(&mut self) -> EF_IF_0_MANUAL_EN_W<5> {
209 EF_IF_0_MANUAL_EN_W::new(self)
210 }
211 #[doc = "Bit 6"]
212 #[inline(always)]
213 #[must_use]
214 pub fn ef_if_0_cyc_modify(&mut self) -> EF_IF_0_CYC_MODIFY_W<6> {
215 EF_IF_0_CYC_MODIFY_W::new(self)
216 }
217 #[doc = "Bit 7"]
218 #[inline(always)]
219 #[must_use]
220 pub fn ef_clk_sahb_data_sel(&mut self) -> EF_CLK_SAHB_DATA_SEL_W<7> {
221 EF_CLK_SAHB_DATA_SEL_W::new(self)
222 }
223 #[doc = "Bits 8:15"]
224 #[inline(always)]
225 #[must_use]
226 pub fn ef_if_prot_code_ctrl(&mut self) -> EF_IF_PROT_CODE_CTRL_W<8> {
227 EF_IF_PROT_CODE_CTRL_W::new(self)
228 }
229 #[doc = "Bit 16"]
230 #[inline(always)]
231 #[must_use]
232 pub fn ef_if_por_dig(&mut self) -> EF_IF_POR_DIG_W<16> {
233 EF_IF_POR_DIG_W::new(self)
234 }
235 #[doc = "Bit 17"]
236 #[inline(always)]
237 #[must_use]
238 pub fn ef_clk_sahb_data_gate(&mut self) -> EF_CLK_SAHB_DATA_GATE_W<17> {
239 EF_CLK_SAHB_DATA_GATE_W::new(self)
240 }
241 #[doc = "Bit 18"]
242 #[inline(always)]
243 #[must_use]
244 pub fn ef_if_auto_rd_en(&mut self) -> EF_IF_AUTO_RD_EN_W<18> {
245 EF_IF_AUTO_RD_EN_W::new(self)
246 }
247 #[doc = "Bit 19"]
248 #[inline(always)]
249 #[must_use]
250 pub fn ef_if_cyc_modify_lock(&mut self) -> EF_IF_CYC_MODIFY_LOCK_W<19> {
251 EF_IF_CYC_MODIFY_LOCK_W::new(self)
252 }
253 #[doc = "Bit 21"]
254 #[inline(always)]
255 #[must_use]
256 pub fn ef_if_0_int_clr(&mut self) -> EF_IF_0_INT_CLR_W<21> {
257 EF_IF_0_INT_CLR_W::new(self)
258 }
259 #[doc = "Bit 22"]
260 #[inline(always)]
261 #[must_use]
262 pub fn ef_if_0_int_set(&mut self) -> EF_IF_0_INT_SET_W<22> {
263 EF_IF_0_INT_SET_W::new(self)
264 }
265 #[doc = "Bits 24:31"]
266 #[inline(always)]
267 #[must_use]
268 pub fn ef_if_prot_code_cyc(&mut self) -> EF_IF_PROT_CODE_CYC_W<24> {
269 EF_IF_PROT_CODE_CYC_W::new(self)
270 }
271 #[doc = "Writes raw bits to the register."]
272 #[inline(always)]
273 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
274 self.0.bits(bits);
275 self
276 }
277}
278#[doc = "ef_if_ctrl_0.\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 [ef_if_ctrl_0](index.html) module"]
279pub struct EF_IF_CTRL_0_SPEC;
280impl crate::RegisterSpec for EF_IF_CTRL_0_SPEC {
281 type Ux = u32;
282}
283#[doc = "`read()` method returns [ef_if_ctrl_0::R](R) reader structure"]
284impl crate::Readable for EF_IF_CTRL_0_SPEC {
285 type Reader = R;
286}
287#[doc = "`write(|w| ..)` method takes [ef_if_ctrl_0::W](W) writer structure"]
288impl crate::Writable for EF_IF_CTRL_0_SPEC {
289 type Writer = W;
290 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
291 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
292}
293#[doc = "`reset()` method sets ef_if_ctrl_0 to value 0x0024_0003"]
294impl crate::Resettable for EF_IF_CTRL_0_SPEC {
295 const RESET_VALUE: Self::Ux = 0x0024_0003;
296}