bl702_pac/ef_data_0/
ef_data_0_lock.rs

1#[doc = "Register `ef_data_0_lock` reader"]
2pub struct R(crate::R<EF_DATA_0_LOCK_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<EF_DATA_0_LOCK_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<EF_DATA_0_LOCK_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<EF_DATA_0_LOCK_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `ef_data_0_lock` writer"]
17pub struct W(crate::W<EF_DATA_0_LOCK_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<EF_DATA_0_LOCK_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_DATA_0_LOCK_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<EF_DATA_0_LOCK_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `ef_ana_trim_1` reader - "]
38pub type EF_ANA_TRIM_1_R = crate::FieldReader<u16, u16>;
39#[doc = "Field `ef_ana_trim_1` writer - "]
40pub type EF_ANA_TRIM_1_W<'a, const O: u8> =
41    crate::FieldWriter<'a, u32, EF_DATA_0_LOCK_SPEC, u16, u16, 13, O>;
42#[doc = "Field `wr_lock_key_slot_4_l` reader - "]
43pub type WR_LOCK_KEY_SLOT_4_L_R = crate::BitReader<bool>;
44#[doc = "Field `wr_lock_key_slot_4_l` writer - "]
45pub type WR_LOCK_KEY_SLOT_4_L_W<'a, const O: u8> =
46    crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>;
47#[doc = "Field `wr_lock_key_slot_5_l` reader - "]
48pub type WR_LOCK_KEY_SLOT_5_L_R = crate::BitReader<bool>;
49#[doc = "Field `wr_lock_key_slot_5_l` writer - "]
50pub type WR_LOCK_KEY_SLOT_5_L_W<'a, const O: u8> =
51    crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>;
52#[doc = "Field `wr_lock_boot_mode` reader - "]
53pub type WR_LOCK_BOOT_MODE_R = crate::BitReader<bool>;
54#[doc = "Field `wr_lock_boot_mode` writer - "]
55pub type WR_LOCK_BOOT_MODE_W<'a, const O: u8> =
56    crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>;
57#[doc = "Field `wr_lock_dbg_pwd` reader - "]
58pub type WR_LOCK_DBG_PWD_R = crate::BitReader<bool>;
59#[doc = "Field `wr_lock_dbg_pwd` writer - "]
60pub type WR_LOCK_DBG_PWD_W<'a, const O: u8> =
61    crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>;
62#[doc = "Field `wr_lock_sw_usage_0` reader - "]
63pub type WR_LOCK_SW_USAGE_0_R = crate::BitReader<bool>;
64#[doc = "Field `wr_lock_sw_usage_0` writer - "]
65pub type WR_LOCK_SW_USAGE_0_W<'a, const O: u8> =
66    crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>;
67#[doc = "Field `wr_lock_wifi_mac` reader - "]
68pub type WR_LOCK_WIFI_MAC_R = crate::BitReader<bool>;
69#[doc = "Field `wr_lock_wifi_mac` writer - "]
70pub type WR_LOCK_WIFI_MAC_W<'a, const O: u8> =
71    crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>;
72#[doc = "Field `wr_lock_key_slot_0` reader - "]
73pub type WR_LOCK_KEY_SLOT_0_R = crate::BitReader<bool>;
74#[doc = "Field `wr_lock_key_slot_0` writer - "]
75pub type WR_LOCK_KEY_SLOT_0_W<'a, const O: u8> =
76    crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>;
77#[doc = "Field `wr_lock_key_slot_1` reader - "]
78pub type WR_LOCK_KEY_SLOT_1_R = crate::BitReader<bool>;
79#[doc = "Field `wr_lock_key_slot_1` writer - "]
80pub type WR_LOCK_KEY_SLOT_1_W<'a, const O: u8> =
81    crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>;
82#[doc = "Field `wr_lock_key_slot_2` reader - "]
83pub type WR_LOCK_KEY_SLOT_2_R = crate::BitReader<bool>;
84#[doc = "Field `wr_lock_key_slot_2` writer - "]
85pub type WR_LOCK_KEY_SLOT_2_W<'a, const O: u8> =
86    crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>;
87#[doc = "Field `wr_lock_key_slot_3` reader - "]
88pub type WR_LOCK_KEY_SLOT_3_R = crate::BitReader<bool>;
89#[doc = "Field `wr_lock_key_slot_3` writer - "]
90pub type WR_LOCK_KEY_SLOT_3_W<'a, const O: u8> =
91    crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>;
92#[doc = "Field `wr_lock_key_slot_4_h` reader - "]
93pub type WR_LOCK_KEY_SLOT_4_H_R = crate::BitReader<bool>;
94#[doc = "Field `wr_lock_key_slot_4_h` writer - "]
95pub type WR_LOCK_KEY_SLOT_4_H_W<'a, const O: u8> =
96    crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>;
97#[doc = "Field `wr_lock_key_slot_5_h` reader - "]
98pub type WR_LOCK_KEY_SLOT_5_H_R = crate::BitReader<bool>;
99#[doc = "Field `wr_lock_key_slot_5_h` writer - "]
100pub type WR_LOCK_KEY_SLOT_5_H_W<'a, const O: u8> =
101    crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>;
102#[doc = "Field `rd_lock_dbg_pwd` reader - "]
103pub type RD_LOCK_DBG_PWD_R = crate::BitReader<bool>;
104#[doc = "Field `rd_lock_dbg_pwd` writer - "]
105pub type RD_LOCK_DBG_PWD_W<'a, const O: u8> =
106    crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>;
107#[doc = "Field `rd_lock_key_slot_0` reader - "]
108pub type RD_LOCK_KEY_SLOT_0_R = crate::BitReader<bool>;
109#[doc = "Field `rd_lock_key_slot_0` writer - "]
110pub type RD_LOCK_KEY_SLOT_0_W<'a, const O: u8> =
111    crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>;
112#[doc = "Field `rd_lock_key_slot_1` reader - "]
113pub type RD_LOCK_KEY_SLOT_1_R = crate::BitReader<bool>;
114#[doc = "Field `rd_lock_key_slot_1` writer - "]
115pub type RD_LOCK_KEY_SLOT_1_W<'a, const O: u8> =
116    crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>;
117#[doc = "Field `rd_lock_key_slot_2` reader - "]
118pub type RD_LOCK_KEY_SLOT_2_R = crate::BitReader<bool>;
119#[doc = "Field `rd_lock_key_slot_2` writer - "]
120pub type RD_LOCK_KEY_SLOT_2_W<'a, const O: u8> =
121    crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>;
122#[doc = "Field `rd_lock_key_slot_3` reader - "]
123pub type RD_LOCK_KEY_SLOT_3_R = crate::BitReader<bool>;
124#[doc = "Field `rd_lock_key_slot_3` writer - "]
125pub type RD_LOCK_KEY_SLOT_3_W<'a, const O: u8> =
126    crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>;
127#[doc = "Field `rd_lock_key_slot_4` reader - "]
128pub type RD_LOCK_KEY_SLOT_4_R = crate::BitReader<bool>;
129#[doc = "Field `rd_lock_key_slot_4` writer - "]
130pub type RD_LOCK_KEY_SLOT_4_W<'a, const O: u8> =
131    crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>;
132#[doc = "Field `rd_lock_key_slot_5` reader - "]
133pub type RD_LOCK_KEY_SLOT_5_R = crate::BitReader<bool>;
134#[doc = "Field `rd_lock_key_slot_5` writer - "]
135pub type RD_LOCK_KEY_SLOT_5_W<'a, const O: u8> =
136    crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>;
137impl R {
138    #[doc = "Bits 0:12"]
139    #[inline(always)]
140    pub fn ef_ana_trim_1(&self) -> EF_ANA_TRIM_1_R {
141        EF_ANA_TRIM_1_R::new((self.bits & 0x1fff) as u16)
142    }
143    #[doc = "Bit 13"]
144    #[inline(always)]
145    pub fn wr_lock_key_slot_4_l(&self) -> WR_LOCK_KEY_SLOT_4_L_R {
146        WR_LOCK_KEY_SLOT_4_L_R::new(((self.bits >> 13) & 1) != 0)
147    }
148    #[doc = "Bit 14"]
149    #[inline(always)]
150    pub fn wr_lock_key_slot_5_l(&self) -> WR_LOCK_KEY_SLOT_5_L_R {
151        WR_LOCK_KEY_SLOT_5_L_R::new(((self.bits >> 14) & 1) != 0)
152    }
153    #[doc = "Bit 15"]
154    #[inline(always)]
155    pub fn wr_lock_boot_mode(&self) -> WR_LOCK_BOOT_MODE_R {
156        WR_LOCK_BOOT_MODE_R::new(((self.bits >> 15) & 1) != 0)
157    }
158    #[doc = "Bit 16"]
159    #[inline(always)]
160    pub fn wr_lock_dbg_pwd(&self) -> WR_LOCK_DBG_PWD_R {
161        WR_LOCK_DBG_PWD_R::new(((self.bits >> 16) & 1) != 0)
162    }
163    #[doc = "Bit 17"]
164    #[inline(always)]
165    pub fn wr_lock_sw_usage_0(&self) -> WR_LOCK_SW_USAGE_0_R {
166        WR_LOCK_SW_USAGE_0_R::new(((self.bits >> 17) & 1) != 0)
167    }
168    #[doc = "Bit 18"]
169    #[inline(always)]
170    pub fn wr_lock_wifi_mac(&self) -> WR_LOCK_WIFI_MAC_R {
171        WR_LOCK_WIFI_MAC_R::new(((self.bits >> 18) & 1) != 0)
172    }
173    #[doc = "Bit 19"]
174    #[inline(always)]
175    pub fn wr_lock_key_slot_0(&self) -> WR_LOCK_KEY_SLOT_0_R {
176        WR_LOCK_KEY_SLOT_0_R::new(((self.bits >> 19) & 1) != 0)
177    }
178    #[doc = "Bit 20"]
179    #[inline(always)]
180    pub fn wr_lock_key_slot_1(&self) -> WR_LOCK_KEY_SLOT_1_R {
181        WR_LOCK_KEY_SLOT_1_R::new(((self.bits >> 20) & 1) != 0)
182    }
183    #[doc = "Bit 21"]
184    #[inline(always)]
185    pub fn wr_lock_key_slot_2(&self) -> WR_LOCK_KEY_SLOT_2_R {
186        WR_LOCK_KEY_SLOT_2_R::new(((self.bits >> 21) & 1) != 0)
187    }
188    #[doc = "Bit 22"]
189    #[inline(always)]
190    pub fn wr_lock_key_slot_3(&self) -> WR_LOCK_KEY_SLOT_3_R {
191        WR_LOCK_KEY_SLOT_3_R::new(((self.bits >> 22) & 1) != 0)
192    }
193    #[doc = "Bit 23"]
194    #[inline(always)]
195    pub fn wr_lock_key_slot_4_h(&self) -> WR_LOCK_KEY_SLOT_4_H_R {
196        WR_LOCK_KEY_SLOT_4_H_R::new(((self.bits >> 23) & 1) != 0)
197    }
198    #[doc = "Bit 24"]
199    #[inline(always)]
200    pub fn wr_lock_key_slot_5_h(&self) -> WR_LOCK_KEY_SLOT_5_H_R {
201        WR_LOCK_KEY_SLOT_5_H_R::new(((self.bits >> 24) & 1) != 0)
202    }
203    #[doc = "Bit 25"]
204    #[inline(always)]
205    pub fn rd_lock_dbg_pwd(&self) -> RD_LOCK_DBG_PWD_R {
206        RD_LOCK_DBG_PWD_R::new(((self.bits >> 25) & 1) != 0)
207    }
208    #[doc = "Bit 26"]
209    #[inline(always)]
210    pub fn rd_lock_key_slot_0(&self) -> RD_LOCK_KEY_SLOT_0_R {
211        RD_LOCK_KEY_SLOT_0_R::new(((self.bits >> 26) & 1) != 0)
212    }
213    #[doc = "Bit 27"]
214    #[inline(always)]
215    pub fn rd_lock_key_slot_1(&self) -> RD_LOCK_KEY_SLOT_1_R {
216        RD_LOCK_KEY_SLOT_1_R::new(((self.bits >> 27) & 1) != 0)
217    }
218    #[doc = "Bit 28"]
219    #[inline(always)]
220    pub fn rd_lock_key_slot_2(&self) -> RD_LOCK_KEY_SLOT_2_R {
221        RD_LOCK_KEY_SLOT_2_R::new(((self.bits >> 28) & 1) != 0)
222    }
223    #[doc = "Bit 29"]
224    #[inline(always)]
225    pub fn rd_lock_key_slot_3(&self) -> RD_LOCK_KEY_SLOT_3_R {
226        RD_LOCK_KEY_SLOT_3_R::new(((self.bits >> 29) & 1) != 0)
227    }
228    #[doc = "Bit 30"]
229    #[inline(always)]
230    pub fn rd_lock_key_slot_4(&self) -> RD_LOCK_KEY_SLOT_4_R {
231        RD_LOCK_KEY_SLOT_4_R::new(((self.bits >> 30) & 1) != 0)
232    }
233    #[doc = "Bit 31"]
234    #[inline(always)]
235    pub fn rd_lock_key_slot_5(&self) -> RD_LOCK_KEY_SLOT_5_R {
236        RD_LOCK_KEY_SLOT_5_R::new(((self.bits >> 31) & 1) != 0)
237    }
238}
239impl W {
240    #[doc = "Bits 0:12"]
241    #[inline(always)]
242    #[must_use]
243    pub fn ef_ana_trim_1(&mut self) -> EF_ANA_TRIM_1_W<0> {
244        EF_ANA_TRIM_1_W::new(self)
245    }
246    #[doc = "Bit 13"]
247    #[inline(always)]
248    #[must_use]
249    pub fn wr_lock_key_slot_4_l(&mut self) -> WR_LOCK_KEY_SLOT_4_L_W<13> {
250        WR_LOCK_KEY_SLOT_4_L_W::new(self)
251    }
252    #[doc = "Bit 14"]
253    #[inline(always)]
254    #[must_use]
255    pub fn wr_lock_key_slot_5_l(&mut self) -> WR_LOCK_KEY_SLOT_5_L_W<14> {
256        WR_LOCK_KEY_SLOT_5_L_W::new(self)
257    }
258    #[doc = "Bit 15"]
259    #[inline(always)]
260    #[must_use]
261    pub fn wr_lock_boot_mode(&mut self) -> WR_LOCK_BOOT_MODE_W<15> {
262        WR_LOCK_BOOT_MODE_W::new(self)
263    }
264    #[doc = "Bit 16"]
265    #[inline(always)]
266    #[must_use]
267    pub fn wr_lock_dbg_pwd(&mut self) -> WR_LOCK_DBG_PWD_W<16> {
268        WR_LOCK_DBG_PWD_W::new(self)
269    }
270    #[doc = "Bit 17"]
271    #[inline(always)]
272    #[must_use]
273    pub fn wr_lock_sw_usage_0(&mut self) -> WR_LOCK_SW_USAGE_0_W<17> {
274        WR_LOCK_SW_USAGE_0_W::new(self)
275    }
276    #[doc = "Bit 18"]
277    #[inline(always)]
278    #[must_use]
279    pub fn wr_lock_wifi_mac(&mut self) -> WR_LOCK_WIFI_MAC_W<18> {
280        WR_LOCK_WIFI_MAC_W::new(self)
281    }
282    #[doc = "Bit 19"]
283    #[inline(always)]
284    #[must_use]
285    pub fn wr_lock_key_slot_0(&mut self) -> WR_LOCK_KEY_SLOT_0_W<19> {
286        WR_LOCK_KEY_SLOT_0_W::new(self)
287    }
288    #[doc = "Bit 20"]
289    #[inline(always)]
290    #[must_use]
291    pub fn wr_lock_key_slot_1(&mut self) -> WR_LOCK_KEY_SLOT_1_W<20> {
292        WR_LOCK_KEY_SLOT_1_W::new(self)
293    }
294    #[doc = "Bit 21"]
295    #[inline(always)]
296    #[must_use]
297    pub fn wr_lock_key_slot_2(&mut self) -> WR_LOCK_KEY_SLOT_2_W<21> {
298        WR_LOCK_KEY_SLOT_2_W::new(self)
299    }
300    #[doc = "Bit 22"]
301    #[inline(always)]
302    #[must_use]
303    pub fn wr_lock_key_slot_3(&mut self) -> WR_LOCK_KEY_SLOT_3_W<22> {
304        WR_LOCK_KEY_SLOT_3_W::new(self)
305    }
306    #[doc = "Bit 23"]
307    #[inline(always)]
308    #[must_use]
309    pub fn wr_lock_key_slot_4_h(&mut self) -> WR_LOCK_KEY_SLOT_4_H_W<23> {
310        WR_LOCK_KEY_SLOT_4_H_W::new(self)
311    }
312    #[doc = "Bit 24"]
313    #[inline(always)]
314    #[must_use]
315    pub fn wr_lock_key_slot_5_h(&mut self) -> WR_LOCK_KEY_SLOT_5_H_W<24> {
316        WR_LOCK_KEY_SLOT_5_H_W::new(self)
317    }
318    #[doc = "Bit 25"]
319    #[inline(always)]
320    #[must_use]
321    pub fn rd_lock_dbg_pwd(&mut self) -> RD_LOCK_DBG_PWD_W<25> {
322        RD_LOCK_DBG_PWD_W::new(self)
323    }
324    #[doc = "Bit 26"]
325    #[inline(always)]
326    #[must_use]
327    pub fn rd_lock_key_slot_0(&mut self) -> RD_LOCK_KEY_SLOT_0_W<26> {
328        RD_LOCK_KEY_SLOT_0_W::new(self)
329    }
330    #[doc = "Bit 27"]
331    #[inline(always)]
332    #[must_use]
333    pub fn rd_lock_key_slot_1(&mut self) -> RD_LOCK_KEY_SLOT_1_W<27> {
334        RD_LOCK_KEY_SLOT_1_W::new(self)
335    }
336    #[doc = "Bit 28"]
337    #[inline(always)]
338    #[must_use]
339    pub fn rd_lock_key_slot_2(&mut self) -> RD_LOCK_KEY_SLOT_2_W<28> {
340        RD_LOCK_KEY_SLOT_2_W::new(self)
341    }
342    #[doc = "Bit 29"]
343    #[inline(always)]
344    #[must_use]
345    pub fn rd_lock_key_slot_3(&mut self) -> RD_LOCK_KEY_SLOT_3_W<29> {
346        RD_LOCK_KEY_SLOT_3_W::new(self)
347    }
348    #[doc = "Bit 30"]
349    #[inline(always)]
350    #[must_use]
351    pub fn rd_lock_key_slot_4(&mut self) -> RD_LOCK_KEY_SLOT_4_W<30> {
352        RD_LOCK_KEY_SLOT_4_W::new(self)
353    }
354    #[doc = "Bit 31"]
355    #[inline(always)]
356    #[must_use]
357    pub fn rd_lock_key_slot_5(&mut self) -> RD_LOCK_KEY_SLOT_5_W<31> {
358        RD_LOCK_KEY_SLOT_5_W::new(self)
359    }
360    #[doc = "Writes raw bits to the register."]
361    #[inline(always)]
362    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
363        self.0.bits(bits);
364        self
365    }
366}
367#[doc = "ef_data_0_lock.\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_data_0_lock](index.html) module"]
368pub struct EF_DATA_0_LOCK_SPEC;
369impl crate::RegisterSpec for EF_DATA_0_LOCK_SPEC {
370    type Ux = u32;
371}
372#[doc = "`read()` method returns [ef_data_0_lock::R](R) reader structure"]
373impl crate::Readable for EF_DATA_0_LOCK_SPEC {
374    type Reader = R;
375}
376#[doc = "`write(|w| ..)` method takes [ef_data_0_lock::W](W) writer structure"]
377impl crate::Writable for EF_DATA_0_LOCK_SPEC {
378    type Writer = W;
379    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
380    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
381}
382#[doc = "`reset()` method sets ef_data_0_lock to value 0"]
383impl crate::Resettable for EF_DATA_0_LOCK_SPEC {
384    const RESET_VALUE: Self::Ux = 0;
385}