Skip to main content

atsams70j21/isi/
isi_cfg2.rs

1#[doc = "Register `ISI_CFG2` reader"]
2pub struct R(crate::R<ISI_CFG2_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<ISI_CFG2_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<ISI_CFG2_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<ISI_CFG2_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `ISI_CFG2` writer"]
17pub struct W(crate::W<ISI_CFG2_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<ISI_CFG2_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<ISI_CFG2_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<ISI_CFG2_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `IM_VSIZE` reader - Vertical Size of the Image Sensor \\[0..2047\\]"]
38pub struct IM_VSIZE_R(crate::FieldReader<u16, u16>);
39impl IM_VSIZE_R {
40    #[inline(always)]
41    pub(crate) fn new(bits: u16) -> Self {
42        IM_VSIZE_R(crate::FieldReader::new(bits))
43    }
44}
45impl core::ops::Deref for IM_VSIZE_R {
46    type Target = crate::FieldReader<u16, u16>;
47    #[inline(always)]
48    fn deref(&self) -> &Self::Target {
49        &self.0
50    }
51}
52#[doc = "Field `IM_VSIZE` writer - Vertical Size of the Image Sensor \\[0..2047\\]"]
53pub struct IM_VSIZE_W<'a> {
54    w: &'a mut W,
55}
56impl<'a> IM_VSIZE_W<'a> {
57    #[doc = r"Writes raw bits to the field"]
58    #[inline(always)]
59    pub unsafe fn bits(self, value: u16) -> &'a mut W {
60        self.w.bits = (self.w.bits & !0x07ff) | (value as u32 & 0x07ff);
61        self.w
62    }
63}
64#[doc = "Field `GS_MODE` reader - Grayscale Pixel Format Mode"]
65pub struct GS_MODE_R(crate::FieldReader<bool, bool>);
66impl GS_MODE_R {
67    #[inline(always)]
68    pub(crate) fn new(bits: bool) -> Self {
69        GS_MODE_R(crate::FieldReader::new(bits))
70    }
71}
72impl core::ops::Deref for GS_MODE_R {
73    type Target = crate::FieldReader<bool, bool>;
74    #[inline(always)]
75    fn deref(&self) -> &Self::Target {
76        &self.0
77    }
78}
79#[doc = "Field `GS_MODE` writer - Grayscale Pixel Format Mode"]
80pub struct GS_MODE_W<'a> {
81    w: &'a mut W,
82}
83impl<'a> GS_MODE_W<'a> {
84    #[doc = r"Sets the field bit"]
85    #[inline(always)]
86    pub fn set_bit(self) -> &'a mut W {
87        self.bit(true)
88    }
89    #[doc = r"Clears the field bit"]
90    #[inline(always)]
91    pub fn clear_bit(self) -> &'a mut W {
92        self.bit(false)
93    }
94    #[doc = r"Writes raw bits to the field"]
95    #[inline(always)]
96    pub fn bit(self, value: bool) -> &'a mut W {
97        self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11);
98        self.w
99    }
100}
101#[doc = "Field `RGB_MODE` reader - RGB Input Mode"]
102pub struct RGB_MODE_R(crate::FieldReader<bool, bool>);
103impl RGB_MODE_R {
104    #[inline(always)]
105    pub(crate) fn new(bits: bool) -> Self {
106        RGB_MODE_R(crate::FieldReader::new(bits))
107    }
108}
109impl core::ops::Deref for RGB_MODE_R {
110    type Target = crate::FieldReader<bool, bool>;
111    #[inline(always)]
112    fn deref(&self) -> &Self::Target {
113        &self.0
114    }
115}
116#[doc = "Field `RGB_MODE` writer - RGB Input Mode"]
117pub struct RGB_MODE_W<'a> {
118    w: &'a mut W,
119}
120impl<'a> RGB_MODE_W<'a> {
121    #[doc = r"Sets the field bit"]
122    #[inline(always)]
123    pub fn set_bit(self) -> &'a mut W {
124        self.bit(true)
125    }
126    #[doc = r"Clears the field bit"]
127    #[inline(always)]
128    pub fn clear_bit(self) -> &'a mut W {
129        self.bit(false)
130    }
131    #[doc = r"Writes raw bits to the field"]
132    #[inline(always)]
133    pub fn bit(self, value: bool) -> &'a mut W {
134        self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12);
135        self.w
136    }
137}
138#[doc = "Field `GRAYSCALE` reader - Grayscale Mode Format Enable"]
139pub struct GRAYSCALE_R(crate::FieldReader<bool, bool>);
140impl GRAYSCALE_R {
141    #[inline(always)]
142    pub(crate) fn new(bits: bool) -> Self {
143        GRAYSCALE_R(crate::FieldReader::new(bits))
144    }
145}
146impl core::ops::Deref for GRAYSCALE_R {
147    type Target = crate::FieldReader<bool, bool>;
148    #[inline(always)]
149    fn deref(&self) -> &Self::Target {
150        &self.0
151    }
152}
153#[doc = "Field `GRAYSCALE` writer - Grayscale Mode Format Enable"]
154pub struct GRAYSCALE_W<'a> {
155    w: &'a mut W,
156}
157impl<'a> GRAYSCALE_W<'a> {
158    #[doc = r"Sets the field bit"]
159    #[inline(always)]
160    pub fn set_bit(self) -> &'a mut W {
161        self.bit(true)
162    }
163    #[doc = r"Clears the field bit"]
164    #[inline(always)]
165    pub fn clear_bit(self) -> &'a mut W {
166        self.bit(false)
167    }
168    #[doc = r"Writes raw bits to the field"]
169    #[inline(always)]
170    pub fn bit(self, value: bool) -> &'a mut W {
171        self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13);
172        self.w
173    }
174}
175#[doc = "Field `RGB_SWAP` reader - RGB Format Swap Mode"]
176pub struct RGB_SWAP_R(crate::FieldReader<bool, bool>);
177impl RGB_SWAP_R {
178    #[inline(always)]
179    pub(crate) fn new(bits: bool) -> Self {
180        RGB_SWAP_R(crate::FieldReader::new(bits))
181    }
182}
183impl core::ops::Deref for RGB_SWAP_R {
184    type Target = crate::FieldReader<bool, bool>;
185    #[inline(always)]
186    fn deref(&self) -> &Self::Target {
187        &self.0
188    }
189}
190#[doc = "Field `RGB_SWAP` writer - RGB Format Swap Mode"]
191pub struct RGB_SWAP_W<'a> {
192    w: &'a mut W,
193}
194impl<'a> RGB_SWAP_W<'a> {
195    #[doc = r"Sets the field bit"]
196    #[inline(always)]
197    pub fn set_bit(self) -> &'a mut W {
198        self.bit(true)
199    }
200    #[doc = r"Clears the field bit"]
201    #[inline(always)]
202    pub fn clear_bit(self) -> &'a mut W {
203        self.bit(false)
204    }
205    #[doc = r"Writes raw bits to the field"]
206    #[inline(always)]
207    pub fn bit(self, value: bool) -> &'a mut W {
208        self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14);
209        self.w
210    }
211}
212#[doc = "Field `COL_SPACE` reader - Color Space for the Image Data"]
213pub struct COL_SPACE_R(crate::FieldReader<bool, bool>);
214impl COL_SPACE_R {
215    #[inline(always)]
216    pub(crate) fn new(bits: bool) -> Self {
217        COL_SPACE_R(crate::FieldReader::new(bits))
218    }
219}
220impl core::ops::Deref for COL_SPACE_R {
221    type Target = crate::FieldReader<bool, bool>;
222    #[inline(always)]
223    fn deref(&self) -> &Self::Target {
224        &self.0
225    }
226}
227#[doc = "Field `COL_SPACE` writer - Color Space for the Image Data"]
228pub struct COL_SPACE_W<'a> {
229    w: &'a mut W,
230}
231impl<'a> COL_SPACE_W<'a> {
232    #[doc = r"Sets the field bit"]
233    #[inline(always)]
234    pub fn set_bit(self) -> &'a mut W {
235        self.bit(true)
236    }
237    #[doc = r"Clears the field bit"]
238    #[inline(always)]
239    pub fn clear_bit(self) -> &'a mut W {
240        self.bit(false)
241    }
242    #[doc = r"Writes raw bits to the field"]
243    #[inline(always)]
244    pub fn bit(self, value: bool) -> &'a mut W {
245        self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15);
246        self.w
247    }
248}
249#[doc = "Field `IM_HSIZE` reader - Horizontal Size of the Image Sensor \\[0..2047\\]"]
250pub struct IM_HSIZE_R(crate::FieldReader<u16, u16>);
251impl IM_HSIZE_R {
252    #[inline(always)]
253    pub(crate) fn new(bits: u16) -> Self {
254        IM_HSIZE_R(crate::FieldReader::new(bits))
255    }
256}
257impl core::ops::Deref for IM_HSIZE_R {
258    type Target = crate::FieldReader<u16, u16>;
259    #[inline(always)]
260    fn deref(&self) -> &Self::Target {
261        &self.0
262    }
263}
264#[doc = "Field `IM_HSIZE` writer - Horizontal Size of the Image Sensor \\[0..2047\\]"]
265pub struct IM_HSIZE_W<'a> {
266    w: &'a mut W,
267}
268impl<'a> IM_HSIZE_W<'a> {
269    #[doc = r"Writes raw bits to the field"]
270    #[inline(always)]
271    pub unsafe fn bits(self, value: u16) -> &'a mut W {
272        self.w.bits = (self.w.bits & !(0x07ff << 16)) | ((value as u32 & 0x07ff) << 16);
273        self.w
274    }
275}
276#[doc = "YCrCb Format Swap Mode\n\nValue on reset: 0"]
277#[derive(Clone, Copy, Debug, PartialEq)]
278#[repr(u8)]
279pub enum YCC_SWAP_A {
280    #[doc = "0: Byte 0 Cb(i)Byte 1 Y(i)Byte 2 Cr(i)Byte 3 Y(i+1)"]
281    DEFAULT = 0,
282    #[doc = "1: Byte 0 Cr(i)Byte 1 Y(i)Byte 2 Cb(i)Byte 3 Y(i+1)"]
283    MODE1 = 1,
284    #[doc = "2: Byte 0 Y(i)Byte 1 Cb(i)Byte 2 Y(i+1)Byte 3 Cr(i)"]
285    MODE2 = 2,
286    #[doc = "3: Byte 0 Y(i)Byte 1 Cr(i)Byte 2 Y(i+1)Byte 3 Cb(i)"]
287    MODE3 = 3,
288}
289impl From<YCC_SWAP_A> for u8 {
290    #[inline(always)]
291    fn from(variant: YCC_SWAP_A) -> Self {
292        variant as _
293    }
294}
295#[doc = "Field `YCC_SWAP` reader - YCrCb Format Swap Mode"]
296pub struct YCC_SWAP_R(crate::FieldReader<u8, YCC_SWAP_A>);
297impl YCC_SWAP_R {
298    #[inline(always)]
299    pub(crate) fn new(bits: u8) -> Self {
300        YCC_SWAP_R(crate::FieldReader::new(bits))
301    }
302    #[doc = r"Get enumerated values variant"]
303    #[inline(always)]
304    pub fn variant(&self) -> YCC_SWAP_A {
305        match self.bits {
306            0 => YCC_SWAP_A::DEFAULT,
307            1 => YCC_SWAP_A::MODE1,
308            2 => YCC_SWAP_A::MODE2,
309            3 => YCC_SWAP_A::MODE3,
310            _ => unreachable!(),
311        }
312    }
313    #[doc = "Checks if the value of the field is `DEFAULT`"]
314    #[inline(always)]
315    pub fn is_default(&self) -> bool {
316        **self == YCC_SWAP_A::DEFAULT
317    }
318    #[doc = "Checks if the value of the field is `MODE1`"]
319    #[inline(always)]
320    pub fn is_mode1(&self) -> bool {
321        **self == YCC_SWAP_A::MODE1
322    }
323    #[doc = "Checks if the value of the field is `MODE2`"]
324    #[inline(always)]
325    pub fn is_mode2(&self) -> bool {
326        **self == YCC_SWAP_A::MODE2
327    }
328    #[doc = "Checks if the value of the field is `MODE3`"]
329    #[inline(always)]
330    pub fn is_mode3(&self) -> bool {
331        **self == YCC_SWAP_A::MODE3
332    }
333}
334impl core::ops::Deref for YCC_SWAP_R {
335    type Target = crate::FieldReader<u8, YCC_SWAP_A>;
336    #[inline(always)]
337    fn deref(&self) -> &Self::Target {
338        &self.0
339    }
340}
341#[doc = "Field `YCC_SWAP` writer - YCrCb Format Swap Mode"]
342pub struct YCC_SWAP_W<'a> {
343    w: &'a mut W,
344}
345impl<'a> YCC_SWAP_W<'a> {
346    #[doc = r"Writes `variant` to the field"]
347    #[inline(always)]
348    pub fn variant(self, variant: YCC_SWAP_A) -> &'a mut W {
349        self.bits(variant.into())
350    }
351    #[doc = "Byte 0 Cb(i)Byte 1 Y(i)Byte 2 Cr(i)Byte 3 Y(i+1)"]
352    #[inline(always)]
353    pub fn default(self) -> &'a mut W {
354        self.variant(YCC_SWAP_A::DEFAULT)
355    }
356    #[doc = "Byte 0 Cr(i)Byte 1 Y(i)Byte 2 Cb(i)Byte 3 Y(i+1)"]
357    #[inline(always)]
358    pub fn mode1(self) -> &'a mut W {
359        self.variant(YCC_SWAP_A::MODE1)
360    }
361    #[doc = "Byte 0 Y(i)Byte 1 Cb(i)Byte 2 Y(i+1)Byte 3 Cr(i)"]
362    #[inline(always)]
363    pub fn mode2(self) -> &'a mut W {
364        self.variant(YCC_SWAP_A::MODE2)
365    }
366    #[doc = "Byte 0 Y(i)Byte 1 Cr(i)Byte 2 Y(i+1)Byte 3 Cb(i)"]
367    #[inline(always)]
368    pub fn mode3(self) -> &'a mut W {
369        self.variant(YCC_SWAP_A::MODE3)
370    }
371    #[doc = r"Writes raw bits to the field"]
372    #[inline(always)]
373    pub fn bits(self, value: u8) -> &'a mut W {
374        self.w.bits = (self.w.bits & !(0x03 << 28)) | ((value as u32 & 0x03) << 28);
375        self.w
376    }
377}
378#[doc = "RGB Pixel Mapping Configuration\n\nValue on reset: 0"]
379#[derive(Clone, Copy, Debug, PartialEq)]
380#[repr(u8)]
381pub enum RGB_CFG_A {
382    #[doc = "0: Byte 0 R/G(MSB)Byte 1 G(LSB)/BByte 2 R/G(MSB)Byte 3 G(LSB)/B"]
383    DEFAULT = 0,
384    #[doc = "1: Byte 0 B/G(MSB)Byte 1 G(LSB)/RByte 2 B/G(MSB)Byte 3 G(LSB)/R"]
385    MODE1 = 1,
386    #[doc = "2: Byte 0 G(LSB)/RByte 1 B/G(MSB)Byte 2 G(LSB)/RByte 3 B/G(MSB)"]
387    MODE2 = 2,
388    #[doc = "3: Byte 0 G(LSB)/BByte 1 R/G(MSB)Byte 2 G(LSB)/BByte 3 R/G(MSB)"]
389    MODE3 = 3,
390}
391impl From<RGB_CFG_A> for u8 {
392    #[inline(always)]
393    fn from(variant: RGB_CFG_A) -> Self {
394        variant as _
395    }
396}
397#[doc = "Field `RGB_CFG` reader - RGB Pixel Mapping Configuration"]
398pub struct RGB_CFG_R(crate::FieldReader<u8, RGB_CFG_A>);
399impl RGB_CFG_R {
400    #[inline(always)]
401    pub(crate) fn new(bits: u8) -> Self {
402        RGB_CFG_R(crate::FieldReader::new(bits))
403    }
404    #[doc = r"Get enumerated values variant"]
405    #[inline(always)]
406    pub fn variant(&self) -> RGB_CFG_A {
407        match self.bits {
408            0 => RGB_CFG_A::DEFAULT,
409            1 => RGB_CFG_A::MODE1,
410            2 => RGB_CFG_A::MODE2,
411            3 => RGB_CFG_A::MODE3,
412            _ => unreachable!(),
413        }
414    }
415    #[doc = "Checks if the value of the field is `DEFAULT`"]
416    #[inline(always)]
417    pub fn is_default(&self) -> bool {
418        **self == RGB_CFG_A::DEFAULT
419    }
420    #[doc = "Checks if the value of the field is `MODE1`"]
421    #[inline(always)]
422    pub fn is_mode1(&self) -> bool {
423        **self == RGB_CFG_A::MODE1
424    }
425    #[doc = "Checks if the value of the field is `MODE2`"]
426    #[inline(always)]
427    pub fn is_mode2(&self) -> bool {
428        **self == RGB_CFG_A::MODE2
429    }
430    #[doc = "Checks if the value of the field is `MODE3`"]
431    #[inline(always)]
432    pub fn is_mode3(&self) -> bool {
433        **self == RGB_CFG_A::MODE3
434    }
435}
436impl core::ops::Deref for RGB_CFG_R {
437    type Target = crate::FieldReader<u8, RGB_CFG_A>;
438    #[inline(always)]
439    fn deref(&self) -> &Self::Target {
440        &self.0
441    }
442}
443#[doc = "Field `RGB_CFG` writer - RGB Pixel Mapping Configuration"]
444pub struct RGB_CFG_W<'a> {
445    w: &'a mut W,
446}
447impl<'a> RGB_CFG_W<'a> {
448    #[doc = r"Writes `variant` to the field"]
449    #[inline(always)]
450    pub fn variant(self, variant: RGB_CFG_A) -> &'a mut W {
451        self.bits(variant.into())
452    }
453    #[doc = "Byte 0 R/G(MSB)Byte 1 G(LSB)/BByte 2 R/G(MSB)Byte 3 G(LSB)/B"]
454    #[inline(always)]
455    pub fn default(self) -> &'a mut W {
456        self.variant(RGB_CFG_A::DEFAULT)
457    }
458    #[doc = "Byte 0 B/G(MSB)Byte 1 G(LSB)/RByte 2 B/G(MSB)Byte 3 G(LSB)/R"]
459    #[inline(always)]
460    pub fn mode1(self) -> &'a mut W {
461        self.variant(RGB_CFG_A::MODE1)
462    }
463    #[doc = "Byte 0 G(LSB)/RByte 1 B/G(MSB)Byte 2 G(LSB)/RByte 3 B/G(MSB)"]
464    #[inline(always)]
465    pub fn mode2(self) -> &'a mut W {
466        self.variant(RGB_CFG_A::MODE2)
467    }
468    #[doc = "Byte 0 G(LSB)/BByte 1 R/G(MSB)Byte 2 G(LSB)/BByte 3 R/G(MSB)"]
469    #[inline(always)]
470    pub fn mode3(self) -> &'a mut W {
471        self.variant(RGB_CFG_A::MODE3)
472    }
473    #[doc = r"Writes raw bits to the field"]
474    #[inline(always)]
475    pub fn bits(self, value: u8) -> &'a mut W {
476        self.w.bits = (self.w.bits & !(0x03 << 30)) | ((value as u32 & 0x03) << 30);
477        self.w
478    }
479}
480impl R {
481    #[doc = "Bits 0:10 - Vertical Size of the Image Sensor \\[0..2047\\]"]
482    #[inline(always)]
483    pub fn im_vsize(&self) -> IM_VSIZE_R {
484        IM_VSIZE_R::new((self.bits & 0x07ff) as u16)
485    }
486    #[doc = "Bit 11 - Grayscale Pixel Format Mode"]
487    #[inline(always)]
488    pub fn gs_mode(&self) -> GS_MODE_R {
489        GS_MODE_R::new(((self.bits >> 11) & 0x01) != 0)
490    }
491    #[doc = "Bit 12 - RGB Input Mode"]
492    #[inline(always)]
493    pub fn rgb_mode(&self) -> RGB_MODE_R {
494        RGB_MODE_R::new(((self.bits >> 12) & 0x01) != 0)
495    }
496    #[doc = "Bit 13 - Grayscale Mode Format Enable"]
497    #[inline(always)]
498    pub fn grayscale(&self) -> GRAYSCALE_R {
499        GRAYSCALE_R::new(((self.bits >> 13) & 0x01) != 0)
500    }
501    #[doc = "Bit 14 - RGB Format Swap Mode"]
502    #[inline(always)]
503    pub fn rgb_swap(&self) -> RGB_SWAP_R {
504        RGB_SWAP_R::new(((self.bits >> 14) & 0x01) != 0)
505    }
506    #[doc = "Bit 15 - Color Space for the Image Data"]
507    #[inline(always)]
508    pub fn col_space(&self) -> COL_SPACE_R {
509        COL_SPACE_R::new(((self.bits >> 15) & 0x01) != 0)
510    }
511    #[doc = "Bits 16:26 - Horizontal Size of the Image Sensor \\[0..2047\\]"]
512    #[inline(always)]
513    pub fn im_hsize(&self) -> IM_HSIZE_R {
514        IM_HSIZE_R::new(((self.bits >> 16) & 0x07ff) as u16)
515    }
516    #[doc = "Bits 28:29 - YCrCb Format Swap Mode"]
517    #[inline(always)]
518    pub fn ycc_swap(&self) -> YCC_SWAP_R {
519        YCC_SWAP_R::new(((self.bits >> 28) & 0x03) as u8)
520    }
521    #[doc = "Bits 30:31 - RGB Pixel Mapping Configuration"]
522    #[inline(always)]
523    pub fn rgb_cfg(&self) -> RGB_CFG_R {
524        RGB_CFG_R::new(((self.bits >> 30) & 0x03) as u8)
525    }
526}
527impl W {
528    #[doc = "Bits 0:10 - Vertical Size of the Image Sensor \\[0..2047\\]"]
529    #[inline(always)]
530    pub fn im_vsize(&mut self) -> IM_VSIZE_W {
531        IM_VSIZE_W { w: self }
532    }
533    #[doc = "Bit 11 - Grayscale Pixel Format Mode"]
534    #[inline(always)]
535    pub fn gs_mode(&mut self) -> GS_MODE_W {
536        GS_MODE_W { w: self }
537    }
538    #[doc = "Bit 12 - RGB Input Mode"]
539    #[inline(always)]
540    pub fn rgb_mode(&mut self) -> RGB_MODE_W {
541        RGB_MODE_W { w: self }
542    }
543    #[doc = "Bit 13 - Grayscale Mode Format Enable"]
544    #[inline(always)]
545    pub fn grayscale(&mut self) -> GRAYSCALE_W {
546        GRAYSCALE_W { w: self }
547    }
548    #[doc = "Bit 14 - RGB Format Swap Mode"]
549    #[inline(always)]
550    pub fn rgb_swap(&mut self) -> RGB_SWAP_W {
551        RGB_SWAP_W { w: self }
552    }
553    #[doc = "Bit 15 - Color Space for the Image Data"]
554    #[inline(always)]
555    pub fn col_space(&mut self) -> COL_SPACE_W {
556        COL_SPACE_W { w: self }
557    }
558    #[doc = "Bits 16:26 - Horizontal Size of the Image Sensor \\[0..2047\\]"]
559    #[inline(always)]
560    pub fn im_hsize(&mut self) -> IM_HSIZE_W {
561        IM_HSIZE_W { w: self }
562    }
563    #[doc = "Bits 28:29 - YCrCb Format Swap Mode"]
564    #[inline(always)]
565    pub fn ycc_swap(&mut self) -> YCC_SWAP_W {
566        YCC_SWAP_W { w: self }
567    }
568    #[doc = "Bits 30:31 - RGB Pixel Mapping Configuration"]
569    #[inline(always)]
570    pub fn rgb_cfg(&mut self) -> RGB_CFG_W {
571        RGB_CFG_W { w: self }
572    }
573    #[doc = "Writes raw bits to the register."]
574    #[inline(always)]
575    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
576        self.0.bits(bits);
577        self
578    }
579}
580#[doc = "ISI Configuration 2 Register\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 [isi_cfg2](index.html) module"]
581pub struct ISI_CFG2_SPEC;
582impl crate::RegisterSpec for ISI_CFG2_SPEC {
583    type Ux = u32;
584}
585#[doc = "`read()` method returns [isi_cfg2::R](R) reader structure"]
586impl crate::Readable for ISI_CFG2_SPEC {
587    type Reader = R;
588}
589#[doc = "`write(|w| ..)` method takes [isi_cfg2::W](W) writer structure"]
590impl crate::Writable for ISI_CFG2_SPEC {
591    type Writer = W;
592}
593#[doc = "`reset()` method sets ISI_CFG2 to value 0"]
594impl crate::Resettable for ISI_CFG2_SPEC {
595    #[inline(always)]
596    fn reset_value() -> Self::Ux {
597        0
598    }
599}