1#[doc = "Register `ef_sw_cfg_0` reader"]
2pub struct R(crate::R<EF_SW_CFG_0_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<EF_SW_CFG_0_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<EF_SW_CFG_0_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<EF_SW_CFG_0_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `ef_sw_cfg_0` writer"]
17pub struct W(crate::W<EF_SW_CFG_0_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<EF_SW_CFG_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_SW_CFG_0_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<EF_SW_CFG_0_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `ef_sw_sf_aes_mode` reader - "]
38pub type EF_SW_SF_AES_MODE_R = crate::FieldReader<u8, u8>;
39#[doc = "Field `ef_sw_sf_aes_mode` writer - "]
40pub type EF_SW_SF_AES_MODE_W<'a, const O: u8> =
41 crate::FieldWriter<'a, u32, EF_SW_CFG_0_SPEC, u8, u8, 2, O>;
42#[doc = "Field `ef_sw_sboot_sign_mode` reader - "]
43pub type EF_SW_SBOOT_SIGN_MODE_R = crate::FieldReader<u8, u8>;
44#[doc = "Field `ef_sw_sboot_sign_mode` writer - "]
45pub type EF_SW_SBOOT_SIGN_MODE_W<'a, const O: u8> =
46 crate::FieldWriter<'a, u32, EF_SW_CFG_0_SPEC, u8, u8, 2, O>;
47#[doc = "Field `ef_sw_sboot_en` reader - "]
48pub type EF_SW_SBOOT_EN_R = crate::FieldReader<u8, u8>;
49#[doc = "Field `ef_sw_sboot_en` writer - "]
50pub type EF_SW_SBOOT_EN_W<'a, const O: u8> =
51 crate::FieldWriter<'a, u32, EF_SW_CFG_0_SPEC, u8, u8, 2, O>;
52#[doc = "Field `ef_sw_cpu1_enc_en` reader - "]
53pub type EF_SW_CPU1_ENC_EN_R = crate::BitReader<bool>;
54#[doc = "Field `ef_sw_cpu1_enc_en` writer - "]
55pub type EF_SW_CPU1_ENC_EN_W<'a, const O: u8> =
56 crate::BitWriter<'a, u32, EF_SW_CFG_0_SPEC, bool, O>;
57#[doc = "Field `ef_sw_cpu0_enc_en` reader - "]
58pub type EF_SW_CPU0_ENC_EN_R = crate::BitReader<bool>;
59#[doc = "Field `ef_sw_cpu0_enc_en` writer - "]
60pub type EF_SW_CPU0_ENC_EN_W<'a, const O: u8> =
61 crate::BitWriter<'a, u32, EF_SW_CFG_0_SPEC, bool, O>;
62#[doc = "Field `ef_sw_sf_key_0_sel` reader - "]
63pub type EF_SW_SF_KEY_0_SEL_R = crate::FieldReader<u8, u8>;
64#[doc = "Field `ef_sw_sf_key_0_sel` writer - "]
65pub type EF_SW_SF_KEY_0_SEL_W<'a, const O: u8> =
66 crate::FieldWriter<'a, u32, EF_SW_CFG_0_SPEC, u8, u8, 2, O>;
67#[doc = "Field `ef_sw_sdu_dis` reader - "]
68pub type EF_SW_SDU_DIS_R = crate::BitReader<bool>;
69#[doc = "Field `ef_sw_sdu_dis` writer - "]
70pub type EF_SW_SDU_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_SW_CFG_0_SPEC, bool, O>;
71#[doc = "Field `ef_sw_ble_dis` reader - "]
72pub type EF_SW_BLE_DIS_R = crate::BitReader<bool>;
73#[doc = "Field `ef_sw_ble_dis` writer - "]
74pub type EF_SW_BLE_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_SW_CFG_0_SPEC, bool, O>;
75#[doc = "Field `ef_sw_wifi_dis` reader - "]
76pub type EF_SW_WIFI_DIS_R = crate::BitReader<bool>;
77#[doc = "Field `ef_sw_wifi_dis` writer - "]
78pub type EF_SW_WIFI_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_SW_CFG_0_SPEC, bool, O>;
79#[doc = "Field `ef_sw_0_key_enc_en` reader - "]
80pub type EF_SW_0_KEY_ENC_EN_R = crate::BitReader<bool>;
81#[doc = "Field `ef_sw_0_key_enc_en` writer - "]
82pub type EF_SW_0_KEY_ENC_EN_W<'a, const O: u8> =
83 crate::BitWriter<'a, u32, EF_SW_CFG_0_SPEC, bool, O>;
84#[doc = "Field `ef_sw_cam_dis` reader - "]
85pub type EF_SW_CAM_DIS_R = crate::BitReader<bool>;
86#[doc = "Field `ef_sw_cam_dis` writer - "]
87pub type EF_SW_CAM_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_SW_CFG_0_SPEC, bool, O>;
88#[doc = "Field `ef_sw_sf_dis` reader - "]
89pub type EF_SW_SF_DIS_R = crate::BitReader<bool>;
90#[doc = "Field `ef_sw_sf_dis` writer - "]
91pub type EF_SW_SF_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_SW_CFG_0_SPEC, bool, O>;
92#[doc = "Field `ef_sw_cpu1_dis` reader - "]
93pub type EF_SW_CPU1_DIS_R = crate::BitReader<bool>;
94#[doc = "Field `ef_sw_cpu1_dis` writer - "]
95pub type EF_SW_CPU1_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_SW_CFG_0_SPEC, bool, O>;
96#[doc = "Field `ef_sw_cpu_rst_dbg_dis` reader - "]
97pub type EF_SW_CPU_RST_DBG_DIS_R = crate::BitReader<bool>;
98#[doc = "Field `ef_sw_cpu_rst_dbg_dis` writer - "]
99pub type EF_SW_CPU_RST_DBG_DIS_W<'a, const O: u8> =
100 crate::BitWriter<'a, u32, EF_SW_CFG_0_SPEC, bool, O>;
101#[doc = "Field `ef_sw_se_dbg_dis` reader - "]
102pub type EF_SW_SE_DBG_DIS_R = crate::BitReader<bool>;
103#[doc = "Field `ef_sw_se_dbg_dis` writer - "]
104pub type EF_SW_SE_DBG_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_SW_CFG_0_SPEC, bool, O>;
105#[doc = "Field `ef_sw_efuse_dbg_dis` reader - "]
106pub type EF_SW_EFUSE_DBG_DIS_R = crate::BitReader<bool>;
107#[doc = "Field `ef_sw_efuse_dbg_dis` writer - "]
108pub type EF_SW_EFUSE_DBG_DIS_W<'a, const O: u8> =
109 crate::BitWriter<'a, u32, EF_SW_CFG_0_SPEC, bool, O>;
110#[doc = "Field `ef_sw_dbg_jtag_1_dis` reader - "]
111pub type EF_SW_DBG_JTAG_1_DIS_R = crate::FieldReader<u8, u8>;
112#[doc = "Field `ef_sw_dbg_jtag_1_dis` writer - "]
113pub type EF_SW_DBG_JTAG_1_DIS_W<'a, const O: u8> =
114 crate::FieldWriter<'a, u32, EF_SW_CFG_0_SPEC, u8, u8, 2, O>;
115#[doc = "Field `ef_sw_dbg_jtag_0_dis` reader - "]
116pub type EF_SW_DBG_JTAG_0_DIS_R = crate::FieldReader<u8, u8>;
117#[doc = "Field `ef_sw_dbg_jtag_0_dis` writer - "]
118pub type EF_SW_DBG_JTAG_0_DIS_W<'a, const O: u8> =
119 crate::FieldWriter<'a, u32, EF_SW_CFG_0_SPEC, u8, u8, 2, O>;
120#[doc = "Field `ef_sw_dbg_mode` reader - "]
121pub type EF_SW_DBG_MODE_R = crate::FieldReader<u8, u8>;
122#[doc = "Field `ef_sw_dbg_mode` writer - "]
123pub type EF_SW_DBG_MODE_W<'a, const O: u8> =
124 crate::FieldWriter<'a, u32, EF_SW_CFG_0_SPEC, u8, u8, 4, O>;
125impl R {
126 #[doc = "Bits 0:1"]
127 #[inline(always)]
128 pub fn ef_sw_sf_aes_mode(&self) -> EF_SW_SF_AES_MODE_R {
129 EF_SW_SF_AES_MODE_R::new((self.bits & 3) as u8)
130 }
131 #[doc = "Bits 2:3"]
132 #[inline(always)]
133 pub fn ef_sw_sboot_sign_mode(&self) -> EF_SW_SBOOT_SIGN_MODE_R {
134 EF_SW_SBOOT_SIGN_MODE_R::new(((self.bits >> 2) & 3) as u8)
135 }
136 #[doc = "Bits 4:5"]
137 #[inline(always)]
138 pub fn ef_sw_sboot_en(&self) -> EF_SW_SBOOT_EN_R {
139 EF_SW_SBOOT_EN_R::new(((self.bits >> 4) & 3) as u8)
140 }
141 #[doc = "Bit 6"]
142 #[inline(always)]
143 pub fn ef_sw_cpu1_enc_en(&self) -> EF_SW_CPU1_ENC_EN_R {
144 EF_SW_CPU1_ENC_EN_R::new(((self.bits >> 6) & 1) != 0)
145 }
146 #[doc = "Bit 7"]
147 #[inline(always)]
148 pub fn ef_sw_cpu0_enc_en(&self) -> EF_SW_CPU0_ENC_EN_R {
149 EF_SW_CPU0_ENC_EN_R::new(((self.bits >> 7) & 1) != 0)
150 }
151 #[doc = "Bits 12:13"]
152 #[inline(always)]
153 pub fn ef_sw_sf_key_0_sel(&self) -> EF_SW_SF_KEY_0_SEL_R {
154 EF_SW_SF_KEY_0_SEL_R::new(((self.bits >> 12) & 3) as u8)
155 }
156 #[doc = "Bit 14"]
157 #[inline(always)]
158 pub fn ef_sw_sdu_dis(&self) -> EF_SW_SDU_DIS_R {
159 EF_SW_SDU_DIS_R::new(((self.bits >> 14) & 1) != 0)
160 }
161 #[doc = "Bit 15"]
162 #[inline(always)]
163 pub fn ef_sw_ble_dis(&self) -> EF_SW_BLE_DIS_R {
164 EF_SW_BLE_DIS_R::new(((self.bits >> 15) & 1) != 0)
165 }
166 #[doc = "Bit 16"]
167 #[inline(always)]
168 pub fn ef_sw_wifi_dis(&self) -> EF_SW_WIFI_DIS_R {
169 EF_SW_WIFI_DIS_R::new(((self.bits >> 16) & 1) != 0)
170 }
171 #[doc = "Bit 17"]
172 #[inline(always)]
173 pub fn ef_sw_0_key_enc_en(&self) -> EF_SW_0_KEY_ENC_EN_R {
174 EF_SW_0_KEY_ENC_EN_R::new(((self.bits >> 17) & 1) != 0)
175 }
176 #[doc = "Bit 18"]
177 #[inline(always)]
178 pub fn ef_sw_cam_dis(&self) -> EF_SW_CAM_DIS_R {
179 EF_SW_CAM_DIS_R::new(((self.bits >> 18) & 1) != 0)
180 }
181 #[doc = "Bit 19"]
182 #[inline(always)]
183 pub fn ef_sw_sf_dis(&self) -> EF_SW_SF_DIS_R {
184 EF_SW_SF_DIS_R::new(((self.bits >> 19) & 1) != 0)
185 }
186 #[doc = "Bit 20"]
187 #[inline(always)]
188 pub fn ef_sw_cpu1_dis(&self) -> EF_SW_CPU1_DIS_R {
189 EF_SW_CPU1_DIS_R::new(((self.bits >> 20) & 1) != 0)
190 }
191 #[doc = "Bit 21"]
192 #[inline(always)]
193 pub fn ef_sw_cpu_rst_dbg_dis(&self) -> EF_SW_CPU_RST_DBG_DIS_R {
194 EF_SW_CPU_RST_DBG_DIS_R::new(((self.bits >> 21) & 1) != 0)
195 }
196 #[doc = "Bit 22"]
197 #[inline(always)]
198 pub fn ef_sw_se_dbg_dis(&self) -> EF_SW_SE_DBG_DIS_R {
199 EF_SW_SE_DBG_DIS_R::new(((self.bits >> 22) & 1) != 0)
200 }
201 #[doc = "Bit 23"]
202 #[inline(always)]
203 pub fn ef_sw_efuse_dbg_dis(&self) -> EF_SW_EFUSE_DBG_DIS_R {
204 EF_SW_EFUSE_DBG_DIS_R::new(((self.bits >> 23) & 1) != 0)
205 }
206 #[doc = "Bits 24:25"]
207 #[inline(always)]
208 pub fn ef_sw_dbg_jtag_1_dis(&self) -> EF_SW_DBG_JTAG_1_DIS_R {
209 EF_SW_DBG_JTAG_1_DIS_R::new(((self.bits >> 24) & 3) as u8)
210 }
211 #[doc = "Bits 26:27"]
212 #[inline(always)]
213 pub fn ef_sw_dbg_jtag_0_dis(&self) -> EF_SW_DBG_JTAG_0_DIS_R {
214 EF_SW_DBG_JTAG_0_DIS_R::new(((self.bits >> 26) & 3) as u8)
215 }
216 #[doc = "Bits 28:31"]
217 #[inline(always)]
218 pub fn ef_sw_dbg_mode(&self) -> EF_SW_DBG_MODE_R {
219 EF_SW_DBG_MODE_R::new(((self.bits >> 28) & 0x0f) as u8)
220 }
221}
222impl W {
223 #[doc = "Bits 0:1"]
224 #[inline(always)]
225 #[must_use]
226 pub fn ef_sw_sf_aes_mode(&mut self) -> EF_SW_SF_AES_MODE_W<0> {
227 EF_SW_SF_AES_MODE_W::new(self)
228 }
229 #[doc = "Bits 2:3"]
230 #[inline(always)]
231 #[must_use]
232 pub fn ef_sw_sboot_sign_mode(&mut self) -> EF_SW_SBOOT_SIGN_MODE_W<2> {
233 EF_SW_SBOOT_SIGN_MODE_W::new(self)
234 }
235 #[doc = "Bits 4:5"]
236 #[inline(always)]
237 #[must_use]
238 pub fn ef_sw_sboot_en(&mut self) -> EF_SW_SBOOT_EN_W<4> {
239 EF_SW_SBOOT_EN_W::new(self)
240 }
241 #[doc = "Bit 6"]
242 #[inline(always)]
243 #[must_use]
244 pub fn ef_sw_cpu1_enc_en(&mut self) -> EF_SW_CPU1_ENC_EN_W<6> {
245 EF_SW_CPU1_ENC_EN_W::new(self)
246 }
247 #[doc = "Bit 7"]
248 #[inline(always)]
249 #[must_use]
250 pub fn ef_sw_cpu0_enc_en(&mut self) -> EF_SW_CPU0_ENC_EN_W<7> {
251 EF_SW_CPU0_ENC_EN_W::new(self)
252 }
253 #[doc = "Bits 12:13"]
254 #[inline(always)]
255 #[must_use]
256 pub fn ef_sw_sf_key_0_sel(&mut self) -> EF_SW_SF_KEY_0_SEL_W<12> {
257 EF_SW_SF_KEY_0_SEL_W::new(self)
258 }
259 #[doc = "Bit 14"]
260 #[inline(always)]
261 #[must_use]
262 pub fn ef_sw_sdu_dis(&mut self) -> EF_SW_SDU_DIS_W<14> {
263 EF_SW_SDU_DIS_W::new(self)
264 }
265 #[doc = "Bit 15"]
266 #[inline(always)]
267 #[must_use]
268 pub fn ef_sw_ble_dis(&mut self) -> EF_SW_BLE_DIS_W<15> {
269 EF_SW_BLE_DIS_W::new(self)
270 }
271 #[doc = "Bit 16"]
272 #[inline(always)]
273 #[must_use]
274 pub fn ef_sw_wifi_dis(&mut self) -> EF_SW_WIFI_DIS_W<16> {
275 EF_SW_WIFI_DIS_W::new(self)
276 }
277 #[doc = "Bit 17"]
278 #[inline(always)]
279 #[must_use]
280 pub fn ef_sw_0_key_enc_en(&mut self) -> EF_SW_0_KEY_ENC_EN_W<17> {
281 EF_SW_0_KEY_ENC_EN_W::new(self)
282 }
283 #[doc = "Bit 18"]
284 #[inline(always)]
285 #[must_use]
286 pub fn ef_sw_cam_dis(&mut self) -> EF_SW_CAM_DIS_W<18> {
287 EF_SW_CAM_DIS_W::new(self)
288 }
289 #[doc = "Bit 19"]
290 #[inline(always)]
291 #[must_use]
292 pub fn ef_sw_sf_dis(&mut self) -> EF_SW_SF_DIS_W<19> {
293 EF_SW_SF_DIS_W::new(self)
294 }
295 #[doc = "Bit 20"]
296 #[inline(always)]
297 #[must_use]
298 pub fn ef_sw_cpu1_dis(&mut self) -> EF_SW_CPU1_DIS_W<20> {
299 EF_SW_CPU1_DIS_W::new(self)
300 }
301 #[doc = "Bit 21"]
302 #[inline(always)]
303 #[must_use]
304 pub fn ef_sw_cpu_rst_dbg_dis(&mut self) -> EF_SW_CPU_RST_DBG_DIS_W<21> {
305 EF_SW_CPU_RST_DBG_DIS_W::new(self)
306 }
307 #[doc = "Bit 22"]
308 #[inline(always)]
309 #[must_use]
310 pub fn ef_sw_se_dbg_dis(&mut self) -> EF_SW_SE_DBG_DIS_W<22> {
311 EF_SW_SE_DBG_DIS_W::new(self)
312 }
313 #[doc = "Bit 23"]
314 #[inline(always)]
315 #[must_use]
316 pub fn ef_sw_efuse_dbg_dis(&mut self) -> EF_SW_EFUSE_DBG_DIS_W<23> {
317 EF_SW_EFUSE_DBG_DIS_W::new(self)
318 }
319 #[doc = "Bits 24:25"]
320 #[inline(always)]
321 #[must_use]
322 pub fn ef_sw_dbg_jtag_1_dis(&mut self) -> EF_SW_DBG_JTAG_1_DIS_W<24> {
323 EF_SW_DBG_JTAG_1_DIS_W::new(self)
324 }
325 #[doc = "Bits 26:27"]
326 #[inline(always)]
327 #[must_use]
328 pub fn ef_sw_dbg_jtag_0_dis(&mut self) -> EF_SW_DBG_JTAG_0_DIS_W<26> {
329 EF_SW_DBG_JTAG_0_DIS_W::new(self)
330 }
331 #[doc = "Bits 28:31"]
332 #[inline(always)]
333 #[must_use]
334 pub fn ef_sw_dbg_mode(&mut self) -> EF_SW_DBG_MODE_W<28> {
335 EF_SW_DBG_MODE_W::new(self)
336 }
337 #[doc = "Writes raw bits to the register."]
338 #[inline(always)]
339 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
340 self.0.bits(bits);
341 self
342 }
343}
344#[doc = "ef_sw_cfg_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_sw_cfg_0](index.html) module"]
345pub struct EF_SW_CFG_0_SPEC;
346impl crate::RegisterSpec for EF_SW_CFG_0_SPEC {
347 type Ux = u32;
348}
349#[doc = "`read()` method returns [ef_sw_cfg_0::R](R) reader structure"]
350impl crate::Readable for EF_SW_CFG_0_SPEC {
351 type Reader = R;
352}
353#[doc = "`write(|w| ..)` method takes [ef_sw_cfg_0::W](W) writer structure"]
354impl crate::Writable for EF_SW_CFG_0_SPEC {
355 type Writer = W;
356 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
357 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
358}
359#[doc = "`reset()` method sets ef_sw_cfg_0 to value 0"]
360impl crate::Resettable for EF_SW_CFG_0_SPEC {
361 const RESET_VALUE: Self::Ux = 0;
362}