bl702_pac/ef_ctrl/
ef_if_ctrl_0.rs

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