bl702_pac/sf_ctrl/
sf_ctrl_1.rs1#[doc = "Register `sf_ctrl_1` reader"]
2pub struct R(crate::R<SF_CTRL_1_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<SF_CTRL_1_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<SF_CTRL_1_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<SF_CTRL_1_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `sf_ctrl_1` writer"]
17pub struct W(crate::W<SF_CTRL_1_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<SF_CTRL_1_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<SF_CTRL_1_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<SF_CTRL_1_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `sf_if_sr_pat_mask` reader - "]
38pub type SF_IF_SR_PAT_MASK_R = crate::FieldReader<u8, u8>;
39#[doc = "Field `sf_if_sr_pat_mask` writer - "]
40pub type SF_IF_SR_PAT_MASK_W<'a, const O: u8> =
41 crate::FieldWriter<'a, u32, SF_CTRL_1_SPEC, u8, u8, 8, O>;
42#[doc = "Field `sf_if_sr_pat` reader - "]
43pub type SF_IF_SR_PAT_R = crate::FieldReader<u8, u8>;
44#[doc = "Field `sf_if_sr_pat` writer - "]
45pub type SF_IF_SR_PAT_W<'a, const O: u8> =
46 crate::FieldWriter<'a, u32, SF_CTRL_1_SPEC, u8, u8, 8, O>;
47#[doc = "Field `sf_if_sr_int` reader - "]
48pub type SF_IF_SR_INT_R = crate::BitReader<bool>;
49#[doc = "Field `sf_if_sr_int` writer - "]
50pub type SF_IF_SR_INT_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_1_SPEC, bool, O>;
51#[doc = "Field `sf_if_sr_int_en` reader - "]
52pub type SF_IF_SR_INT_EN_R = crate::BitReader<bool>;
53#[doc = "Field `sf_if_sr_int_en` writer - "]
54pub type SF_IF_SR_INT_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_1_SPEC, bool, O>;
55#[doc = "Field `sf_if_sr_int_set` reader - "]
56pub type SF_IF_SR_INT_SET_R = crate::BitReader<bool>;
57#[doc = "Field `sf_if_sr_int_set` writer - "]
58pub type SF_IF_SR_INT_SET_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_1_SPEC, bool, O>;
59#[doc = "Field `sf_if_0_ack_lat` reader - "]
60pub type SF_IF_0_ACK_LAT_R = crate::FieldReader<u8, u8>;
61#[doc = "Field `sf_if_0_ack_lat` writer - "]
62pub type SF_IF_0_ACK_LAT_W<'a, const O: u8> =
63 crate::FieldWriter<'a, u32, SF_CTRL_1_SPEC, u8, u8, 3, O>;
64#[doc = "Field `sf_if_reg_hold` reader - "]
65pub type SF_IF_REG_HOLD_R = crate::BitReader<bool>;
66#[doc = "Field `sf_if_reg_hold` writer - "]
67pub type SF_IF_REG_HOLD_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_1_SPEC, bool, O>;
68#[doc = "Field `sf_if_reg_wp` reader - "]
69pub type SF_IF_REG_WP_R = crate::BitReader<bool>;
70#[doc = "Field `sf_if_reg_wp` writer - "]
71pub type SF_IF_REG_WP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_1_SPEC, bool, O>;
72#[doc = "Field `sf_ahb2sif_stopped` reader - "]
73pub type SF_AHB2SIF_STOPPED_R = crate::BitReader<bool>;
74#[doc = "Field `sf_ahb2sif_stopped` writer - "]
75pub type SF_AHB2SIF_STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_1_SPEC, bool, O>;
76#[doc = "Field `sf_ahb2sif_stop` reader - "]
77pub type SF_AHB2SIF_STOP_R = crate::BitReader<bool>;
78#[doc = "Field `sf_ahb2sif_stop` writer - "]
79pub type SF_AHB2SIF_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_1_SPEC, bool, O>;
80#[doc = "Field `sf_if_fn_sel` reader - "]
81pub type SF_IF_FN_SEL_R = crate::BitReader<bool>;
82#[doc = "Field `sf_if_fn_sel` writer - "]
83pub type SF_IF_FN_SEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_1_SPEC, bool, O>;
84#[doc = "Field `sf_if_en` reader - "]
85pub type SF_IF_EN_R = crate::BitReader<bool>;
86#[doc = "Field `sf_if_en` writer - "]
87pub type SF_IF_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_1_SPEC, bool, O>;
88#[doc = "Field `sf_ahb2sif_en` reader - "]
89pub type SF_AHB2SIF_EN_R = crate::BitReader<bool>;
90#[doc = "Field `sf_ahb2sif_en` writer - "]
91pub type SF_AHB2SIF_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_1_SPEC, bool, O>;
92#[doc = "Field `sf_ahb2sram_en` reader - "]
93pub type SF_AHB2SRAM_EN_R = crate::BitReader<bool>;
94#[doc = "Field `sf_ahb2sram_en` writer - "]
95pub type SF_AHB2SRAM_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_1_SPEC, bool, O>;
96impl R {
97 #[doc = "Bits 0:7"]
98 #[inline(always)]
99 pub fn sf_if_sr_pat_mask(&self) -> SF_IF_SR_PAT_MASK_R {
100 SF_IF_SR_PAT_MASK_R::new((self.bits & 0xff) as u8)
101 }
102 #[doc = "Bits 8:15"]
103 #[inline(always)]
104 pub fn sf_if_sr_pat(&self) -> SF_IF_SR_PAT_R {
105 SF_IF_SR_PAT_R::new(((self.bits >> 8) & 0xff) as u8)
106 }
107 #[doc = "Bit 16"]
108 #[inline(always)]
109 pub fn sf_if_sr_int(&self) -> SF_IF_SR_INT_R {
110 SF_IF_SR_INT_R::new(((self.bits >> 16) & 1) != 0)
111 }
112 #[doc = "Bit 17"]
113 #[inline(always)]
114 pub fn sf_if_sr_int_en(&self) -> SF_IF_SR_INT_EN_R {
115 SF_IF_SR_INT_EN_R::new(((self.bits >> 17) & 1) != 0)
116 }
117 #[doc = "Bit 18"]
118 #[inline(always)]
119 pub fn sf_if_sr_int_set(&self) -> SF_IF_SR_INT_SET_R {
120 SF_IF_SR_INT_SET_R::new(((self.bits >> 18) & 1) != 0)
121 }
122 #[doc = "Bits 20:22"]
123 #[inline(always)]
124 pub fn sf_if_0_ack_lat(&self) -> SF_IF_0_ACK_LAT_R {
125 SF_IF_0_ACK_LAT_R::new(((self.bits >> 20) & 7) as u8)
126 }
127 #[doc = "Bit 24"]
128 #[inline(always)]
129 pub fn sf_if_reg_hold(&self) -> SF_IF_REG_HOLD_R {
130 SF_IF_REG_HOLD_R::new(((self.bits >> 24) & 1) != 0)
131 }
132 #[doc = "Bit 25"]
133 #[inline(always)]
134 pub fn sf_if_reg_wp(&self) -> SF_IF_REG_WP_R {
135 SF_IF_REG_WP_R::new(((self.bits >> 25) & 1) != 0)
136 }
137 #[doc = "Bit 26"]
138 #[inline(always)]
139 pub fn sf_ahb2sif_stopped(&self) -> SF_AHB2SIF_STOPPED_R {
140 SF_AHB2SIF_STOPPED_R::new(((self.bits >> 26) & 1) != 0)
141 }
142 #[doc = "Bit 27"]
143 #[inline(always)]
144 pub fn sf_ahb2sif_stop(&self) -> SF_AHB2SIF_STOP_R {
145 SF_AHB2SIF_STOP_R::new(((self.bits >> 27) & 1) != 0)
146 }
147 #[doc = "Bit 28"]
148 #[inline(always)]
149 pub fn sf_if_fn_sel(&self) -> SF_IF_FN_SEL_R {
150 SF_IF_FN_SEL_R::new(((self.bits >> 28) & 1) != 0)
151 }
152 #[doc = "Bit 29"]
153 #[inline(always)]
154 pub fn sf_if_en(&self) -> SF_IF_EN_R {
155 SF_IF_EN_R::new(((self.bits >> 29) & 1) != 0)
156 }
157 #[doc = "Bit 30"]
158 #[inline(always)]
159 pub fn sf_ahb2sif_en(&self) -> SF_AHB2SIF_EN_R {
160 SF_AHB2SIF_EN_R::new(((self.bits >> 30) & 1) != 0)
161 }
162 #[doc = "Bit 31"]
163 #[inline(always)]
164 pub fn sf_ahb2sram_en(&self) -> SF_AHB2SRAM_EN_R {
165 SF_AHB2SRAM_EN_R::new(((self.bits >> 31) & 1) != 0)
166 }
167}
168impl W {
169 #[doc = "Bits 0:7"]
170 #[inline(always)]
171 #[must_use]
172 pub fn sf_if_sr_pat_mask(&mut self) -> SF_IF_SR_PAT_MASK_W<0> {
173 SF_IF_SR_PAT_MASK_W::new(self)
174 }
175 #[doc = "Bits 8:15"]
176 #[inline(always)]
177 #[must_use]
178 pub fn sf_if_sr_pat(&mut self) -> SF_IF_SR_PAT_W<8> {
179 SF_IF_SR_PAT_W::new(self)
180 }
181 #[doc = "Bit 16"]
182 #[inline(always)]
183 #[must_use]
184 pub fn sf_if_sr_int(&mut self) -> SF_IF_SR_INT_W<16> {
185 SF_IF_SR_INT_W::new(self)
186 }
187 #[doc = "Bit 17"]
188 #[inline(always)]
189 #[must_use]
190 pub fn sf_if_sr_int_en(&mut self) -> SF_IF_SR_INT_EN_W<17> {
191 SF_IF_SR_INT_EN_W::new(self)
192 }
193 #[doc = "Bit 18"]
194 #[inline(always)]
195 #[must_use]
196 pub fn sf_if_sr_int_set(&mut self) -> SF_IF_SR_INT_SET_W<18> {
197 SF_IF_SR_INT_SET_W::new(self)
198 }
199 #[doc = "Bits 20:22"]
200 #[inline(always)]
201 #[must_use]
202 pub fn sf_if_0_ack_lat(&mut self) -> SF_IF_0_ACK_LAT_W<20> {
203 SF_IF_0_ACK_LAT_W::new(self)
204 }
205 #[doc = "Bit 24"]
206 #[inline(always)]
207 #[must_use]
208 pub fn sf_if_reg_hold(&mut self) -> SF_IF_REG_HOLD_W<24> {
209 SF_IF_REG_HOLD_W::new(self)
210 }
211 #[doc = "Bit 25"]
212 #[inline(always)]
213 #[must_use]
214 pub fn sf_if_reg_wp(&mut self) -> SF_IF_REG_WP_W<25> {
215 SF_IF_REG_WP_W::new(self)
216 }
217 #[doc = "Bit 26"]
218 #[inline(always)]
219 #[must_use]
220 pub fn sf_ahb2sif_stopped(&mut self) -> SF_AHB2SIF_STOPPED_W<26> {
221 SF_AHB2SIF_STOPPED_W::new(self)
222 }
223 #[doc = "Bit 27"]
224 #[inline(always)]
225 #[must_use]
226 pub fn sf_ahb2sif_stop(&mut self) -> SF_AHB2SIF_STOP_W<27> {
227 SF_AHB2SIF_STOP_W::new(self)
228 }
229 #[doc = "Bit 28"]
230 #[inline(always)]
231 #[must_use]
232 pub fn sf_if_fn_sel(&mut self) -> SF_IF_FN_SEL_W<28> {
233 SF_IF_FN_SEL_W::new(self)
234 }
235 #[doc = "Bit 29"]
236 #[inline(always)]
237 #[must_use]
238 pub fn sf_if_en(&mut self) -> SF_IF_EN_W<29> {
239 SF_IF_EN_W::new(self)
240 }
241 #[doc = "Bit 30"]
242 #[inline(always)]
243 #[must_use]
244 pub fn sf_ahb2sif_en(&mut self) -> SF_AHB2SIF_EN_W<30> {
245 SF_AHB2SIF_EN_W::new(self)
246 }
247 #[doc = "Bit 31"]
248 #[inline(always)]
249 #[must_use]
250 pub fn sf_ahb2sram_en(&mut self) -> SF_AHB2SRAM_EN_W<31> {
251 SF_AHB2SRAM_EN_W::new(self)
252 }
253 #[doc = "Writes raw bits to the register."]
254 #[inline(always)]
255 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
256 self.0.bits(bits);
257 self
258 }
259}
260#[doc = "sf_ctrl_1.\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 [sf_ctrl_1](index.html) module"]
261pub struct SF_CTRL_1_SPEC;
262impl crate::RegisterSpec for SF_CTRL_1_SPEC {
263 type Ux = u32;
264}
265#[doc = "`read()` method returns [sf_ctrl_1::R](R) reader structure"]
266impl crate::Readable for SF_CTRL_1_SPEC {
267 type Reader = R;
268}
269#[doc = "`write(|w| ..)` method takes [sf_ctrl_1::W](W) writer structure"]
270impl crate::Writable for SF_CTRL_1_SPEC {
271 type Writer = W;
272 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
273 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
274}
275#[doc = "`reset()` method sets sf_ctrl_1 to value 0"]
276impl crate::Resettable for SF_CTRL_1_SPEC {
277 const RESET_VALUE: Self::Ux = 0;
278}