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
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
#[doc = "CSI"]
#[repr(C)]
pub struct RegisterBlock {
    #[doc = "CSI Control Register 1"]
    pub CSICR1: crate::RWRegister<u32>,
    #[doc = "CSI Control Register 2"]
    pub CSICR2: crate::RWRegister<u32>,
    #[doc = "CSI Control Register 3"]
    pub CSICR3: crate::RWRegister<u32>,
    #[doc = "CSI Statistic FIFO Register"]
    pub CSISTATFIFO: crate::RORegister<u32>,
    #[doc = "CSI RX FIFO Register"]
    pub CSIRFIFO: crate::RORegister<u32>,
    #[doc = "CSI RX Count Register"]
    pub CSIRXCNT: crate::RWRegister<u32>,
    #[doc = "CSI Status Register"]
    pub CSISR: crate::RWRegister<u32>,
    _reserved0: [u8; 0x04],
    #[doc = "CSI DMA Start Address Register - for STATFIFO"]
    pub CSIDMASA_STATFIFO: crate::RWRegister<u32>,
    #[doc = "CSI DMA Transfer Size Register - for STATFIFO"]
    pub CSIDMATS_STATFIFO: crate::RWRegister<u32>,
    #[doc = "CSI DMA Start Address Register - for Frame Buffer1"]
    pub CSIDMASA_FB1: crate::RWRegister<u32>,
    #[doc = "CSI DMA Transfer Size Register - for Frame Buffer2"]
    pub CSIDMASA_FB2: crate::RWRegister<u32>,
    #[doc = "CSI Frame Buffer Parameter Register"]
    pub CSIFBUF_PARA: crate::RWRegister<u32>,
    #[doc = "CSI Image Parameter Register"]
    pub CSIIMAG_PARA: crate::RWRegister<u32>,
    _reserved1: [u8; 0x10],
    #[doc = "CSI Control Register 18"]
    pub CSICR18: crate::RWRegister<u32>,
    #[doc = "CSI Control Register 19"]
    pub CSICR19: crate::RWRegister<u32>,
}
#[doc = "CSI Control Register 1"]
pub mod CSICR1 {
    #[doc = "Pixel Bit"]
    pub mod PIXEL_BIT {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "8-bit data for each pixel"]
            pub const PIXEL_BIT_0: u32 = 0;
            #[doc = "10-bit data for each pixel"]
            pub const PIXEL_BIT_1: u32 = 0x01;
        }
    }
    #[doc = "Valid Pixel Clock Edge Select"]
    pub mod REDGE {
        pub const offset: u32 = 1;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Pixel data is latched at the falling edge of CSI_PIXCLK"]
            pub const REDGE_0: u32 = 0;
            #[doc = "Pixel data is latched at the rising edge of CSI_PIXCLK"]
            pub const REDGE_1: u32 = 0x01;
        }
    }
    #[doc = "Invert Pixel Clock Input"]
    pub mod INV_PCLK {
        pub const offset: u32 = 2;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "CSI_PIXCLK is directly applied to internal circuitry"]
            pub const INV_PCLK_0: u32 = 0;
            #[doc = "CSI_PIXCLK is inverted before applied to internal circuitry"]
            pub const INV_PCLK_1: u32 = 0x01;
        }
    }
    #[doc = "Invert Data Input. This bit enables or disables internal inverters on the data lines."]
    pub mod INV_DATA {
        pub const offset: u32 = 3;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "CSI_D\\[7:0\\] data lines are directly applied to internal circuitry"]
            pub const INV_DATA_0: u32 = 0;
            #[doc = "CSI_D\\[7:0\\] data lines are inverted before applied to internal circuitry"]
            pub const INV_DATA_1: u32 = 0x01;
        }
    }
    #[doc = "Gated Clock Mode Enable"]
    pub mod GCLK_MODE {
        pub const offset: u32 = 4;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Non-gated clock mode. All incoming pixel clocks are valid. HSYNC is ignored."]
            pub const GCLK_MODE_0: u32 = 0;
            #[doc = "Gated clock mode. Pixel clock signal is valid only when HSYNC is active."]
            pub const GCLK_MODE_1: u32 = 0x01;
        }
    }
    #[doc = "Asynchronous RXFIFO Clear"]
    pub mod CLR_RXFIFO {
        pub const offset: u32 = 5;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Asynchronous STATFIFO Clear"]
    pub mod CLR_STATFIFO {
        pub const offset: u32 = 6;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Data Packing Direction"]
    pub mod PACK_DIR {
        pub const offset: u32 = 7;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Pack from LSB first. For image data, 0x11, 0x22, 0x33, 0x44, it will appear as 0x44332211 in RX FIFO. For stat data, 0xAAAA, 0xBBBB, it will appear as 0xBBBBAAAA in STAT FIFO."]
            pub const PACK_DIR_0: u32 = 0;
            #[doc = "Pack from MSB first. For image data, 0x11, 0x22, 0x33, 0x44, it will appear as 0x11223344 in RX FIFO. For stat data, 0xAAAA, 0xBBBB, it will appear as 0xAAAABBBB in STAT FIFO."]
            pub const PACK_DIR_1: u32 = 0x01;
        }
    }
    #[doc = "FIFO Clear Control"]
    pub mod FCC {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Asynchronous FIFO clear is selected."]
            pub const FCC_0: u32 = 0;
            #[doc = "Synchronous FIFO clear is selected."]
            pub const FCC_1: u32 = 0x01;
        }
    }
    #[doc = "CCIR656 Interface Enable"]
    pub mod CCIR_EN {
        pub const offset: u32 = 10;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Traditional interface is selected. Timing interface logic is used to latch data."]
            pub const CCIR_EN_0: u32 = 0;
            #[doc = "CCIR656 interface is selected."]
            pub const CCIR_EN_1: u32 = 0x01;
        }
    }
    #[doc = "HSYNC Polarity Select"]
    pub mod HSYNC_POL {
        pub const offset: u32 = 11;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "HSYNC is active low"]
            pub const HSYNC_POL_0: u32 = 0;
            #[doc = "HSYNC is active high"]
            pub const HSYNC_POL_1: u32 = 0x01;
        }
    }
    #[doc = "Start Of Frame (SOF) Interrupt Enable. This bit enables the SOF interrupt."]
    pub mod SOF_INTEN {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "SOF interrupt disable"]
            pub const SOF_INTEN_0: u32 = 0;
            #[doc = "SOF interrupt enable"]
            pub const SOF_INTEN_1: u32 = 0x01;
        }
    }
    #[doc = "SOF Interrupt Polarity. This bit controls the condition that generates an SOF interrupt."]
    pub mod SOF_POL {
        pub const offset: u32 = 17;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "SOF interrupt is generated on SOF falling edge"]
            pub const SOF_POL_0: u32 = 0;
            #[doc = "SOF interrupt is generated on SOF rising edge"]
            pub const SOF_POL_1: u32 = 0x01;
        }
    }
    #[doc = "RxFIFO Full Interrupt Enable. This bit enables the RxFIFO full interrupt."]
    pub mod RXFF_INTEN {
        pub const offset: u32 = 18;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "RxFIFO full interrupt disable"]
            pub const RXFF_INTEN_0: u32 = 0;
            #[doc = "RxFIFO full interrupt enable"]
            pub const RXFF_INTEN_1: u32 = 0x01;
        }
    }
    #[doc = "Frame Buffer1 DMA Transfer Done Interrupt Enable"]
    pub mod FB1_DMA_DONE_INTEN {
        pub const offset: u32 = 19;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Frame Buffer1 DMA Transfer Done interrupt disable"]
            pub const FB1_DMA_DONE_INTEN_0: u32 = 0;
            #[doc = "Frame Buffer1 DMA Transfer Done interrupt enable"]
            pub const FB1_DMA_DONE_INTEN_1: u32 = 0x01;
        }
    }
    #[doc = "Frame Buffer2 DMA Transfer Done Interrupt Enable"]
    pub mod FB2_DMA_DONE_INTEN {
        pub const offset: u32 = 20;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Frame Buffer2 DMA Transfer Done interrupt disable"]
            pub const FB2_DMA_DONE_INTEN_0: u32 = 0;
            #[doc = "Frame Buffer2 DMA Transfer Done interrupt enable"]
            pub const FB2_DMA_DONE_INTEN_1: u32 = 0x01;
        }
    }
    #[doc = "STATFIFO Full Interrupt Enable. This bit enables the STAT FIFO interrupt."]
    pub mod STATFF_INTEN {
        pub const offset: u32 = 21;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "STATFIFO full interrupt disable"]
            pub const STATFF_INTEN_0: u32 = 0;
            #[doc = "STATFIFO full interrupt enable"]
            pub const STATFF_INTEN_1: u32 = 0x01;
        }
    }
    #[doc = "STATFIFO DMA Transfer Done Interrupt Enable"]
    pub mod SFF_DMA_DONE_INTEN {
        pub const offset: u32 = 22;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "STATFIFO DMA Transfer Done interrupt disable"]
            pub const SFF_DMA_DONE_INTEN_0: u32 = 0;
            #[doc = "STATFIFO DMA Transfer Done interrupt enable"]
            pub const SFF_DMA_DONE_INTEN_1: u32 = 0x01;
        }
    }
    #[doc = "RxFIFO Overrun Interrupt Enable. This bit enables the RX FIFO overrun interrupt."]
    pub mod RF_OR_INTEN {
        pub const offset: u32 = 24;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "RxFIFO overrun interrupt is disabled"]
            pub const RF_OR_INTEN_0: u32 = 0;
            #[doc = "RxFIFO overrun interrupt is enabled"]
            pub const RF_OR_INTEN_1: u32 = 0x01;
        }
    }
    #[doc = "STAT FIFO Overrun Interrupt Enable. This bit enables the STATFIFO overrun interrupt."]
    pub mod SF_OR_INTEN {
        pub const offset: u32 = 25;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "STATFIFO overrun interrupt is disabled"]
            pub const SF_OR_INTEN_0: u32 = 0;
            #[doc = "STATFIFO overrun interrupt is enabled"]
            pub const SF_OR_INTEN_1: u32 = 0x01;
        }
    }
    #[doc = "Change Of Image Field (COF) Interrupt Enable"]
    pub mod COF_INT_EN {
        pub const offset: u32 = 26;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "COF interrupt is disabled"]
            pub const COF_INT_EN_0: u32 = 0;
            #[doc = "COF interrupt is enabled"]
            pub const COF_INT_EN_1: u32 = 0x01;
        }
    }
    #[doc = "CCIR Mode Select"]
    pub mod CCIR_MODE {
        pub const offset: u32 = 27;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Progressive mode is selected"]
            pub const CCIR_MODE_0: u32 = 0;
            #[doc = "Interlace mode is selected"]
            pub const CCIR_MODE_1: u32 = 0x01;
        }
    }
    #[doc = "CSI-PrP Interface Enable"]
    pub mod PRP_IF_EN {
        pub const offset: u32 = 28;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "CSI to PrP bus is disabled"]
            pub const PRP_IF_EN_0: u32 = 0;
            #[doc = "CSI to PrP bus is enabled"]
            pub const PRP_IF_EN_1: u32 = 0x01;
        }
    }
    #[doc = "End-of-Frame Interrupt Enable. This bit enables and disables the EOF interrupt."]
    pub mod EOF_INT_EN {
        pub const offset: u32 = 29;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "EOF interrupt is disabled."]
            pub const EOF_INT_EN_0: u32 = 0;
            #[doc = "EOF interrupt is generated when RX count value is reached."]
            pub const EOF_INT_EN_1: u32 = 0x01;
        }
    }
    #[doc = "External VSYNC Enable"]
    pub mod EXT_VSYNC {
        pub const offset: u32 = 30;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Internal VSYNC mode"]
            pub const EXT_VSYNC_0: u32 = 0;
            #[doc = "External VSYNC mode"]
            pub const EXT_VSYNC_1: u32 = 0x01;
        }
    }
    #[doc = "SWAP 16-Bit Enable"]
    pub mod SWAP16_EN {
        pub const offset: u32 = 31;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disable swapping"]
            pub const SWAP16_EN_0: u32 = 0;
            #[doc = "Enable swapping"]
            pub const SWAP16_EN_1: u32 = 0x01;
        }
    }
}
#[doc = "CSI Control Register 2"]
pub mod CSICR2 {
    #[doc = "Horizontal Skip Count"]
    pub mod HSC {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Vertical Skip Count. Contains the number of rows to skip. SCE must be 1, otherwise VSC is ignored."]
    pub mod VSC {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Live View Resolution Mode. Selects the grid size used for live view resolution."]
    pub mod LVRM {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0x07 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "512 x 384"]
            pub const LVRM_0: u32 = 0;
            #[doc = "448 x 336"]
            pub const LVRM_1: u32 = 0x01;
            #[doc = "384 x 288"]
            pub const LVRM_2: u32 = 0x02;
            #[doc = "384 x 256"]
            pub const LVRM_3: u32 = 0x03;
            #[doc = "320 x 240"]
            pub const LVRM_4: u32 = 0x04;
            #[doc = "288 x 216"]
            pub const LVRM_5: u32 = 0x05;
            #[doc = "400 x 300"]
            pub const LVRM_6: u32 = 0x06;
        }
    }
    #[doc = "Bayer Tile Start. Controls the Bayer pattern starting point."]
    pub mod BTS {
        pub const offset: u32 = 19;
        pub const mask: u32 = 0x03 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "GR"]
            pub const BTS_0: u32 = 0;
            #[doc = "RG"]
            pub const BTS_1: u32 = 0x01;
            #[doc = "BG"]
            pub const BTS_2: u32 = 0x02;
            #[doc = "GB"]
            pub const BTS_3: u32 = 0x03;
        }
    }
    #[doc = "Skip Count Enable. Enables or disables the skip count feature."]
    pub mod SCE {
        pub const offset: u32 = 23;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Skip count disable"]
            pub const SCE_0: u32 = 0;
            #[doc = "Skip count enable"]
            pub const SCE_1: u32 = 0x01;
        }
    }
    #[doc = "Auto Focus Spread. Selects which green pixels are used for auto-focus."]
    pub mod AFS {
        pub const offset: u32 = 24;
        pub const mask: u32 = 0x03 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Abs Diff on consecutive green pixels"]
            pub const AFS_0: u32 = 0;
            #[doc = "Abs Diff on every third green pixels"]
            pub const AFS_1: u32 = 0x01;
            #[doc = "Abs Diff on every four green pixels"]
            pub const AFS_2: u32 = 0x02;
        }
    }
    #[doc = "Double Resolution Mode. Controls size of statistics grid."]
    pub mod DRM {
        pub const offset: u32 = 26;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Stats grid of 8 x 6"]
            pub const DRM_0: u32 = 0;
            #[doc = "Stats grid of 8 x 12"]
            pub const DRM_1: u32 = 0x01;
        }
    }
    #[doc = "Burst Type of DMA Transfer from STATFIFO. Selects the burst type of DMA transfer from STATFIFO."]
    pub mod DMA_BURST_TYPE_SFF {
        pub const offset: u32 = 28;
        pub const mask: u32 = 0x03 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "INCR8"]
            pub const DMA_BURST_TYPE_SFF_0: u32 = 0;
            #[doc = "INCR4"]
            pub const DMA_BURST_TYPE_SFF_1: u32 = 0x01;
            #[doc = "INCR16"]
            pub const DMA_BURST_TYPE_SFF_3: u32 = 0x03;
        }
    }
    #[doc = "Burst Type of DMA Transfer from RxFIFO. Selects the burst type of DMA transfer from RxFIFO."]
    pub mod DMA_BURST_TYPE_RFF {
        pub const offset: u32 = 30;
        pub const mask: u32 = 0x03 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "INCR8"]
            pub const DMA_BURST_TYPE_RFF_0: u32 = 0;
            #[doc = "INCR4"]
            pub const DMA_BURST_TYPE_RFF_1: u32 = 0x01;
            #[doc = "INCR16"]
            pub const DMA_BURST_TYPE_RFF_3: u32 = 0x03;
        }
    }
}
#[doc = "CSI Control Register 3"]
pub mod CSICR3 {
    #[doc = "Automatic Error Correction Enable"]
    pub mod ECC_AUTO_EN {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Auto Error correction is disabled."]
            pub const ECC_AUTO_EN_0: u32 = 0;
            #[doc = "Auto Error correction is enabled."]
            pub const ECC_AUTO_EN_1: u32 = 0x01;
        }
    }
    #[doc = "Error Detection Interrupt Enable"]
    pub mod ECC_INT_EN {
        pub const offset: u32 = 1;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No interrupt is generated when error is detected. Only the status bit ECC_INT is set."]
            pub const ECC_INT_EN_0: u32 = 0;
            #[doc = "Interrupt is generated when error is detected."]
            pub const ECC_INT_EN_1: u32 = 0x01;
        }
    }
    #[doc = "Dummy Zero Packing Enable"]
    pub mod ZERO_PACK_EN {
        pub const offset: u32 = 2;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Zero packing disabled"]
            pub const ZERO_PACK_EN_0: u32 = 0;
            #[doc = "Zero packing enabled"]
            pub const ZERO_PACK_EN_1: u32 = 0x01;
        }
    }
    #[doc = "Two 8-bit Sensor Mode"]
    pub mod TWO_8BIT_SENSOR {
        pub const offset: u32 = 3;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Only one sensor is connected."]
            pub const TWO_8BIT_SENSOR_0: u32 = 0;
            #[doc = "Two 8-bit sensors are connected or one 16-bit sensor is connected."]
            pub const TWO_8BIT_SENSOR_1: u32 = 0x01;
        }
    }
    #[doc = "RxFIFO Full Level"]
    pub mod RXFF_LEVEL {
        pub const offset: u32 = 4;
        pub const mask: u32 = 0x07 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "4 Double words"]
            pub const RXFF_LEVEL_0: u32 = 0;
            #[doc = "8 Double words"]
            pub const RXFF_LEVEL_1: u32 = 0x01;
            #[doc = "16 Double words"]
            pub const RXFF_LEVEL_2: u32 = 0x02;
            #[doc = "24 Double words"]
            pub const RXFF_LEVEL_3: u32 = 0x03;
            #[doc = "32 Double words"]
            pub const RXFF_LEVEL_4: u32 = 0x04;
            #[doc = "48 Double words"]
            pub const RXFF_LEVEL_5: u32 = 0x05;
            #[doc = "64 Double words"]
            pub const RXFF_LEVEL_6: u32 = 0x06;
            #[doc = "96 Double words"]
            pub const RXFF_LEVEL_7: u32 = 0x07;
        }
    }
    #[doc = "Hresponse Error Enable. This bit enables the hresponse error interrupt."]
    pub mod HRESP_ERR_EN {
        pub const offset: u32 = 7;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disable hresponse error interrupt"]
            pub const HRESP_ERR_EN_0: u32 = 0;
            #[doc = "Enable hresponse error interrupt"]
            pub const HRESP_ERR_EN_1: u32 = 0x01;
        }
    }
    #[doc = "STATFIFO Full Level"]
    pub mod STATFF_LEVEL {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x07 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "4 Double words"]
            pub const STATFF_LEVEL_0: u32 = 0;
            #[doc = "8 Double words"]
            pub const STATFF_LEVEL_1: u32 = 0x01;
            #[doc = "12 Double words"]
            pub const STATFF_LEVEL_2: u32 = 0x02;
            #[doc = "16 Double words"]
            pub const STATFF_LEVEL_3: u32 = 0x03;
            #[doc = "24 Double words"]
            pub const STATFF_LEVEL_4: u32 = 0x04;
            #[doc = "32 Double words"]
            pub const STATFF_LEVEL_5: u32 = 0x05;
            #[doc = "48 Double words"]
            pub const STATFF_LEVEL_6: u32 = 0x06;
            #[doc = "64 Double words"]
            pub const STATFF_LEVEL_7: u32 = 0x07;
        }
    }
    #[doc = "DMA Request Enable for STATFIFO"]
    pub mod DMA_REQ_EN_SFF {
        pub const offset: u32 = 11;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disable the dma request"]
            pub const DMA_REQ_EN_SFF_0: u32 = 0;
            #[doc = "Enable the dma request"]
            pub const DMA_REQ_EN_SFF_1: u32 = 0x01;
        }
    }
    #[doc = "DMA Request Enable for RxFIFO"]
    pub mod DMA_REQ_EN_RFF {
        pub const offset: u32 = 12;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disable the dma request"]
            pub const DMA_REQ_EN_RFF_0: u32 = 0;
            #[doc = "Enable the dma request"]
            pub const DMA_REQ_EN_RFF_1: u32 = 0x01;
        }
    }
    #[doc = "Reflash DMA Controller for STATFIFO"]
    pub mod DMA_REFLASH_SFF {
        pub const offset: u32 = 13;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No reflashing"]
            pub const DMA_REFLASH_SFF_0: u32 = 0;
            #[doc = "Reflash the embedded DMA controller"]
            pub const DMA_REFLASH_SFF_1: u32 = 0x01;
        }
    }
    #[doc = "Reflash DMA Controller for RxFIFO"]
    pub mod DMA_REFLASH_RFF {
        pub const offset: u32 = 14;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No reflashing"]
            pub const DMA_REFLASH_RFF_0: u32 = 0;
            #[doc = "Reflash the embedded DMA controller"]
            pub const DMA_REFLASH_RFF_1: u32 = 0x01;
        }
    }
    #[doc = "Frame Count Reset. Resets the Frame Counter. (Cleared automatically after reset is done)"]
    pub mod FRMCNT_RST {
        pub const offset: u32 = 15;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Do not reset"]
            pub const FRMCNT_RST_0: u32 = 0;
            #[doc = "Reset frame counter immediately"]
            pub const FRMCNT_RST_1: u32 = 0x01;
        }
    }
    #[doc = "Frame Counter"]
    pub mod FRMCNT {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "CSI Statistic FIFO Register"]
pub mod CSISTATFIFO {
    #[doc = "Static data from sensor"]
    pub mod STAT {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0xffff_ffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "CSI RX FIFO Register"]
pub mod CSIRFIFO {
    #[doc = "Received image data"]
    pub mod IMAGE {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0xffff_ffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "CSI RX Count Register"]
pub mod CSIRXCNT {
    #[doc = "RxFIFO Count"]
    pub mod RXCNT {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x003f_ffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "CSI Status Register"]
pub mod CSISR {
    #[doc = "RXFIFO Data Ready"]
    pub mod DRDY {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No data (word) is ready"]
            pub const DRDY_0: u32 = 0;
            #[doc = "At least 1 datum (word) is ready in RXFIFO."]
            pub const DRDY_1: u32 = 0x01;
        }
    }
    #[doc = "CCIR Error Interrupt"]
    pub mod ECC_INT {
        pub const offset: u32 = 1;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No error detected"]
            pub const ECC_INT_0: u32 = 0;
            #[doc = "Error is detected in CCIR coding"]
            pub const ECC_INT_1: u32 = 0x01;
        }
    }
    #[doc = "Hresponse Error Interrupt Status"]
    pub mod HRESP_ERR_INT {
        pub const offset: u32 = 7;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No hresponse error."]
            pub const HRESP_ERR_INT_0: u32 = 0;
            #[doc = "Hresponse error is detected."]
            pub const HRESP_ERR_INT_1: u32 = 0x01;
        }
    }
    #[doc = "Change Of Field Interrupt Status"]
    pub mod COF_INT {
        pub const offset: u32 = 13;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Video field has no change."]
            pub const COF_INT_0: u32 = 0;
            #[doc = "Change of video field is detected."]
            pub const COF_INT_1: u32 = 0x01;
        }
    }
    #[doc = "CCIR Field 1 Interrupt Status"]
    pub mod F1_INT {
        pub const offset: u32 = 14;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Field 1 of video is not detected."]
            pub const F1_INT_0: u32 = 0;
            #[doc = "Field 1 of video is about to start."]
            pub const F1_INT_1: u32 = 0x01;
        }
    }
    #[doc = "CCIR Field 2 Interrupt Status"]
    pub mod F2_INT {
        pub const offset: u32 = 15;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Field 2 of video is not detected"]
            pub const F2_INT_0: u32 = 0;
            #[doc = "Field 2 of video is about to start"]
            pub const F2_INT_1: u32 = 0x01;
        }
    }
    #[doc = "Start of Frame Interrupt Status. Indicates when SOF is detected. (Cleared by writing 1)"]
    pub mod SOF_INT {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "SOF is not detected."]
            pub const SOF_INT_0: u32 = 0;
            #[doc = "SOF is detected."]
            pub const SOF_INT_1: u32 = 0x01;
        }
    }
    #[doc = "End of Frame (EOF) Interrupt Status. Indicates when EOF is detected. (Cleared by writing 1)"]
    pub mod EOF_INT {
        pub const offset: u32 = 17;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "EOF is not detected."]
            pub const EOF_INT_0: u32 = 0;
            #[doc = "EOF is detected."]
            pub const EOF_INT_1: u32 = 0x01;
        }
    }
    #[doc = "RXFIFO Full Interrupt Status"]
    pub mod RXFF_INT {
        pub const offset: u32 = 18;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "RxFIFO is not full."]
            pub const RXFF_INT_0: u32 = 0;
            #[doc = "RxFIFO is full."]
            pub const RXFF_INT_1: u32 = 0x01;
        }
    }
    #[doc = "DMA Transfer Done in Frame Buffer1"]
    pub mod DMA_TSF_DONE_FB1 {
        pub const offset: u32 = 19;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "DMA transfer is not completed."]
            pub const DMA_TSF_DONE_FB1_0: u32 = 0;
            #[doc = "DMA transfer is completed."]
            pub const DMA_TSF_DONE_FB1_1: u32 = 0x01;
        }
    }
    #[doc = "DMA Transfer Done in Frame Buffer2"]
    pub mod DMA_TSF_DONE_FB2 {
        pub const offset: u32 = 20;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "DMA transfer is not completed."]
            pub const DMA_TSF_DONE_FB2_0: u32 = 0;
            #[doc = "DMA transfer is completed."]
            pub const DMA_TSF_DONE_FB2_1: u32 = 0x01;
        }
    }
    #[doc = "STATFIFO Full Interrupt Status"]
    pub mod STATFF_INT {
        pub const offset: u32 = 21;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "STATFIFO is not full."]
            pub const STATFF_INT_0: u32 = 0;
            #[doc = "STATFIFO is full."]
            pub const STATFF_INT_1: u32 = 0x01;
        }
    }
    #[doc = "DMA Transfer Done from StatFIFO"]
    pub mod DMA_TSF_DONE_SFF {
        pub const offset: u32 = 22;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "DMA transfer is not completed."]
            pub const DMA_TSF_DONE_SFF_0: u32 = 0;
            #[doc = "DMA transfer is completed."]
            pub const DMA_TSF_DONE_SFF_1: u32 = 0x01;
        }
    }
    #[doc = "RxFIFO Overrun Interrupt Status"]
    pub mod RF_OR_INT {
        pub const offset: u32 = 24;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "RXFIFO has not overflowed."]
            pub const RF_OR_INT_0: u32 = 0;
            #[doc = "RXFIFO has overflowed."]
            pub const RF_OR_INT_1: u32 = 0x01;
        }
    }
    #[doc = "STATFIFO Overrun Interrupt Status"]
    pub mod SF_OR_INT {
        pub const offset: u32 = 25;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "STATFIFO has not overflowed."]
            pub const SF_OR_INT_0: u32 = 0;
            #[doc = "STATFIFO has overflowed."]
            pub const SF_OR_INT_1: u32 = 0x01;
        }
    }
    #[doc = "When DMA field 0 is complete, this bit will be set to 1(clear by writing 1)."]
    pub mod DMA_FIELD1_DONE {
        pub const offset: u32 = 26;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "When DMA field 0 is complete, this bit will be set to 1(clear by writing 1)."]
    pub mod DMA_FIELD0_DONE {
        pub const offset: u32 = 27;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "When using base address switching enable, this bit will be 1 when switching occur before DMA complete"]
    pub mod BASEADDR_CHHANGE_ERROR {
        pub const offset: u32 = 28;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "CSI DMA Start Address Register - for STATFIFO"]
pub mod CSIDMASA_STATFIFO {
    #[doc = "DMA Start Address for STATFIFO"]
    pub mod DMA_START_ADDR_SFF {
        pub const offset: u32 = 2;
        pub const mask: u32 = 0x3fff_ffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "CSI DMA Transfer Size Register - for STATFIFO"]
pub mod CSIDMATS_STATFIFO {
    #[doc = "DMA Transfer Size for STATFIFO"]
    pub mod DMA_TSF_SIZE_SFF {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0xffff_ffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "CSI DMA Start Address Register - for Frame Buffer1"]
pub mod CSIDMASA_FB1 {
    #[doc = "DMA Start Address in Frame Buffer1"]
    pub mod DMA_START_ADDR_FB1 {
        pub const offset: u32 = 2;
        pub const mask: u32 = 0x3fff_ffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "CSI DMA Transfer Size Register - for Frame Buffer2"]
pub mod CSIDMASA_FB2 {
    #[doc = "DMA Start Address in Frame Buffer2"]
    pub mod DMA_START_ADDR_FB2 {
        pub const offset: u32 = 2;
        pub const mask: u32 = 0x3fff_ffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "CSI Frame Buffer Parameter Register"]
pub mod CSIFBUF_PARA {
    #[doc = "Frame Buffer Parameter"]
    pub mod FBUF_STRIDE {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "DEINTERLACE_STRIDE is only used in the deinterlace mode"]
    pub mod DEINTERLACE_STRIDE {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "CSI Image Parameter Register"]
pub mod CSIIMAG_PARA {
    #[doc = "Image Height. Indicates how many pixels in a column of the image from the sensor."]
    pub mod IMAGE_HEIGHT {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Image Width"]
    pub mod IMAGE_WIDTH {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "CSI Control Register 18"]
pub mod CSICR18 {
    #[doc = "This bit is used to select the output method When input is standard CCIR656 video."]
    pub mod DEINTERLACE_EN {
        pub const offset: u32 = 2;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Deinterlace disabled"]
            pub const DEINTERLACE_EN_0: u32 = 0;
            #[doc = "Deinterlace enabled"]
            pub const DEINTERLACE_EN_1: u32 = 0x01;
        }
    }
    #[doc = "When input is parallel rgb888/yuv444 24bit, this bit can be enabled."]
    pub mod PARALLEL24_EN {
        pub const offset: u32 = 3;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "When this bit is enabled, CSI DMA will switch the base address according to BASEADDR_SWITCH_SEL rather than atomically by DMA completed"]
    pub mod BASEADDR_SWITCH_EN {
        pub const offset: u32 = 4;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "CSI 2 base addresses switching method. When using this bit, BASEADDR_SWITCH_EN is 1."]
    pub mod BASEADDR_SWITCH_SEL {
        pub const offset: u32 = 5;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Switching base address at the edge of the vsync"]
            pub const BASEADDR_SWITCH_SEL_0: u32 = 0;
            #[doc = "Switching base address at the edge of the first data of each frame"]
            pub const BASEADDR_SWITCH_SEL_1: u32 = 0x01;
        }
    }
    #[doc = "In interlace mode, fileld 0 means interrupt enabled."]
    pub mod FIELD0_DONE_IE {
        pub const offset: u32 = 6;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Interrupt disabled"]
            pub const FIELD0_DONE_IE_0: u32 = 0;
            #[doc = "Interrupt enabled"]
            pub const FIELD0_DONE_IE_1: u32 = 0x01;
        }
    }
    #[doc = "When in interlace mode, field 1 done interrupt enable."]
    pub mod DMA_FIELD1_DONE_IE {
        pub const offset: u32 = 7;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Interrupt disabled"]
            pub const DMA_FIELD1_DONE_IE_0: u32 = 0;
            #[doc = "Interrupt enabled"]
            pub const DMA_FIELD1_DONE_IE_1: u32 = 0x01;
        }
    }
    #[doc = "Choosing the last DMA request condition."]
    pub mod LAST_DMA_REQ_SEL {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "fifo_full_level"]
            pub const LAST_DMA_REQ_SEL_0: u32 = 0;
            #[doc = "hburst_length"]
            pub const LAST_DMA_REQ_SEL_1: u32 = 0x01;
        }
    }
    #[doc = "Base address change error interrupt enable signal."]
    pub mod BASEADDR_CHANGE_ERROR_IE {
        pub const offset: u32 = 9;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Output is 32-bit format."]
    pub mod RGB888A_FORMAT_SEL {
        pub const offset: u32 = 10;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "{8'h0, data\\[23:0\\]}"]
            pub const RGB888A_FORMAT_SEL_0: u32 = 0;
            #[doc = "{data\\[23:0\\], 8'h0}"]
            pub const RGB888A_FORMAT_SEL_1: u32 = 0x01;
        }
    }
    #[doc = "Hprot value in AHB bus protocol."]
    pub mod AHB_HPROT {
        pub const offset: u32 = 12;
        pub const mask: u32 = 0x0f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "These bits used to choose the method to mask the CSI input."]
    pub mod MASK_OPTION {
        pub const offset: u32 = 18;
        pub const mask: u32 = 0x03 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Writing to memory from first completely frame, when using this option, the CSI_ENABLE should be 1."]
            pub const MASK_OPTION_0: u32 = 0;
            #[doc = "Writing to memory when CSI_ENABLE is 1."]
            pub const MASK_OPTION_1: u32 = 0x01;
            #[doc = "Writing to memory from second completely frame, when using this option, the CSI_ENABLE should be 1."]
            pub const MASK_OPTION_2: u32 = 0x02;
            #[doc = "Writing to memory when data comes in, not matter the CSI_ENABLE is 1 or 0."]
            pub const MASK_OPTION_3: u32 = 0x03;
        }
    }
    #[doc = "CSI global enable signal"]
    pub mod CSI_ENABLE {
        pub const offset: u32 = 31;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "CSI Control Register 19"]
pub mod CSICR19 {
    #[doc = "This byte stores the highest FIFO level achieved by CSI FIFO timely and will be clear by writing 8'ff to it"]
    pub mod DMA_RFIFO_HIGHEST_FIFO_LEVEL {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}