bl702_pac/mjpeg/
mjpeg_control_3.rs

1#[doc = "Register `mjpeg_control_3` reader"]
2pub struct R(crate::R<MJPEG_CONTROL_3_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<MJPEG_CONTROL_3_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<MJPEG_CONTROL_3_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<MJPEG_CONTROL_3_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `mjpeg_control_3` writer"]
17pub struct W(crate::W<MJPEG_CONTROL_3_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<MJPEG_CONTROL_3_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<MJPEG_CONTROL_3_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<MJPEG_CONTROL_3_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `reg_int_normal_en` reader - "]
38pub type REG_INT_NORMAL_EN_R = crate::BitReader<bool>;
39#[doc = "Field `reg_int_normal_en` writer - "]
40pub type REG_INT_NORMAL_EN_W<'a, const O: u8> =
41    crate::BitWriter<'a, u32, MJPEG_CONTROL_3_SPEC, bool, O>;
42#[doc = "Field `reg_int_cam_en` reader - "]
43pub type REG_INT_CAM_EN_R = crate::BitReader<bool>;
44#[doc = "Field `reg_int_cam_en` writer - "]
45pub type REG_INT_CAM_EN_W<'a, const O: u8> =
46    crate::BitWriter<'a, u32, MJPEG_CONTROL_3_SPEC, bool, O>;
47#[doc = "Field `reg_int_mem_en` reader - "]
48pub type REG_INT_MEM_EN_R = crate::BitReader<bool>;
49#[doc = "Field `reg_int_mem_en` writer - "]
50pub type REG_INT_MEM_EN_W<'a, const O: u8> =
51    crate::BitWriter<'a, u32, MJPEG_CONTROL_3_SPEC, bool, O>;
52#[doc = "Field `reg_int_frame_en` reader - "]
53pub type REG_INT_FRAME_EN_R = crate::BitReader<bool>;
54#[doc = "Field `reg_int_frame_en` writer - "]
55pub type REG_INT_FRAME_EN_W<'a, const O: u8> =
56    crate::BitWriter<'a, u32, MJPEG_CONTROL_3_SPEC, bool, O>;
57#[doc = "Field `sts_normal_int` reader - "]
58pub type STS_NORMAL_INT_R = crate::BitReader<bool>;
59#[doc = "Field `sts_normal_int` writer - "]
60pub type STS_NORMAL_INT_W<'a, const O: u8> =
61    crate::BitWriter<'a, u32, MJPEG_CONTROL_3_SPEC, bool, O>;
62#[doc = "Field `sts_cam_int` reader - "]
63pub type STS_CAM_INT_R = crate::BitReader<bool>;
64#[doc = "Field `sts_cam_int` writer - "]
65pub type STS_CAM_INT_W<'a, const O: u8> = crate::BitWriter<'a, u32, MJPEG_CONTROL_3_SPEC, bool, O>;
66#[doc = "Field `sts_mem_int` reader - "]
67pub type STS_MEM_INT_R = crate::BitReader<bool>;
68#[doc = "Field `sts_mem_int` writer - "]
69pub type STS_MEM_INT_W<'a, const O: u8> = crate::BitWriter<'a, u32, MJPEG_CONTROL_3_SPEC, bool, O>;
70#[doc = "Field `sts_frame_int` reader - "]
71pub type STS_FRAME_INT_R = crate::BitReader<bool>;
72#[doc = "Field `sts_frame_int` writer - "]
73pub type STS_FRAME_INT_W<'a, const O: u8> =
74    crate::BitWriter<'a, u32, MJPEG_CONTROL_3_SPEC, bool, O>;
75#[doc = "Field `mjpeg_idle` reader - "]
76pub type MJPEG_IDLE_R = crate::BitReader<bool>;
77#[doc = "Field `mjpeg_idle` writer - "]
78pub type MJPEG_IDLE_W<'a, const O: u8> = crate::BitWriter<'a, u32, MJPEG_CONTROL_3_SPEC, bool, O>;
79#[doc = "Field `mjpeg_func` reader - "]
80pub type MJPEG_FUNC_R = crate::BitReader<bool>;
81#[doc = "Field `mjpeg_func` writer - "]
82pub type MJPEG_FUNC_W<'a, const O: u8> = crate::BitWriter<'a, u32, MJPEG_CONTROL_3_SPEC, bool, O>;
83#[doc = "Field `mjpeg_wait` reader - "]
84pub type MJPEG_WAIT_R = crate::BitReader<bool>;
85#[doc = "Field `mjpeg_wait` writer - "]
86pub type MJPEG_WAIT_W<'a, const O: u8> = crate::BitWriter<'a, u32, MJPEG_CONTROL_3_SPEC, bool, O>;
87#[doc = "Field `mjpeg_flsh` reader - "]
88pub type MJPEG_FLSH_R = crate::BitReader<bool>;
89#[doc = "Field `mjpeg_flsh` writer - "]
90pub type MJPEG_FLSH_W<'a, const O: u8> = crate::BitWriter<'a, u32, MJPEG_CONTROL_3_SPEC, bool, O>;
91#[doc = "Field `mjpeg_mans` reader - "]
92pub type MJPEG_MANS_R = crate::BitReader<bool>;
93#[doc = "Field `mjpeg_mans` writer - "]
94pub type MJPEG_MANS_W<'a, const O: u8> = crate::BitWriter<'a, u32, MJPEG_CONTROL_3_SPEC, bool, O>;
95#[doc = "Field `mjpeg_manf` reader - "]
96pub type MJPEG_MANF_R = crate::BitReader<bool>;
97#[doc = "Field `mjpeg_manf` writer - "]
98pub type MJPEG_MANF_W<'a, const O: u8> = crate::BitWriter<'a, u32, MJPEG_CONTROL_3_SPEC, bool, O>;
99#[doc = "Field `ahb_idle` reader - "]
100pub type AHB_IDLE_R = crate::BitReader<bool>;
101#[doc = "Field `ahb_idle` writer - "]
102pub type AHB_IDLE_W<'a, const O: u8> = crate::BitWriter<'a, u32, MJPEG_CONTROL_3_SPEC, bool, O>;
103#[doc = "Field `reg_frame_cnt_trgr_int` reader - "]
104pub type REG_FRAME_CNT_TRGR_INT_R = crate::FieldReader<u8, u8>;
105#[doc = "Field `reg_frame_cnt_trgr_int` writer - "]
106pub type REG_FRAME_CNT_TRGR_INT_W<'a, const O: u8> =
107    crate::FieldWriter<'a, u32, MJPEG_CONTROL_3_SPEC, u8, u8, 5, O>;
108#[doc = "Field `reg_int_idle_en` reader - "]
109pub type REG_INT_IDLE_EN_R = crate::BitReader<bool>;
110#[doc = "Field `reg_int_idle_en` writer - "]
111pub type REG_INT_IDLE_EN_W<'a, const O: u8> =
112    crate::BitWriter<'a, u32, MJPEG_CONTROL_3_SPEC, bool, O>;
113#[doc = "Field `sts_idle_int` reader - "]
114pub type STS_IDLE_INT_R = crate::BitReader<bool>;
115#[doc = "Field `sts_idle_int` writer - "]
116pub type STS_IDLE_INT_W<'a, const O: u8> = crate::BitWriter<'a, u32, MJPEG_CONTROL_3_SPEC, bool, O>;
117#[doc = "Field `frame_valid_cnt` reader - "]
118pub type FRAME_VALID_CNT_R = crate::FieldReader<u8, u8>;
119#[doc = "Field `frame_valid_cnt` writer - "]
120pub type FRAME_VALID_CNT_W<'a, const O: u8> =
121    crate::FieldWriter<'a, u32, MJPEG_CONTROL_3_SPEC, u8, u8, 5, O>;
122#[doc = "Field `reg_int_swap_en` reader - "]
123pub type REG_INT_SWAP_EN_R = crate::BitReader<bool>;
124#[doc = "Field `reg_int_swap_en` writer - "]
125pub type REG_INT_SWAP_EN_W<'a, const O: u8> =
126    crate::BitWriter<'a, u32, MJPEG_CONTROL_3_SPEC, bool, O>;
127#[doc = "Field `sts_swap_int` reader - "]
128pub type STS_SWAP_INT_R = crate::BitReader<bool>;
129#[doc = "Field `sts_swap_int` writer - "]
130pub type STS_SWAP_INT_W<'a, const O: u8> = crate::BitWriter<'a, u32, MJPEG_CONTROL_3_SPEC, bool, O>;
131impl R {
132    #[doc = "Bit 0"]
133    #[inline(always)]
134    pub fn reg_int_normal_en(&self) -> REG_INT_NORMAL_EN_R {
135        REG_INT_NORMAL_EN_R::new((self.bits & 1) != 0)
136    }
137    #[doc = "Bit 1"]
138    #[inline(always)]
139    pub fn reg_int_cam_en(&self) -> REG_INT_CAM_EN_R {
140        REG_INT_CAM_EN_R::new(((self.bits >> 1) & 1) != 0)
141    }
142    #[doc = "Bit 2"]
143    #[inline(always)]
144    pub fn reg_int_mem_en(&self) -> REG_INT_MEM_EN_R {
145        REG_INT_MEM_EN_R::new(((self.bits >> 2) & 1) != 0)
146    }
147    #[doc = "Bit 3"]
148    #[inline(always)]
149    pub fn reg_int_frame_en(&self) -> REG_INT_FRAME_EN_R {
150        REG_INT_FRAME_EN_R::new(((self.bits >> 3) & 1) != 0)
151    }
152    #[doc = "Bit 4"]
153    #[inline(always)]
154    pub fn sts_normal_int(&self) -> STS_NORMAL_INT_R {
155        STS_NORMAL_INT_R::new(((self.bits >> 4) & 1) != 0)
156    }
157    #[doc = "Bit 5"]
158    #[inline(always)]
159    pub fn sts_cam_int(&self) -> STS_CAM_INT_R {
160        STS_CAM_INT_R::new(((self.bits >> 5) & 1) != 0)
161    }
162    #[doc = "Bit 6"]
163    #[inline(always)]
164    pub fn sts_mem_int(&self) -> STS_MEM_INT_R {
165        STS_MEM_INT_R::new(((self.bits >> 6) & 1) != 0)
166    }
167    #[doc = "Bit 7"]
168    #[inline(always)]
169    pub fn sts_frame_int(&self) -> STS_FRAME_INT_R {
170        STS_FRAME_INT_R::new(((self.bits >> 7) & 1) != 0)
171    }
172    #[doc = "Bit 8"]
173    #[inline(always)]
174    pub fn mjpeg_idle(&self) -> MJPEG_IDLE_R {
175        MJPEG_IDLE_R::new(((self.bits >> 8) & 1) != 0)
176    }
177    #[doc = "Bit 9"]
178    #[inline(always)]
179    pub fn mjpeg_func(&self) -> MJPEG_FUNC_R {
180        MJPEG_FUNC_R::new(((self.bits >> 9) & 1) != 0)
181    }
182    #[doc = "Bit 10"]
183    #[inline(always)]
184    pub fn mjpeg_wait(&self) -> MJPEG_WAIT_R {
185        MJPEG_WAIT_R::new(((self.bits >> 10) & 1) != 0)
186    }
187    #[doc = "Bit 11"]
188    #[inline(always)]
189    pub fn mjpeg_flsh(&self) -> MJPEG_FLSH_R {
190        MJPEG_FLSH_R::new(((self.bits >> 11) & 1) != 0)
191    }
192    #[doc = "Bit 12"]
193    #[inline(always)]
194    pub fn mjpeg_mans(&self) -> MJPEG_MANS_R {
195        MJPEG_MANS_R::new(((self.bits >> 12) & 1) != 0)
196    }
197    #[doc = "Bit 13"]
198    #[inline(always)]
199    pub fn mjpeg_manf(&self) -> MJPEG_MANF_R {
200        MJPEG_MANF_R::new(((self.bits >> 13) & 1) != 0)
201    }
202    #[doc = "Bit 14"]
203    #[inline(always)]
204    pub fn ahb_idle(&self) -> AHB_IDLE_R {
205        AHB_IDLE_R::new(((self.bits >> 14) & 1) != 0)
206    }
207    #[doc = "Bits 16:20"]
208    #[inline(always)]
209    pub fn reg_frame_cnt_trgr_int(&self) -> REG_FRAME_CNT_TRGR_INT_R {
210        REG_FRAME_CNT_TRGR_INT_R::new(((self.bits >> 16) & 0x1f) as u8)
211    }
212    #[doc = "Bit 21"]
213    #[inline(always)]
214    pub fn reg_int_idle_en(&self) -> REG_INT_IDLE_EN_R {
215        REG_INT_IDLE_EN_R::new(((self.bits >> 21) & 1) != 0)
216    }
217    #[doc = "Bit 22"]
218    #[inline(always)]
219    pub fn sts_idle_int(&self) -> STS_IDLE_INT_R {
220        STS_IDLE_INT_R::new(((self.bits >> 22) & 1) != 0)
221    }
222    #[doc = "Bits 24:28"]
223    #[inline(always)]
224    pub fn frame_valid_cnt(&self) -> FRAME_VALID_CNT_R {
225        FRAME_VALID_CNT_R::new(((self.bits >> 24) & 0x1f) as u8)
226    }
227    #[doc = "Bit 29"]
228    #[inline(always)]
229    pub fn reg_int_swap_en(&self) -> REG_INT_SWAP_EN_R {
230        REG_INT_SWAP_EN_R::new(((self.bits >> 29) & 1) != 0)
231    }
232    #[doc = "Bit 30"]
233    #[inline(always)]
234    pub fn sts_swap_int(&self) -> STS_SWAP_INT_R {
235        STS_SWAP_INT_R::new(((self.bits >> 30) & 1) != 0)
236    }
237}
238impl W {
239    #[doc = "Bit 0"]
240    #[inline(always)]
241    #[must_use]
242    pub fn reg_int_normal_en(&mut self) -> REG_INT_NORMAL_EN_W<0> {
243        REG_INT_NORMAL_EN_W::new(self)
244    }
245    #[doc = "Bit 1"]
246    #[inline(always)]
247    #[must_use]
248    pub fn reg_int_cam_en(&mut self) -> REG_INT_CAM_EN_W<1> {
249        REG_INT_CAM_EN_W::new(self)
250    }
251    #[doc = "Bit 2"]
252    #[inline(always)]
253    #[must_use]
254    pub fn reg_int_mem_en(&mut self) -> REG_INT_MEM_EN_W<2> {
255        REG_INT_MEM_EN_W::new(self)
256    }
257    #[doc = "Bit 3"]
258    #[inline(always)]
259    #[must_use]
260    pub fn reg_int_frame_en(&mut self) -> REG_INT_FRAME_EN_W<3> {
261        REG_INT_FRAME_EN_W::new(self)
262    }
263    #[doc = "Bit 4"]
264    #[inline(always)]
265    #[must_use]
266    pub fn sts_normal_int(&mut self) -> STS_NORMAL_INT_W<4> {
267        STS_NORMAL_INT_W::new(self)
268    }
269    #[doc = "Bit 5"]
270    #[inline(always)]
271    #[must_use]
272    pub fn sts_cam_int(&mut self) -> STS_CAM_INT_W<5> {
273        STS_CAM_INT_W::new(self)
274    }
275    #[doc = "Bit 6"]
276    #[inline(always)]
277    #[must_use]
278    pub fn sts_mem_int(&mut self) -> STS_MEM_INT_W<6> {
279        STS_MEM_INT_W::new(self)
280    }
281    #[doc = "Bit 7"]
282    #[inline(always)]
283    #[must_use]
284    pub fn sts_frame_int(&mut self) -> STS_FRAME_INT_W<7> {
285        STS_FRAME_INT_W::new(self)
286    }
287    #[doc = "Bit 8"]
288    #[inline(always)]
289    #[must_use]
290    pub fn mjpeg_idle(&mut self) -> MJPEG_IDLE_W<8> {
291        MJPEG_IDLE_W::new(self)
292    }
293    #[doc = "Bit 9"]
294    #[inline(always)]
295    #[must_use]
296    pub fn mjpeg_func(&mut self) -> MJPEG_FUNC_W<9> {
297        MJPEG_FUNC_W::new(self)
298    }
299    #[doc = "Bit 10"]
300    #[inline(always)]
301    #[must_use]
302    pub fn mjpeg_wait(&mut self) -> MJPEG_WAIT_W<10> {
303        MJPEG_WAIT_W::new(self)
304    }
305    #[doc = "Bit 11"]
306    #[inline(always)]
307    #[must_use]
308    pub fn mjpeg_flsh(&mut self) -> MJPEG_FLSH_W<11> {
309        MJPEG_FLSH_W::new(self)
310    }
311    #[doc = "Bit 12"]
312    #[inline(always)]
313    #[must_use]
314    pub fn mjpeg_mans(&mut self) -> MJPEG_MANS_W<12> {
315        MJPEG_MANS_W::new(self)
316    }
317    #[doc = "Bit 13"]
318    #[inline(always)]
319    #[must_use]
320    pub fn mjpeg_manf(&mut self) -> MJPEG_MANF_W<13> {
321        MJPEG_MANF_W::new(self)
322    }
323    #[doc = "Bit 14"]
324    #[inline(always)]
325    #[must_use]
326    pub fn ahb_idle(&mut self) -> AHB_IDLE_W<14> {
327        AHB_IDLE_W::new(self)
328    }
329    #[doc = "Bits 16:20"]
330    #[inline(always)]
331    #[must_use]
332    pub fn reg_frame_cnt_trgr_int(&mut self) -> REG_FRAME_CNT_TRGR_INT_W<16> {
333        REG_FRAME_CNT_TRGR_INT_W::new(self)
334    }
335    #[doc = "Bit 21"]
336    #[inline(always)]
337    #[must_use]
338    pub fn reg_int_idle_en(&mut self) -> REG_INT_IDLE_EN_W<21> {
339        REG_INT_IDLE_EN_W::new(self)
340    }
341    #[doc = "Bit 22"]
342    #[inline(always)]
343    #[must_use]
344    pub fn sts_idle_int(&mut self) -> STS_IDLE_INT_W<22> {
345        STS_IDLE_INT_W::new(self)
346    }
347    #[doc = "Bits 24:28"]
348    #[inline(always)]
349    #[must_use]
350    pub fn frame_valid_cnt(&mut self) -> FRAME_VALID_CNT_W<24> {
351        FRAME_VALID_CNT_W::new(self)
352    }
353    #[doc = "Bit 29"]
354    #[inline(always)]
355    #[must_use]
356    pub fn reg_int_swap_en(&mut self) -> REG_INT_SWAP_EN_W<29> {
357        REG_INT_SWAP_EN_W::new(self)
358    }
359    #[doc = "Bit 30"]
360    #[inline(always)]
361    #[must_use]
362    pub fn sts_swap_int(&mut self) -> STS_SWAP_INT_W<30> {
363        STS_SWAP_INT_W::new(self)
364    }
365    #[doc = "Writes raw bits to the register."]
366    #[inline(always)]
367    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
368        self.0.bits(bits);
369        self
370    }
371}
372#[doc = "mjpeg_control_3.\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 [mjpeg_control_3](index.html) module"]
373pub struct MJPEG_CONTROL_3_SPEC;
374impl crate::RegisterSpec for MJPEG_CONTROL_3_SPEC {
375    type Ux = u32;
376}
377#[doc = "`read()` method returns [mjpeg_control_3::R](R) reader structure"]
378impl crate::Readable for MJPEG_CONTROL_3_SPEC {
379    type Reader = R;
380}
381#[doc = "`write(|w| ..)` method takes [mjpeg_control_3::W](W) writer structure"]
382impl crate::Writable for MJPEG_CONTROL_3_SPEC {
383    type Writer = W;
384    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
385    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
386}
387#[doc = "`reset()` method sets mjpeg_control_3 to value 0"]
388impl crate::Resettable for MJPEG_CONTROL_3_SPEC {
389    const RESET_VALUE: Self::Ux = 0;
390}