bl602_pac/ef_ctrl/
ef_if_cfg_0.rs

1#[doc = "Register `ef_if_cfg_0` reader"]
2pub struct R(crate::R<EF_IF_CFG_0_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<EF_IF_CFG_0_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<EF_IF_CFG_0_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<EF_IF_CFG_0_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `ef_if_sf_aes_mode` reader - "]
17pub type EF_IF_SF_AES_MODE_R = crate::FieldReader<u8, u8>;
18#[doc = "Field `ef_if_sboot_sign_mode` reader - "]
19pub type EF_IF_SBOOT_SIGN_MODE_R = crate::FieldReader<u8, u8>;
20#[doc = "Field `ef_if_sboot_en` reader - "]
21pub type EF_IF_SBOOT_EN_R = crate::FieldReader<u8, u8>;
22#[doc = "Field `ef_if_cpu1_enc_en` reader - "]
23pub type EF_IF_CPU1_ENC_EN_R = crate::BitReader<bool>;
24#[doc = "Field `ef_if_cpu0_enc_en` reader - "]
25pub type EF_IF_CPU0_ENC_EN_R = crate::BitReader<bool>;
26#[doc = "Field `ef_if_boot_sel` reader - "]
27pub type EF_IF_BOOT_SEL_R = crate::FieldReader<u8, u8>;
28#[doc = "Field `ef_if_sw_usage_1` reader - "]
29pub type EF_IF_SW_USAGE_1_R = crate::FieldReader<u8, u8>;
30#[doc = "Field `ef_if_sdu_dis` reader - "]
31pub type EF_IF_SDU_DIS_R = crate::BitReader<bool>;
32#[doc = "Field `ef_if_ble_dis` reader - "]
33pub type EF_IF_BLE_DIS_R = crate::BitReader<bool>;
34#[doc = "Field `ef_if_wifi_dis` reader - "]
35pub type EF_IF_WIFI_DIS_R = crate::BitReader<bool>;
36#[doc = "Field `ef_if_0_key_enc_en` reader - "]
37pub type EF_IF_0_KEY_ENC_EN_R = crate::BitReader<bool>;
38#[doc = "Field `ef_if_cam_dis` reader - "]
39pub type EF_IF_CAM_DIS_R = crate::BitReader<bool>;
40#[doc = "Field `ef_if_sf_dis` reader - "]
41pub type EF_IF_SF_DIS_R = crate::BitReader<bool>;
42#[doc = "Field `ef_if_cpu1_dis` reader - "]
43pub type EF_IF_CPU1_DIS_R = crate::BitReader<bool>;
44#[doc = "Field `ef_if_cpu_rst_dbg_dis` reader - "]
45pub type EF_IF_CPU_RST_DBG_DIS_R = crate::BitReader<bool>;
46#[doc = "Field `ef_if_se_dbg_dis` reader - "]
47pub type EF_IF_SE_DBG_DIS_R = crate::BitReader<bool>;
48#[doc = "Field `ef_if_efuse_dbg_dis` reader - "]
49pub type EF_IF_EFUSE_DBG_DIS_R = crate::BitReader<bool>;
50#[doc = "Field `ef_if_dbg_jtag_1_dis` reader - "]
51pub type EF_IF_DBG_JTAG_1_DIS_R = crate::FieldReader<u8, u8>;
52#[doc = "Field `ef_if_dbg_jtag_0_dis` reader - "]
53pub type EF_IF_DBG_JTAG_0_DIS_R = crate::FieldReader<u8, u8>;
54#[doc = "Field `ef_if_dbg_mode` reader - "]
55pub type EF_IF_DBG_MODE_R = crate::FieldReader<u8, u8>;
56impl R {
57    #[doc = "Bits 0:1"]
58    #[inline(always)]
59    pub fn ef_if_sf_aes_mode(&self) -> EF_IF_SF_AES_MODE_R {
60        EF_IF_SF_AES_MODE_R::new((self.bits & 3) as u8)
61    }
62    #[doc = "Bits 2:3"]
63    #[inline(always)]
64    pub fn ef_if_sboot_sign_mode(&self) -> EF_IF_SBOOT_SIGN_MODE_R {
65        EF_IF_SBOOT_SIGN_MODE_R::new(((self.bits >> 2) & 3) as u8)
66    }
67    #[doc = "Bits 4:5"]
68    #[inline(always)]
69    pub fn ef_if_sboot_en(&self) -> EF_IF_SBOOT_EN_R {
70        EF_IF_SBOOT_EN_R::new(((self.bits >> 4) & 3) as u8)
71    }
72    #[doc = "Bit 6"]
73    #[inline(always)]
74    pub fn ef_if_cpu1_enc_en(&self) -> EF_IF_CPU1_ENC_EN_R {
75        EF_IF_CPU1_ENC_EN_R::new(((self.bits >> 6) & 1) != 0)
76    }
77    #[doc = "Bit 7"]
78    #[inline(always)]
79    pub fn ef_if_cpu0_enc_en(&self) -> EF_IF_CPU0_ENC_EN_R {
80        EF_IF_CPU0_ENC_EN_R::new(((self.bits >> 7) & 1) != 0)
81    }
82    #[doc = "Bits 8:11"]
83    #[inline(always)]
84    pub fn ef_if_boot_sel(&self) -> EF_IF_BOOT_SEL_R {
85        EF_IF_BOOT_SEL_R::new(((self.bits >> 8) & 0x0f) as u8)
86    }
87    #[doc = "Bits 12:13"]
88    #[inline(always)]
89    pub fn ef_if_sw_usage_1(&self) -> EF_IF_SW_USAGE_1_R {
90        EF_IF_SW_USAGE_1_R::new(((self.bits >> 12) & 3) as u8)
91    }
92    #[doc = "Bit 14"]
93    #[inline(always)]
94    pub fn ef_if_sdu_dis(&self) -> EF_IF_SDU_DIS_R {
95        EF_IF_SDU_DIS_R::new(((self.bits >> 14) & 1) != 0)
96    }
97    #[doc = "Bit 15"]
98    #[inline(always)]
99    pub fn ef_if_ble_dis(&self) -> EF_IF_BLE_DIS_R {
100        EF_IF_BLE_DIS_R::new(((self.bits >> 15) & 1) != 0)
101    }
102    #[doc = "Bit 16"]
103    #[inline(always)]
104    pub fn ef_if_wifi_dis(&self) -> EF_IF_WIFI_DIS_R {
105        EF_IF_WIFI_DIS_R::new(((self.bits >> 16) & 1) != 0)
106    }
107    #[doc = "Bit 17"]
108    #[inline(always)]
109    pub fn ef_if_0_key_enc_en(&self) -> EF_IF_0_KEY_ENC_EN_R {
110        EF_IF_0_KEY_ENC_EN_R::new(((self.bits >> 17) & 1) != 0)
111    }
112    #[doc = "Bit 18"]
113    #[inline(always)]
114    pub fn ef_if_cam_dis(&self) -> EF_IF_CAM_DIS_R {
115        EF_IF_CAM_DIS_R::new(((self.bits >> 18) & 1) != 0)
116    }
117    #[doc = "Bit 19"]
118    #[inline(always)]
119    pub fn ef_if_sf_dis(&self) -> EF_IF_SF_DIS_R {
120        EF_IF_SF_DIS_R::new(((self.bits >> 19) & 1) != 0)
121    }
122    #[doc = "Bit 20"]
123    #[inline(always)]
124    pub fn ef_if_cpu1_dis(&self) -> EF_IF_CPU1_DIS_R {
125        EF_IF_CPU1_DIS_R::new(((self.bits >> 20) & 1) != 0)
126    }
127    #[doc = "Bit 21"]
128    #[inline(always)]
129    pub fn ef_if_cpu_rst_dbg_dis(&self) -> EF_IF_CPU_RST_DBG_DIS_R {
130        EF_IF_CPU_RST_DBG_DIS_R::new(((self.bits >> 21) & 1) != 0)
131    }
132    #[doc = "Bit 22"]
133    #[inline(always)]
134    pub fn ef_if_se_dbg_dis(&self) -> EF_IF_SE_DBG_DIS_R {
135        EF_IF_SE_DBG_DIS_R::new(((self.bits >> 22) & 1) != 0)
136    }
137    #[doc = "Bit 23"]
138    #[inline(always)]
139    pub fn ef_if_efuse_dbg_dis(&self) -> EF_IF_EFUSE_DBG_DIS_R {
140        EF_IF_EFUSE_DBG_DIS_R::new(((self.bits >> 23) & 1) != 0)
141    }
142    #[doc = "Bits 24:25"]
143    #[inline(always)]
144    pub fn ef_if_dbg_jtag_1_dis(&self) -> EF_IF_DBG_JTAG_1_DIS_R {
145        EF_IF_DBG_JTAG_1_DIS_R::new(((self.bits >> 24) & 3) as u8)
146    }
147    #[doc = "Bits 26:27"]
148    #[inline(always)]
149    pub fn ef_if_dbg_jtag_0_dis(&self) -> EF_IF_DBG_JTAG_0_DIS_R {
150        EF_IF_DBG_JTAG_0_DIS_R::new(((self.bits >> 26) & 3) as u8)
151    }
152    #[doc = "Bits 28:31"]
153    #[inline(always)]
154    pub fn ef_if_dbg_mode(&self) -> EF_IF_DBG_MODE_R {
155        EF_IF_DBG_MODE_R::new(((self.bits >> 28) & 0x0f) as u8)
156    }
157}
158#[doc = "ef_if_cfg_0.\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 [ef_if_cfg_0](index.html) module"]
159pub struct EF_IF_CFG_0_SPEC;
160impl crate::RegisterSpec for EF_IF_CFG_0_SPEC {
161    type Ux = u32;
162}
163#[doc = "`read()` method returns [ef_if_cfg_0::R](R) reader structure"]
164impl crate::Readable for EF_IF_CFG_0_SPEC {
165    type Reader = R;
166}
167#[doc = "`reset()` method sets ef_if_cfg_0 to value 0"]
168impl crate::Resettable for EF_IF_CFG_0_SPEC {
169    const RESET_VALUE: Self::Ux = 0;
170}