First release.
Sample code of section 4 in Oct 2014 issue of the Interface Magazine, published by CQ publishing in Japan. CQ出版社インターフェース誌 2014年10月号4章に掲載のサンプルコードです.
LPC1768にトラ技OV7670モジュールを接続し,撮影した画像をBMPファイルとしてフラッシュメモリに保存します(PCから見ることができます).このコードのうちカメラ制御部には,Sadaei Osakabe氏のコードを流用させていただいています.
ov7670reg.h@0:33db72b46e9b, 2014-08-26 (annotated)
- Committer:
- smorioka
- Date:
- Tue Aug 26 16:47:47 2014 +0000
- Revision:
- 0:33db72b46e9b
Sample code of section 4 in Oct 2014 issue of the Interface Magazine, published by CQ publishing in Japan.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
smorioka | 0:33db72b46e9b | 1 | // This code was written by Mr.Sadaei Osakabe. |
smorioka | 0:33db72b46e9b | 2 | // Original code is located at |
smorioka | 0:33db72b46e9b | 3 | // https://mbed.org/users/diasea/code/OV7670_with_AL422B_Color_Size_test/ |
smorioka | 0:33db72b46e9b | 4 | |
smorioka | 0:33db72b46e9b | 5 | // size register |
smorioka | 0:33db72b46e9b | 6 | #define REG_COM7 0x12 /* Control 7 */ |
smorioka | 0:33db72b46e9b | 7 | #define REG_HSTART 0x17 /* Horiz start high bits */ |
smorioka | 0:33db72b46e9b | 8 | #define REG_HSTOP 0x18 /* Horiz stop high bits */ |
smorioka | 0:33db72b46e9b | 9 | #define REG_HREF 0x32 /* HREF pieces */ |
smorioka | 0:33db72b46e9b | 10 | #define REG_VSTART 0x19 /* Vert start high bits */ |
smorioka | 0:33db72b46e9b | 11 | #define REG_VSTOP 0x1a /* Vert stop high bits */ |
smorioka | 0:33db72b46e9b | 12 | #define REG_VREF 0x03 /* Pieces of GAIN, VSTART, VSTOP */ |
smorioka | 0:33db72b46e9b | 13 | #define REG_COM3 0x0c /* Control 3 */ |
smorioka | 0:33db72b46e9b | 14 | #define REG_COM14 0x3e /* Control 14 */ |
smorioka | 0:33db72b46e9b | 15 | #define REG_SCALING_XSC 0x70 |
smorioka | 0:33db72b46e9b | 16 | #define REG_SCALING_YSC 0x71 |
smorioka | 0:33db72b46e9b | 17 | #define REG_SCALING_DCWCTR 0x72 |
smorioka | 0:33db72b46e9b | 18 | #define REG_SCALING_PCLK_DIV 0x73 |
smorioka | 0:33db72b46e9b | 19 | #define REG_SCALING_PCLK_DELAY 0xa2 |
smorioka | 0:33db72b46e9b | 20 | |
smorioka | 0:33db72b46e9b | 21 | // VGA setting |
smorioka | 0:33db72b46e9b | 22 | #define COM7_VGA 0x00 |
smorioka | 0:33db72b46e9b | 23 | #define HSTART_VGA 0x13 |
smorioka | 0:33db72b46e9b | 24 | #define HSTOP_VGA 0x01 |
smorioka | 0:33db72b46e9b | 25 | #define HREF_VGA 0x36 //0xb6 0x36 |
smorioka | 0:33db72b46e9b | 26 | #define VSTART_VGA 0x02 |
smorioka | 0:33db72b46e9b | 27 | #define VSTOP_VGA 0x7a |
smorioka | 0:33db72b46e9b | 28 | #define VREF_VGA 0x0a |
smorioka | 0:33db72b46e9b | 29 | #define COM3_VGA 0x00 |
smorioka | 0:33db72b46e9b | 30 | #define COM14_VGA 0x00 |
smorioka | 0:33db72b46e9b | 31 | #define SCALING_XSC_VGA 0x3a |
smorioka | 0:33db72b46e9b | 32 | #define SCALING_YSC_VGA 0x35 |
smorioka | 0:33db72b46e9b | 33 | #define SCALING_DCWCTR_VGA 0x11 |
smorioka | 0:33db72b46e9b | 34 | #define SCALING_PCLK_DIV_VGA 0xf0 |
smorioka | 0:33db72b46e9b | 35 | #define SCALING_PCLK_DELAY_VGA 0x02 |
smorioka | 0:33db72b46e9b | 36 | |
smorioka | 0:33db72b46e9b | 37 | // QVGA setting |
smorioka | 0:33db72b46e9b | 38 | #define COM7_QVGA 0x00 |
smorioka | 0:33db72b46e9b | 39 | #define HSTART_QVGA 0x16 |
smorioka | 0:33db72b46e9b | 40 | #define HSTOP_QVGA 0x04 |
smorioka | 0:33db72b46e9b | 41 | #define HREF_QVGA 0x00 |
smorioka | 0:33db72b46e9b | 42 | #define VSTART_QVGA 0x02 |
smorioka | 0:33db72b46e9b | 43 | #define VSTOP_QVGA 0x7a |
smorioka | 0:33db72b46e9b | 44 | #define VREF_QVGA 0x0a |
smorioka | 0:33db72b46e9b | 45 | #define COM3_QVGA 0x04 |
smorioka | 0:33db72b46e9b | 46 | #define COM14_QVGA 0x19 |
smorioka | 0:33db72b46e9b | 47 | #define SCALING_XSC_QVGA 0x3a |
smorioka | 0:33db72b46e9b | 48 | #define SCALING_YSC_QVGA 0x35 |
smorioka | 0:33db72b46e9b | 49 | #define SCALING_DCWCTR_QVGA 0x11 |
smorioka | 0:33db72b46e9b | 50 | #define SCALING_PCLK_DIV_QVGA 0xf1 |
smorioka | 0:33db72b46e9b | 51 | #define SCALING_PCLK_DELAY_QVGA 0x02 |
smorioka | 0:33db72b46e9b | 52 | |
smorioka | 0:33db72b46e9b | 53 | // QQVGA setting |
smorioka | 0:33db72b46e9b | 54 | #define COM7_QQVGA 0x00 |
smorioka | 0:33db72b46e9b | 55 | #define HSTART_QQVGA 0x16 |
smorioka | 0:33db72b46e9b | 56 | #define HSTOP_QQVGA 0x04 |
smorioka | 0:33db72b46e9b | 57 | #define HREF_QQVGA 0xa4 //0x24? 0xa4? |
smorioka | 0:33db72b46e9b | 58 | #define VSTART_QQVGA 0x02 |
smorioka | 0:33db72b46e9b | 59 | #define VSTOP_QQVGA 0x7a |
smorioka | 0:33db72b46e9b | 60 | #define VREF_QQVGA 0x0a |
smorioka | 0:33db72b46e9b | 61 | #define COM3_QQVGA 0x04 |
smorioka | 0:33db72b46e9b | 62 | #define COM14_QQVGA 0x1a |
smorioka | 0:33db72b46e9b | 63 | #define SCALING_XSC_QQVGA 0x3a |
smorioka | 0:33db72b46e9b | 64 | #define SCALING_YSC_QQVGA 0x35 |
smorioka | 0:33db72b46e9b | 65 | #define SCALING_DCWCTR_QQVGA 0x22 |
smorioka | 0:33db72b46e9b | 66 | #define SCALING_PCLK_DIV_QQVGA 0xf2 |
smorioka | 0:33db72b46e9b | 67 | #define SCALING_PCLK_DELAY_QQVGA 0x02 |
smorioka | 0:33db72b46e9b | 68 | |
smorioka | 0:33db72b46e9b | 69 | // CIF setting no tested linux src 2.6.29-rc5 ov7670_soc.c |
smorioka | 0:33db72b46e9b | 70 | #define COM7_CIF 0x00 |
smorioka | 0:33db72b46e9b | 71 | #define HSTART_CIF 0x15 |
smorioka | 0:33db72b46e9b | 72 | #define HSTOP_CIF 0x0b |
smorioka | 0:33db72b46e9b | 73 | #define HREF_CIF 0xb6 |
smorioka | 0:33db72b46e9b | 74 | #define VSTART_CIF 0x03 |
smorioka | 0:33db72b46e9b | 75 | #define VSTOP_CIF 0x7b |
smorioka | 0:33db72b46e9b | 76 | #define VREF_CIF 0x02 |
smorioka | 0:33db72b46e9b | 77 | #define COM3_CIF 0x08 |
smorioka | 0:33db72b46e9b | 78 | #define COM14_CIF 0x11 |
smorioka | 0:33db72b46e9b | 79 | #define SCALING_XSC_CIF 0x3a |
smorioka | 0:33db72b46e9b | 80 | #define SCALING_YSC_CIF 0x35 |
smorioka | 0:33db72b46e9b | 81 | #define SCALING_DCWCTR_CIF 0x11 |
smorioka | 0:33db72b46e9b | 82 | #define SCALING_PCLK_DIV_CIF 0xf1 |
smorioka | 0:33db72b46e9b | 83 | #define SCALING_PCLK_DELAY_CIF 0x02 |
smorioka | 0:33db72b46e9b | 84 | |
smorioka | 0:33db72b46e9b | 85 | // QCIF setting no tested no tested linux src 2.6.29-rc5 ov7670_soc.c |
smorioka | 0:33db72b46e9b | 86 | #define COM7_QCIF 0x00 |
smorioka | 0:33db72b46e9b | 87 | #define HSTART_QCIF 0x39 |
smorioka | 0:33db72b46e9b | 88 | #define HSTOP_QCIF 0x03 |
smorioka | 0:33db72b46e9b | 89 | #define HREF_QCIF 0x80 |
smorioka | 0:33db72b46e9b | 90 | #define VSTART_QCIF 0x03 |
smorioka | 0:33db72b46e9b | 91 | #define VSTOP_QCIF 0x7b |
smorioka | 0:33db72b46e9b | 92 | #define VREF_QCIF 0x02 |
smorioka | 0:33db72b46e9b | 93 | #define COM3_QCIF 0x0c |
smorioka | 0:33db72b46e9b | 94 | #define COM14_QCIF 0x11 |
smorioka | 0:33db72b46e9b | 95 | #define SCALING_XSC_QCIF 0x3a |
smorioka | 0:33db72b46e9b | 96 | #define SCALING_YSC_QCIF 0x35 |
smorioka | 0:33db72b46e9b | 97 | #define SCALING_DCWCTR_QCIF 0x11 |
smorioka | 0:33db72b46e9b | 98 | #define SCALING_PCLK_DIV_QCIF 0xf1 |
smorioka | 0:33db72b46e9b | 99 | #define SCALING_PCLK_DELAY_QCIF 0x52 |
smorioka | 0:33db72b46e9b | 100 | |
smorioka | 0:33db72b46e9b | 101 | // YUV |
smorioka | 0:33db72b46e9b | 102 | #define REG_COM13 0x3d /* Control 13 */ |
smorioka | 0:33db72b46e9b | 103 | #define REG_TSLB 0x3a /* lots of stuff */ |
smorioka | 0:33db72b46e9b | 104 | |
smorioka | 0:33db72b46e9b | 105 | #define COM7_YUV 0x00 /* YUV */ |
smorioka | 0:33db72b46e9b | 106 | #define COM13_UV 0x00 /* U before V - w/TSLB */ |
smorioka | 0:33db72b46e9b | 107 | #define COM13_UVSWAP 0x01 /* V before U - w/TSLB */ |
smorioka | 0:33db72b46e9b | 108 | #define TSLB_VLAST 0x00 /* YUYV - see com13 */ |
smorioka | 0:33db72b46e9b | 109 | #define TSLB_ULAST 0x00 /* YVYU - see com13 */ |
smorioka | 0:33db72b46e9b | 110 | #define TSLB_YLAST 0x08 /* UYVY or VYUY - see com13 */ |
smorioka | 0:33db72b46e9b | 111 | |
smorioka | 0:33db72b46e9b | 112 | // RGB |
smorioka | 0:33db72b46e9b | 113 | #define COM7_RGB 0x04 /* bits 0 and 2 - RGB format */ |
smorioka | 0:33db72b46e9b | 114 | |
smorioka | 0:33db72b46e9b | 115 | // RGB444 |
smorioka | 0:33db72b46e9b | 116 | #define REG_RGB444 0x8c /* RGB 444 control */ |
smorioka | 0:33db72b46e9b | 117 | #define REG_COM15 0x40 /* Control 15 */ |
smorioka | 0:33db72b46e9b | 118 | |
smorioka | 0:33db72b46e9b | 119 | #define RGB444_ENABLE 0x02 /* Turn on RGB444, overrides 5x5 */ |
smorioka | 0:33db72b46e9b | 120 | #define RGB444_XBGR 0x00 |
smorioka | 0:33db72b46e9b | 121 | #define RGB444_BGRX 0x01 /* Empty nibble at end */ |
smorioka | 0:33db72b46e9b | 122 | #define COM15_RGB444 0x10 /* RGB444 output */ |
smorioka | 0:33db72b46e9b | 123 | |
smorioka | 0:33db72b46e9b | 124 | // RGB555 |
smorioka | 0:33db72b46e9b | 125 | #define RGB444_DISABLE 0x00 /* Turn off RGB444, overrides 5x5 */ |
smorioka | 0:33db72b46e9b | 126 | #define COM15_RGB555 0x30 /* RGB555 output */ |
smorioka | 0:33db72b46e9b | 127 | |
smorioka | 0:33db72b46e9b | 128 | // RGB565 |
smorioka | 0:33db72b46e9b | 129 | #define COM15_RGB565 0x10 /* RGB565 output */ |
smorioka | 0:33db72b46e9b | 130 | |
smorioka | 0:33db72b46e9b | 131 | // Bayer RGB |
smorioka | 0:33db72b46e9b | 132 | #define COM7_BAYER 0x01 /* Bayer format */ |
smorioka | 0:33db72b46e9b | 133 | #define COM7_PBAYER 0x05 /* "Processed bayer" */ |
smorioka | 0:33db72b46e9b | 134 | |
smorioka | 0:33db72b46e9b | 135 | |
smorioka | 0:33db72b46e9b | 136 | // data format |
smorioka | 0:33db72b46e9b | 137 | #define COM15_R10F0 0x00 /* Data range 10 to F0 */ |
smorioka | 0:33db72b46e9b | 138 | #define COM15_R01FE 0x80 /* 01 to FE */ |
smorioka | 0:33db72b46e9b | 139 | #define COM15_R00FF 0xc0 /* 00 to FF */ |
smorioka | 0:33db72b46e9b | 140 | |
smorioka | 0:33db72b46e9b | 141 | // Night mode, flicker, banding / |
smorioka | 0:33db72b46e9b | 142 | #define REG_COM11 0x3b /* Control 11 */ |
smorioka | 0:33db72b46e9b | 143 | #define COM11_NIGHT 0x80 /* NIght mode enable */ |
smorioka | 0:33db72b46e9b | 144 | #define COM11_NIGHT_MIN_RATE_1_1 0x00 /* Normal mode same */ |
smorioka | 0:33db72b46e9b | 145 | #define COM11_NIGHT_MIN_RATE_1_2 0x20 /* Normal mode 1/2 */ |
smorioka | 0:33db72b46e9b | 146 | #define COM11_NIGHT_MIN_RATE_1_4 0x40 /* Normal mode 1/4 */ |
smorioka | 0:33db72b46e9b | 147 | #define COM11_NIGHT_MIN_RATE_1_8 0x60 /* Normal mode 1/5 */ |
smorioka | 0:33db72b46e9b | 148 | #define COM11_HZAUTO_ON 0x10 /* Auto detect 50/60 Hz on */ |
smorioka | 0:33db72b46e9b | 149 | #define COM11_HZAUTO_OFF 0x00 /* Auto detect 50/60 Hz off */ |
smorioka | 0:33db72b46e9b | 150 | #define COM11_60HZ 0x00 /* Manual 60Hz select */ |
smorioka | 0:33db72b46e9b | 151 | #define COM11_50HZ 0x08 /* Manual 50Hz select */ |
smorioka | 0:33db72b46e9b | 152 | #define COM11_EXP 0x02 |
smorioka | 0:33db72b46e9b | 153 | |
smorioka | 0:33db72b46e9b | 154 | #define REG_MTX1 0x4f |
smorioka | 0:33db72b46e9b | 155 | #define REG_MTX2 0x50 |
smorioka | 0:33db72b46e9b | 156 | #define REG_MTX3 0x51 |
smorioka | 0:33db72b46e9b | 157 | #define REG_MTX4 0x52 |
smorioka | 0:33db72b46e9b | 158 | #define REG_MTX5 0x53 |
smorioka | 0:33db72b46e9b | 159 | #define REG_MTX6 0x54 |
smorioka | 0:33db72b46e9b | 160 | #define REG_BRIGHT 0x55 /* Brightness */ |
smorioka | 0:33db72b46e9b | 161 | #define REG_CONTRAS 0x56 /* Contrast control */ |
smorioka | 0:33db72b46e9b | 162 | #define REG_CONTRAS_CENTER 0x57 |
smorioka | 0:33db72b46e9b | 163 | #define REG_MTXS 0x58 |
smorioka | 0:33db72b46e9b | 164 | #define REG_MANU 0x67 |
smorioka | 0:33db72b46e9b | 165 | #define REG_MANV 0x68 |
smorioka | 0:33db72b46e9b | 166 | #define REG_GFIX 0x69 /* Fix gain control */ |
smorioka | 0:33db72b46e9b | 167 | #define REG_GGAIN 0x6a |
smorioka | 0:33db72b46e9b | 168 | #define REG_DBLV 0x6b |
smorioka | 0:33db72b46e9b | 169 | |
smorioka | 0:33db72b46e9b | 170 | #define REG_COM9 0x14 // Control 9 - gain ceiling |
smorioka | 0:33db72b46e9b | 171 | #define COM9_AGC_2X 0x00 |
smorioka | 0:33db72b46e9b | 172 | #define COM9_AGC_4X 0x10 |
smorioka | 0:33db72b46e9b | 173 | #define COM9_AGC_8X 0x20 |
smorioka | 0:33db72b46e9b | 174 | #define COM9_AGC_16X 0x30 |
smorioka | 0:33db72b46e9b | 175 | #define COM9_AGC_32X 0x40 |
smorioka | 0:33db72b46e9b | 176 | #define COM9_AGC_64X 0x50 |
smorioka | 0:33db72b46e9b | 177 | #define COM9_AGC_128X 0x60 |
smorioka | 0:33db72b46e9b | 178 | #define COM9_AGC_MASK 0x70 |
smorioka | 0:33db72b46e9b | 179 | #define COM9_FREEZE 0x01 |
smorioka | 0:33db72b46e9b | 180 | #define COM13_GAMMA 0x80 /* Gamma enable */ |
smorioka | 0:33db72b46e9b | 181 | #define COM13_UVSAT 0x40 /* UV saturation auto adjustment */ |
smorioka | 0:33db72b46e9b | 182 | #define REG_GAIN 0x00 /* Gain lower 8 bits (rest in vref) */ |
smorioka | 0:33db72b46e9b | 183 | #define REG_BLUE 0x01 /* blue gain */ |
smorioka | 0:33db72b46e9b | 184 | #define REG_RED 0x02 /* red gain */ |
smorioka | 0:33db72b46e9b | 185 | #define REG_COM1 0x04 /* Control 1 */ |
smorioka | 0:33db72b46e9b | 186 | #define COM1_CCIR656 0x40 /* CCIR656 enable */ |
smorioka | 0:33db72b46e9b | 187 | #define REG_BAVE 0x05 /* U/B Average level */ |
smorioka | 0:33db72b46e9b | 188 | #define REG_GbAVE 0x06 /* Y/Gb Average level */ |
smorioka | 0:33db72b46e9b | 189 | #define REG_AECHH 0x07 /* AEC MS 5 bits */ |
smorioka | 0:33db72b46e9b | 190 | #define REG_RAVE 0x08 /* V/R Average level */ |
smorioka | 0:33db72b46e9b | 191 | #define REG_COM2 0x09 /* Control 2 */ |
smorioka | 0:33db72b46e9b | 192 | #define COM2_SSLEEP 0x10 /* Soft sleep mode */ |
smorioka | 0:33db72b46e9b | 193 | #define REG_PID 0x0a /* Product ID MSB */ |
smorioka | 0:33db72b46e9b | 194 | #define REG_VER 0x0b /* Product ID LSB */ |
smorioka | 0:33db72b46e9b | 195 | #define COM3_SWAP 0x40 /* Byte swap */ |
smorioka | 0:33db72b46e9b | 196 | #define COM3_SCALEEN 0x08 /* Enable scaling */ |
smorioka | 0:33db72b46e9b | 197 | #define COM3_DCWEN 0x04 /* Enable downsamp/crop/window */ |
smorioka | 0:33db72b46e9b | 198 | #define REG_COM4 0x0d /* Control 4 */ |
smorioka | 0:33db72b46e9b | 199 | #define REG_COM5 0x0e /* All "reserved" */ |
smorioka | 0:33db72b46e9b | 200 | #define REG_COM6 0x0f /* Control 6 */ |
smorioka | 0:33db72b46e9b | 201 | #define REG_AECH 0x10 /* More bits of AEC value */ |
smorioka | 0:33db72b46e9b | 202 | #define REG_CLKRC 0x11 /* Clocl control */ |
smorioka | 0:33db72b46e9b | 203 | #define CLK_EXT 0x40 /* Use external clock directly */ |
smorioka | 0:33db72b46e9b | 204 | #define CLK_SCALE 0x3f /* Mask for internal clock scale */ |
smorioka | 0:33db72b46e9b | 205 | #define COM7_RESET 0x80 /* Register reset */ |
smorioka | 0:33db72b46e9b | 206 | #define COM7_FMT_MASK 0x38 |
smorioka | 0:33db72b46e9b | 207 | #define COM7_FMT_VGA 0x00 |
smorioka | 0:33db72b46e9b | 208 | #define COM7_FMT_CIF 0x20 /* CIF format */ |
smorioka | 0:33db72b46e9b | 209 | #define COM7_FMT_QVGA 0x10 /* QVGA format */ |
smorioka | 0:33db72b46e9b | 210 | #define COM7_FMT_QCIF 0x08 /* QCIF format */ |
smorioka | 0:33db72b46e9b | 211 | #define REG_COM8 0x13 /* Control 8 */ |
smorioka | 0:33db72b46e9b | 212 | #define COM8_FASTAEC 0x80 /* Enable fast AGC/AEC */ |
smorioka | 0:33db72b46e9b | 213 | #define COM8_AECSTEP 0x40 /* Unlimited AEC step size */ |
smorioka | 0:33db72b46e9b | 214 | #define COM8_BFILT 0x20 /* Band filter enable */ |
smorioka | 0:33db72b46e9b | 215 | #define COM8_AGC 0x04 /* Auto gain enable */ |
smorioka | 0:33db72b46e9b | 216 | #define COM8_AWB 0x02 /* White balance enable */ |
smorioka | 0:33db72b46e9b | 217 | #define COM8_AEC 0x01 /* Auto exposure enable */ |
smorioka | 0:33db72b46e9b | 218 | #define REG_COM9 0x14 /* Control 9 - gain ceiling */ |
smorioka | 0:33db72b46e9b | 219 | #define REG_COM10 0x15 /* Control 10 */ |
smorioka | 0:33db72b46e9b | 220 | #define COM10_HSYNC 0x40 /* HSYNC instead of HREF */ |
smorioka | 0:33db72b46e9b | 221 | #define COM10_PCLK_HB 0x20 /* Suppress PCLK on horiz blank */ |
smorioka | 0:33db72b46e9b | 222 | #define COM10_HREF_REV 0x08 /* Reverse HREF */ |
smorioka | 0:33db72b46e9b | 223 | #define COM10_VS_LEAD 0x04 /* VSYNC on clock leading edge */ |
smorioka | 0:33db72b46e9b | 224 | #define COM10_VS_NEG 0x02 /* VSYNC negative */ |
smorioka | 0:33db72b46e9b | 225 | #define COM10_HS_NEG 0x01 /* HSYNC negative */ |
smorioka | 0:33db72b46e9b | 226 | #define REG_PSHFT 0x1b /* Pixel delay after HREF */ |
smorioka | 0:33db72b46e9b | 227 | #define REG_MIDH 0x1c /* Manuf. ID high */ |
smorioka | 0:33db72b46e9b | 228 | #define REG_MIDL 0x1d /* Manuf. ID low */ |
smorioka | 0:33db72b46e9b | 229 | #define REG_MVFP 0x1e /* Mirror / vflip */ |
smorioka | 0:33db72b46e9b | 230 | #define MVFP_MIRROR 0x20 /* Mirror image */ |
smorioka | 0:33db72b46e9b | 231 | #define MVFP_FLIP 0x10 /* Vertical flip */ |
smorioka | 0:33db72b46e9b | 232 | #define REG_AEW 0x24 /* AGC upper limit */ |
smorioka | 0:33db72b46e9b | 233 | #define REG_AEB 0x25 /* AGC lower limit */ |
smorioka | 0:33db72b46e9b | 234 | #define REG_VPT 0x26 /* AGC/AEC fast mode op region */ |
smorioka | 0:33db72b46e9b | 235 | #define REG_HSYST 0x30 /* HSYNC rising edge delay */ |
smorioka | 0:33db72b46e9b | 236 | #define REG_HSYEN 0x31 /* HSYNC falling edge delay */ |
smorioka | 0:33db72b46e9b | 237 | #define REG_COM12 0x3c /* Control 12 */ |
smorioka | 0:33db72b46e9b | 238 | #define COM12_HREF 0x80 /* HREF always */ |
smorioka | 0:33db72b46e9b | 239 | #define COM14_DCWEN 0x10 /* DCW/PCLK-scale enable */ |
smorioka | 0:33db72b46e9b | 240 | #define REG_EDGE 0x3f /* Edge enhancement factor */ |
smorioka | 0:33db72b46e9b | 241 | #define REG_COM16 0x41 /* Control 16 */ |
smorioka | 0:33db72b46e9b | 242 | #define COM16_AWBGAIN 0x08 /* AWB gain enable */ |
smorioka | 0:33db72b46e9b | 243 | #define REG_COM17 0x42 /* Control 17 */ |
smorioka | 0:33db72b46e9b | 244 | #define COM17_AECWIN 0xc0 /* AEC window - must match COM4 */ |
smorioka | 0:33db72b46e9b | 245 | #define COM17_CBAR 0x08 /* DSP Color bar */ |
smorioka | 0:33db72b46e9b | 246 | #define REG_CMATRIX_BASE 0x4f |
smorioka | 0:33db72b46e9b | 247 | #define CMATRIX_LEN 6 |
smorioka | 0:33db72b46e9b | 248 | #define REG_REG76 0x76 /* OV's name */ |
smorioka | 0:33db72b46e9b | 249 | #define R76_BLKPCOR 0x80 /* Black pixel correction enable */ |
smorioka | 0:33db72b46e9b | 250 | #define R76_WHTPCOR 0x40 /* White pixel correction enable */ |
smorioka | 0:33db72b46e9b | 251 | #define REG_HAECC1 0x9f /* Hist AEC/AGC control 1 */ |
smorioka | 0:33db72b46e9b | 252 | #define REG_HAECC2 0xa0 /* Hist AEC/AGC control 2 */ |
smorioka | 0:33db72b46e9b | 253 | #define REG_BD50MAX 0xa5 /* 50hz banding step limit */ |
smorioka | 0:33db72b46e9b | 254 | #define REG_HAECC3 0xa6 /* Hist AEC/AGC control 3 */ |
smorioka | 0:33db72b46e9b | 255 | #define REG_HAECC4 0xa7 /* Hist AEC/AGC control 4 */ |
smorioka | 0:33db72b46e9b | 256 | #define REG_HAECC5 0xa8 /* Hist AEC/AGC control 5 */ |
smorioka | 0:33db72b46e9b | 257 | #define REG_HAECC6 0xa9 /* Hist AEC/AGC control 6 */ |
smorioka | 0:33db72b46e9b | 258 | #define REG_HAECC7 0xaa /* Hist AEC/AGC control 7 */ |
smorioka | 0:33db72b46e9b | 259 | #define REG_BD60MAX 0xab /* 60hz banding step limit */ |