1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
#[doc = "Reader of register CSICR2"]
pub type R = crate::R<u32, super::CSICR2>;
#[doc = "Writer for register CSICR2"]
pub type W = crate::W<u32, super::CSICR2>;
#[doc = "Register CSICR2 `reset()`'s with value 0"]
impl crate::ResetValue for super::CSICR2 {
    type Type = u32;
    #[inline(always)]
    fn reset_value() -> Self::Type {
        0
    }
}
#[doc = "Reader of field `HSC`"]
pub type HSC_R = crate::R<u8, u8>;
#[doc = "Write proxy for field `HSC`"]
pub struct HSC_W<'a> {
    w: &'a mut W,
}
impl<'a> HSC_W<'a> {
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !0xff) | ((value as u32) & 0xff);
        self.w
    }
}
#[doc = "Reader of field `VSC`"]
pub type VSC_R = crate::R<u8, u8>;
#[doc = "Write proxy for field `VSC`"]
pub struct VSC_W<'a> {
    w: &'a mut W,
}
impl<'a> VSC_W<'a> {
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0xff << 8)) | (((value as u32) & 0xff) << 8);
        self.w
    }
}
#[doc = "Live View Resolution Mode. Selects the grid size used for live view resolution.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum LVRM_A {
    #[doc = "0: 512 x 384"]
    LVRM_0 = 0,
    #[doc = "1: 448 x 336"]
    LVRM_1 = 1,
    #[doc = "2: 384 x 288"]
    LVRM_2 = 2,
    #[doc = "3: 384 x 256"]
    LVRM_3 = 3,
    #[doc = "4: 320 x 240"]
    LVRM_4 = 4,
    #[doc = "5: 288 x 216"]
    LVRM_5 = 5,
    #[doc = "6: 400 x 300"]
    LVRM_6 = 6,
}
impl From<LVRM_A> for u8 {
    #[inline(always)]
    fn from(variant: LVRM_A) -> Self {
        variant as _
    }
}
#[doc = "Reader of field `LVRM`"]
pub type LVRM_R = crate::R<u8, LVRM_A>;
impl LVRM_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, LVRM_A> {
        use crate::Variant::*;
        match self.bits {
            0 => Val(LVRM_A::LVRM_0),
            1 => Val(LVRM_A::LVRM_1),
            2 => Val(LVRM_A::LVRM_2),
            3 => Val(LVRM_A::LVRM_3),
            4 => Val(LVRM_A::LVRM_4),
            5 => Val(LVRM_A::LVRM_5),
            6 => Val(LVRM_A::LVRM_6),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `LVRM_0`"]
    #[inline(always)]
    pub fn is_lvrm_0(&self) -> bool {
        *self == LVRM_A::LVRM_0
    }
    #[doc = "Checks if the value of the field is `LVRM_1`"]
    #[inline(always)]
    pub fn is_lvrm_1(&self) -> bool {
        *self == LVRM_A::LVRM_1
    }
    #[doc = "Checks if the value of the field is `LVRM_2`"]
    #[inline(always)]
    pub fn is_lvrm_2(&self) -> bool {
        *self == LVRM_A::LVRM_2
    }
    #[doc = "Checks if the value of the field is `LVRM_3`"]
    #[inline(always)]
    pub fn is_lvrm_3(&self) -> bool {
        *self == LVRM_A::LVRM_3
    }
    #[doc = "Checks if the value of the field is `LVRM_4`"]
    #[inline(always)]
    pub fn is_lvrm_4(&self) -> bool {
        *self == LVRM_A::LVRM_4
    }
    #[doc = "Checks if the value of the field is `LVRM_5`"]
    #[inline(always)]
    pub fn is_lvrm_5(&self) -> bool {
        *self == LVRM_A::LVRM_5
    }
    #[doc = "Checks if the value of the field is `LVRM_6`"]
    #[inline(always)]
    pub fn is_lvrm_6(&self) -> bool {
        *self == LVRM_A::LVRM_6
    }
}
#[doc = "Write proxy for field `LVRM`"]
pub struct LVRM_W<'a> {
    w: &'a mut W,
}
impl<'a> LVRM_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: LVRM_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "512 x 384"]
    #[inline(always)]
    pub fn lvrm_0(self) -> &'a mut W {
        self.variant(LVRM_A::LVRM_0)
    }
    #[doc = "448 x 336"]
    #[inline(always)]
    pub fn lvrm_1(self) -> &'a mut W {
        self.variant(LVRM_A::LVRM_1)
    }
    #[doc = "384 x 288"]
    #[inline(always)]
    pub fn lvrm_2(self) -> &'a mut W {
        self.variant(LVRM_A::LVRM_2)
    }
    #[doc = "384 x 256"]
    #[inline(always)]
    pub fn lvrm_3(self) -> &'a mut W {
        self.variant(LVRM_A::LVRM_3)
    }
    #[doc = "320 x 240"]
    #[inline(always)]
    pub fn lvrm_4(self) -> &'a mut W {
        self.variant(LVRM_A::LVRM_4)
    }
    #[doc = "288 x 216"]
    #[inline(always)]
    pub fn lvrm_5(self) -> &'a mut W {
        self.variant(LVRM_A::LVRM_5)
    }
    #[doc = "400 x 300"]
    #[inline(always)]
    pub fn lvrm_6(self) -> &'a mut W {
        self.variant(LVRM_A::LVRM_6)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x07 << 16)) | (((value as u32) & 0x07) << 16);
        self.w
    }
}
#[doc = "Bayer Tile Start. Controls the Bayer pattern starting point.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum BTS_A {
    #[doc = "0: GR"]
    BTS_0 = 0,
    #[doc = "1: RG"]
    BTS_1 = 1,
    #[doc = "2: BG"]
    BTS_2 = 2,
    #[doc = "3: GB"]
    BTS_3 = 3,
}
impl From<BTS_A> for u8 {
    #[inline(always)]
    fn from(variant: BTS_A) -> Self {
        variant as _
    }
}
#[doc = "Reader of field `BTS`"]
pub type BTS_R = crate::R<u8, BTS_A>;
impl BTS_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> BTS_A {
        match self.bits {
            0 => BTS_A::BTS_0,
            1 => BTS_A::BTS_1,
            2 => BTS_A::BTS_2,
            3 => BTS_A::BTS_3,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `BTS_0`"]
    #[inline(always)]
    pub fn is_bts_0(&self) -> bool {
        *self == BTS_A::BTS_0
    }
    #[doc = "Checks if the value of the field is `BTS_1`"]
    #[inline(always)]
    pub fn is_bts_1(&self) -> bool {
        *self == BTS_A::BTS_1
    }
    #[doc = "Checks if the value of the field is `BTS_2`"]
    #[inline(always)]
    pub fn is_bts_2(&self) -> bool {
        *self == BTS_A::BTS_2
    }
    #[doc = "Checks if the value of the field is `BTS_3`"]
    #[inline(always)]
    pub fn is_bts_3(&self) -> bool {
        *self == BTS_A::BTS_3
    }
}
#[doc = "Write proxy for field `BTS`"]
pub struct BTS_W<'a> {
    w: &'a mut W,
}
impl<'a> BTS_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: BTS_A) -> &'a mut W {
        {
            self.bits(variant.into())
        }
    }
    #[doc = "GR"]
    #[inline(always)]
    pub fn bts_0(self) -> &'a mut W {
        self.variant(BTS_A::BTS_0)
    }
    #[doc = "RG"]
    #[inline(always)]
    pub fn bts_1(self) -> &'a mut W {
        self.variant(BTS_A::BTS_1)
    }
    #[doc = "BG"]
    #[inline(always)]
    pub fn bts_2(self) -> &'a mut W {
        self.variant(BTS_A::BTS_2)
    }
    #[doc = "GB"]
    #[inline(always)]
    pub fn bts_3(self) -> &'a mut W {
        self.variant(BTS_A::BTS_3)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 19)) | (((value as u32) & 0x03) << 19);
        self.w
    }
}
#[doc = "Skip Count Enable. Enables or disables the skip count feature.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SCE_A {
    #[doc = "0: Skip count disable"]
    SCE_0 = 0,
    #[doc = "1: Skip count enable"]
    SCE_1 = 1,
}
impl From<SCE_A> for bool {
    #[inline(always)]
    fn from(variant: SCE_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Reader of field `SCE`"]
pub type SCE_R = crate::R<bool, SCE_A>;
impl SCE_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> SCE_A {
        match self.bits {
            false => SCE_A::SCE_0,
            true => SCE_A::SCE_1,
        }
    }
    #[doc = "Checks if the value of the field is `SCE_0`"]
    #[inline(always)]
    pub fn is_sce_0(&self) -> bool {
        *self == SCE_A::SCE_0
    }
    #[doc = "Checks if the value of the field is `SCE_1`"]
    #[inline(always)]
    pub fn is_sce_1(&self) -> bool {
        *self == SCE_A::SCE_1
    }
}
#[doc = "Write proxy for field `SCE`"]
pub struct SCE_W<'a> {
    w: &'a mut W,
}
impl<'a> SCE_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: SCE_A) -> &'a mut W {
        {
            self.bit(variant.into())
        }
    }
    #[doc = "Skip count disable"]
    #[inline(always)]
    pub fn sce_0(self) -> &'a mut W {
        self.variant(SCE_A::SCE_0)
    }
    #[doc = "Skip count enable"]
    #[inline(always)]
    pub fn sce_1(self) -> &'a mut W {
        self.variant(SCE_A::SCE_1)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23);
        self.w
    }
}
#[doc = "Auto Focus Spread. Selects which green pixels are used for auto-focus.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum AFS_A {
    #[doc = "0: Abs Diff on consecutive green pixels"]
    AFS_0 = 0,
    #[doc = "1: Abs Diff on every third green pixels"]
    AFS_1 = 1,
    #[doc = "2: Abs Diff on every four green pixels"]
    AFS_2 = 2,
}
impl From<AFS_A> for u8 {
    #[inline(always)]
    fn from(variant: AFS_A) -> Self {
        variant as _
    }
}
#[doc = "Reader of field `AFS`"]
pub type AFS_R = crate::R<u8, AFS_A>;
impl AFS_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, AFS_A> {
        use crate::Variant::*;
        match self.bits {
            0 => Val(AFS_A::AFS_0),
            1 => Val(AFS_A::AFS_1),
            2 => Val(AFS_A::AFS_2),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `AFS_0`"]
    #[inline(always)]
    pub fn is_afs_0(&self) -> bool {
        *self == AFS_A::AFS_0
    }
    #[doc = "Checks if the value of the field is `AFS_1`"]
    #[inline(always)]
    pub fn is_afs_1(&self) -> bool {
        *self == AFS_A::AFS_1
    }
    #[doc = "Checks if the value of the field is `AFS_2`"]
    #[inline(always)]
    pub fn is_afs_2(&self) -> bool {
        *self == AFS_A::AFS_2
    }
}
#[doc = "Write proxy for field `AFS`"]
pub struct AFS_W<'a> {
    w: &'a mut W,
}
impl<'a> AFS_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: AFS_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "Abs Diff on consecutive green pixels"]
    #[inline(always)]
    pub fn afs_0(self) -> &'a mut W {
        self.variant(AFS_A::AFS_0)
    }
    #[doc = "Abs Diff on every third green pixels"]
    #[inline(always)]
    pub fn afs_1(self) -> &'a mut W {
        self.variant(AFS_A::AFS_1)
    }
    #[doc = "Abs Diff on every four green pixels"]
    #[inline(always)]
    pub fn afs_2(self) -> &'a mut W {
        self.variant(AFS_A::AFS_2)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 24)) | (((value as u32) & 0x03) << 24);
        self.w
    }
}
#[doc = "Double Resolution Mode. Controls size of statistics grid.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DRM_A {
    #[doc = "0: Stats grid of 8 x 6"]
    DRM_0 = 0,
    #[doc = "1: Stats grid of 8 x 12"]
    DRM_1 = 1,
}
impl From<DRM_A> for bool {
    #[inline(always)]
    fn from(variant: DRM_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Reader of field `DRM`"]
pub type DRM_R = crate::R<bool, DRM_A>;
impl DRM_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> DRM_A {
        match self.bits {
            false => DRM_A::DRM_0,
            true => DRM_A::DRM_1,
        }
    }
    #[doc = "Checks if the value of the field is `DRM_0`"]
    #[inline(always)]
    pub fn is_drm_0(&self) -> bool {
        *self == DRM_A::DRM_0
    }
    #[doc = "Checks if the value of the field is `DRM_1`"]
    #[inline(always)]
    pub fn is_drm_1(&self) -> bool {
        *self == DRM_A::DRM_1
    }
}
#[doc = "Write proxy for field `DRM`"]
pub struct DRM_W<'a> {
    w: &'a mut W,
}
impl<'a> DRM_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: DRM_A) -> &'a mut W {
        {
            self.bit(variant.into())
        }
    }
    #[doc = "Stats grid of 8 x 6"]
    #[inline(always)]
    pub fn drm_0(self) -> &'a mut W {
        self.variant(DRM_A::DRM_0)
    }
    #[doc = "Stats grid of 8 x 12"]
    #[inline(always)]
    pub fn drm_1(self) -> &'a mut W {
        self.variant(DRM_A::DRM_1)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26);
        self.w
    }
}
#[doc = "Burst Type of DMA Transfer from STATFIFO. Selects the burst type of DMA transfer from STATFIFO.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum DMA_BURST_TYPE_SFF_A {
    #[doc = "0: INCR8"]
    DMA_BURST_TYPE_SFF_0 = 0,
    #[doc = "1: INCR4"]
    DMA_BURST_TYPE_SFF_1 = 1,
    #[doc = "3: INCR16"]
    DMA_BURST_TYPE_SFF_3 = 3,
}
impl From<DMA_BURST_TYPE_SFF_A> for u8 {
    #[inline(always)]
    fn from(variant: DMA_BURST_TYPE_SFF_A) -> Self {
        variant as _
    }
}
#[doc = "Reader of field `DMA_BURST_TYPE_SFF`"]
pub type DMA_BURST_TYPE_SFF_R = crate::R<u8, DMA_BURST_TYPE_SFF_A>;
impl DMA_BURST_TYPE_SFF_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, DMA_BURST_TYPE_SFF_A> {
        use crate::Variant::*;
        match self.bits {
            0 => Val(DMA_BURST_TYPE_SFF_A::DMA_BURST_TYPE_SFF_0),
            1 => Val(DMA_BURST_TYPE_SFF_A::DMA_BURST_TYPE_SFF_1),
            3 => Val(DMA_BURST_TYPE_SFF_A::DMA_BURST_TYPE_SFF_3),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `DMA_BURST_TYPE_SFF_0`"]
    #[inline(always)]
    pub fn is_dma_burst_type_sff_0(&self) -> bool {
        *self == DMA_BURST_TYPE_SFF_A::DMA_BURST_TYPE_SFF_0
    }
    #[doc = "Checks if the value of the field is `DMA_BURST_TYPE_SFF_1`"]
    #[inline(always)]
    pub fn is_dma_burst_type_sff_1(&self) -> bool {
        *self == DMA_BURST_TYPE_SFF_A::DMA_BURST_TYPE_SFF_1
    }
    #[doc = "Checks if the value of the field is `DMA_BURST_TYPE_SFF_3`"]
    #[inline(always)]
    pub fn is_dma_burst_type_sff_3(&self) -> bool {
        *self == DMA_BURST_TYPE_SFF_A::DMA_BURST_TYPE_SFF_3
    }
}
#[doc = "Write proxy for field `DMA_BURST_TYPE_SFF`"]
pub struct DMA_BURST_TYPE_SFF_W<'a> {
    w: &'a mut W,
}
impl<'a> DMA_BURST_TYPE_SFF_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: DMA_BURST_TYPE_SFF_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "INCR8"]
    #[inline(always)]
    pub fn dma_burst_type_sff_0(self) -> &'a mut W {
        self.variant(DMA_BURST_TYPE_SFF_A::DMA_BURST_TYPE_SFF_0)
    }
    #[doc = "INCR4"]
    #[inline(always)]
    pub fn dma_burst_type_sff_1(self) -> &'a mut W {
        self.variant(DMA_BURST_TYPE_SFF_A::DMA_BURST_TYPE_SFF_1)
    }
    #[doc = "INCR16"]
    #[inline(always)]
    pub fn dma_burst_type_sff_3(self) -> &'a mut W {
        self.variant(DMA_BURST_TYPE_SFF_A::DMA_BURST_TYPE_SFF_3)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 28)) | (((value as u32) & 0x03) << 28);
        self.w
    }
}
#[doc = "Burst Type of DMA Transfer from RxFIFO. Selects the burst type of DMA transfer from RxFIFO.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum DMA_BURST_TYPE_RFF_A {
    #[doc = "0: INCR8"]
    DMA_BURST_TYPE_RFF_0 = 0,
    #[doc = "1: INCR4"]
    DMA_BURST_TYPE_RFF_1 = 1,
    #[doc = "3: INCR16"]
    DMA_BURST_TYPE_RFF_3 = 3,
}
impl From<DMA_BURST_TYPE_RFF_A> for u8 {
    #[inline(always)]
    fn from(variant: DMA_BURST_TYPE_RFF_A) -> Self {
        variant as _
    }
}
#[doc = "Reader of field `DMA_BURST_TYPE_RFF`"]
pub type DMA_BURST_TYPE_RFF_R = crate::R<u8, DMA_BURST_TYPE_RFF_A>;
impl DMA_BURST_TYPE_RFF_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, DMA_BURST_TYPE_RFF_A> {
        use crate::Variant::*;
        match self.bits {
            0 => Val(DMA_BURST_TYPE_RFF_A::DMA_BURST_TYPE_RFF_0),
            1 => Val(DMA_BURST_TYPE_RFF_A::DMA_BURST_TYPE_RFF_1),
            3 => Val(DMA_BURST_TYPE_RFF_A::DMA_BURST_TYPE_RFF_3),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `DMA_BURST_TYPE_RFF_0`"]
    #[inline(always)]
    pub fn is_dma_burst_type_rff_0(&self) -> bool {
        *self == DMA_BURST_TYPE_RFF_A::DMA_BURST_TYPE_RFF_0
    }
    #[doc = "Checks if the value of the field is `DMA_BURST_TYPE_RFF_1`"]
    #[inline(always)]
    pub fn is_dma_burst_type_rff_1(&self) -> bool {
        *self == DMA_BURST_TYPE_RFF_A::DMA_BURST_TYPE_RFF_1
    }
    #[doc = "Checks if the value of the field is `DMA_BURST_TYPE_RFF_3`"]
    #[inline(always)]
    pub fn is_dma_burst_type_rff_3(&self) -> bool {
        *self == DMA_BURST_TYPE_RFF_A::DMA_BURST_TYPE_RFF_3
    }
}
#[doc = "Write proxy for field `DMA_BURST_TYPE_RFF`"]
pub struct DMA_BURST_TYPE_RFF_W<'a> {
    w: &'a mut W,
}
impl<'a> DMA_BURST_TYPE_RFF_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: DMA_BURST_TYPE_RFF_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "INCR8"]
    #[inline(always)]
    pub fn dma_burst_type_rff_0(self) -> &'a mut W {
        self.variant(DMA_BURST_TYPE_RFF_A::DMA_BURST_TYPE_RFF_0)
    }
    #[doc = "INCR4"]
    #[inline(always)]
    pub fn dma_burst_type_rff_1(self) -> &'a mut W {
        self.variant(DMA_BURST_TYPE_RFF_A::DMA_BURST_TYPE_RFF_1)
    }
    #[doc = "INCR16"]
    #[inline(always)]
    pub fn dma_burst_type_rff_3(self) -> &'a mut W {
        self.variant(DMA_BURST_TYPE_RFF_A::DMA_BURST_TYPE_RFF_3)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 30)) | (((value as u32) & 0x03) << 30);
        self.w
    }
}
impl R {
    #[doc = "Bits 0:7 - Horizontal Skip Count"]
    #[inline(always)]
    pub fn hsc(&self) -> HSC_R {
        HSC_R::new((self.bits & 0xff) as u8)
    }
    #[doc = "Bits 8:15 - Vertical Skip Count. Contains the number of rows to skip. SCE must be 1, otherwise VSC is ignored."]
    #[inline(always)]
    pub fn vsc(&self) -> VSC_R {
        VSC_R::new(((self.bits >> 8) & 0xff) as u8)
    }
    #[doc = "Bits 16:18 - Live View Resolution Mode. Selects the grid size used for live view resolution."]
    #[inline(always)]
    pub fn lvrm(&self) -> LVRM_R {
        LVRM_R::new(((self.bits >> 16) & 0x07) as u8)
    }
    #[doc = "Bits 19:20 - Bayer Tile Start. Controls the Bayer pattern starting point."]
    #[inline(always)]
    pub fn bts(&self) -> BTS_R {
        BTS_R::new(((self.bits >> 19) & 0x03) as u8)
    }
    #[doc = "Bit 23 - Skip Count Enable. Enables or disables the skip count feature."]
    #[inline(always)]
    pub fn sce(&self) -> SCE_R {
        SCE_R::new(((self.bits >> 23) & 0x01) != 0)
    }
    #[doc = "Bits 24:25 - Auto Focus Spread. Selects which green pixels are used for auto-focus."]
    #[inline(always)]
    pub fn afs(&self) -> AFS_R {
        AFS_R::new(((self.bits >> 24) & 0x03) as u8)
    }
    #[doc = "Bit 26 - Double Resolution Mode. Controls size of statistics grid."]
    #[inline(always)]
    pub fn drm(&self) -> DRM_R {
        DRM_R::new(((self.bits >> 26) & 0x01) != 0)
    }
    #[doc = "Bits 28:29 - Burst Type of DMA Transfer from STATFIFO. Selects the burst type of DMA transfer from STATFIFO."]
    #[inline(always)]
    pub fn dma_burst_type_sff(&self) -> DMA_BURST_TYPE_SFF_R {
        DMA_BURST_TYPE_SFF_R::new(((self.bits >> 28) & 0x03) as u8)
    }
    #[doc = "Bits 30:31 - Burst Type of DMA Transfer from RxFIFO. Selects the burst type of DMA transfer from RxFIFO."]
    #[inline(always)]
    pub fn dma_burst_type_rff(&self) -> DMA_BURST_TYPE_RFF_R {
        DMA_BURST_TYPE_RFF_R::new(((self.bits >> 30) & 0x03) as u8)
    }
}
impl W {
    #[doc = "Bits 0:7 - Horizontal Skip Count"]
    #[inline(always)]
    pub fn hsc(&mut self) -> HSC_W {
        HSC_W { w: self }
    }
    #[doc = "Bits 8:15 - Vertical Skip Count. Contains the number of rows to skip. SCE must be 1, otherwise VSC is ignored."]
    #[inline(always)]
    pub fn vsc(&mut self) -> VSC_W {
        VSC_W { w: self }
    }
    #[doc = "Bits 16:18 - Live View Resolution Mode. Selects the grid size used for live view resolution."]
    #[inline(always)]
    pub fn lvrm(&mut self) -> LVRM_W {
        LVRM_W { w: self }
    }
    #[doc = "Bits 19:20 - Bayer Tile Start. Controls the Bayer pattern starting point."]
    #[inline(always)]
    pub fn bts(&mut self) -> BTS_W {
        BTS_W { w: self }
    }
    #[doc = "Bit 23 - Skip Count Enable. Enables or disables the skip count feature."]
    #[inline(always)]
    pub fn sce(&mut self) -> SCE_W {
        SCE_W { w: self }
    }
    #[doc = "Bits 24:25 - Auto Focus Spread. Selects which green pixels are used for auto-focus."]
    #[inline(always)]
    pub fn afs(&mut self) -> AFS_W {
        AFS_W { w: self }
    }
    #[doc = "Bit 26 - Double Resolution Mode. Controls size of statistics grid."]
    #[inline(always)]
    pub fn drm(&mut self) -> DRM_W {
        DRM_W { w: self }
    }
    #[doc = "Bits 28:29 - Burst Type of DMA Transfer from STATFIFO. Selects the burst type of DMA transfer from STATFIFO."]
    #[inline(always)]
    pub fn dma_burst_type_sff(&mut self) -> DMA_BURST_TYPE_SFF_W {
        DMA_BURST_TYPE_SFF_W { w: self }
    }
    #[doc = "Bits 30:31 - Burst Type of DMA Transfer from RxFIFO. Selects the burst type of DMA transfer from RxFIFO."]
    #[inline(always)]
    pub fn dma_burst_type_rff(&mut self) -> DMA_BURST_TYPE_RFF_W {
        DMA_BURST_TYPE_RFF_W { w: self }
    }
}