Added support for O_NONBLOCK in DQBUF ioctl
[microdia.git] / ov7670.h
blob0e062e9aa234d383c0a6cbf18327797ec03fb978
1 /**
2 * @file ov7670.h
3 * @author Tiago Madeira
4 * @date 2008-03-24
5 * @version v0.0.0
7 * @brief Common functions and data for the Sonix SN9C20x webcam bridge chips.
9 * @note Copyright (C) Tiago Madeira
11 * @par Licences
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 #ifndef OV7670_H
29 #define OV7670_H
31 #define OV7670_CTL_GAIN 0x00
32 #define OV7670_CTL_BLUE 0x01
33 #define OV7670_CTL_RED 0x02
34 #define OV7670_CTL_VREF 0x03
35 #define OV7670_CTL_COM1 0x04
36 #define OV7670_CTL_BAVE 0x05
37 #define OV7670_CTL_GbAVE 0x06
38 #define OV7670_CTL_AECHH 0x07
39 #define OV7670_CTL_RAVE 0x08
40 #define OV7670_CTL_COM2 0x09
41 #define OV7670_CTL_PID 0x0a
42 #define OV7670_CTL_VER 0x0b
43 #define OV7670_CTL_COM3 0x0c
44 #define OV7670_CTL_COM4 0x0d
45 #define OV7670_CTL_COM5 0x0e
46 #define OV7670_CTL_COM6 0x0f
47 #define OV7670_CTL_AECH 0x10
48 #define OV7670_CTL_CLKRC 0x11
49 #define OV7670_CTL_COM7 0x12
50 #define OV7670_CTL_COM8 0x13
51 #define OV7670_CTL_COM9 0x14
52 #define OV7670_CTL_COM10 0x15
53 #define OV7670_CTL_HSTART 0x17
54 #define OV7670_CTL_HSTOP 0x18
55 #define OV7670_CTL_VSTRT 0x19
56 #define OV7670_CTL_VSTOP 0x1a
57 #define OV7670_CTL_PSHFT 0x1b
58 #define OV7670_CTL_MIDH 0x1c
59 #define OV7670_CTL_MIDL 0x1d
60 #define OV7670_CTL_MVFP 0x1e
61 #define OV7670_CTL_LAEC 0x1f
62 #define OV7670_CTL_ADCCTR0 0x20
63 #define OV7670_CTL_ADCCTR1 0x21
64 #define OV7670_CTL_ADCCTR2 0x22
65 #define OV7670_CTL_ADCCTR3 0x23
66 #define OV7670_CTL_AEW 0x24
67 #define OV7670_CTL_AEB 0x25
68 #define OV7670_CTL_VPT 0x26
69 #define OV7670_CTL_BBIAS 0x27
70 #define OV7670_CTL_GbBIAS 0x28
71 #define OV7670_CTL_EXHCH 0x2a
72 #define OV7670_CTL_EXHCL 0x2b
73 #define OV7670_CTL_RBIAS 0x2c
74 #define OV7670_CTL_ADVFL 0x2d
75 #define OV7670_CTL_ADVFH 0x2e
76 #define OV7670_CTL_YAVE 0x2f
77 #define OV7670_CTL_HSYST 0x30
78 #define OV7670_CTL_HSYEN 0x31
79 #define OV7670_CTL_HREF 0x32
80 #define OV7670_CTL_CHLF 0x33
81 #define OV7670_CTL_ARBLM 0x34
82 #define OV7670_CTL_ADC 0x37
83 #define OV7670_CTL_ACOM 0x38
84 #define OV7670_CTL_OFON 0x39
85 #define OV7670_CTL_TSLB 0x3a
86 #define OV7670_CTL_COM11 0x3b
87 #define OV7670_CTL_COM12 0x3c
88 #define OV7670_CTL_COM13 0x3d
89 #define OV7670_CTL_COM14 0x3e
90 #define OV7670_CTL_EDGE 0x3f
91 #define OV7670_CTL_COM15 0x40
92 #define OV7670_CTL_COM16 0x41
93 #define OV7670_CTL_COM17 0x42
94 #define OV7670_CTL_AWBC1 0x43
95 #define OV7670_CTL_AWBC2 0x44
96 #define OV7670_CTL_AWBC3 0x45
97 #define OV7670_CTL_AWBC4 0x46
98 #define OV7670_CTL_AWBC5 0x47
99 #define OV7670_CTL_AWBC6 0x48
100 #define OV7670_CTL_REG4B 0x4b
101 #define OV7670_CTL_DNSTH 0x4c
102 #define OV7670_CTL_MTX1 0x4f
103 #define OV7670_CTL_MTX2 0x50
104 #define OV7670_CTL_MTX3 0x51
105 #define OV7670_CTL_MTX4 0x52
106 #define OV7670_CTL_MTX5 0x53
107 #define OV7670_CTL_MTX6 0x54
108 #define OV7670_CTL_BRIGHT 0x55
109 #define OV7670_CTL_CONTRAS 0x56
110 #define OV7670_CTL_CONTRAS_CENTER 0x57
111 #define OV7670_CTL_MTXS 0x58
112 #define OV7670_CTL_LCC1 0x62
113 #define OV7670_CTL_LCC2 0x63
114 #define OV7670_CTL_LCC3 0x64
115 #define OV7670_CTL_LCC4 0x65
116 #define OV7670_CTL_LCC5 0x66
117 #define OV7670_CTL_MANU 0x67
118 #define OV7670_CTL_MANV 0x68
119 #define OV7670_CTL_GFIX 0x69
120 #define OV7670_CTL_GGAIN 0x6a
121 #define OV7670_CTL_DBLV 0x6b
122 #define OV7670_CTL_AWBCTR3 0x6c
123 #define OV7670_CTL_AWBCTR2 0x6d
124 #define OV7670_CTL_AWBCTR1 0x6e
125 #define OV7670_CTL_AWBCTR0 0x6f
126 #define OV7670_CTL_SCALING_XSC 0x70
127 #define OV7670_CTL_SCALING_YSC 0x71
128 #define OV7670_CTL_SCALING_DCWCTR 0x72
129 #define OV7670_CTL_SCALING_PCLK_DIV 0x73
130 #define OV7670_CTL_REG74 0x74
131 #define OV7670_CTL_REG75 0x75
132 #define OV7670_CTL_REG76 0x76
133 #define OV7670_CTL_REG77 0x77
134 #define OV7670_CTL_SLOP 0x7a
135 #define OV7670_CTL_GAM1 0x7b
136 #define OV7670_CTL_GAM2 0x7c
137 #define OV7670_CTL_GAM3 0x7d
138 #define OV7670_CTL_GAM4 0x7e
139 #define OV7670_CTL_GAM5 0x7f
140 #define OV7670_CTL_GAM6 0x80
141 #define OV7670_CTL_GAM7 0x81
142 #define OV7670_CTL_GAM8 0x82
143 #define OV7670_CTL_GAM9 0x83
144 #define OV7670_CTL_GAM10 0x84
145 #define OV7670_CTL_GAM11 0x85
146 #define OV7670_CTL_GAM12 0x86
147 #define OV7670_CTL_GAM13 0x87
148 #define OV7670_CTL_GAM14 0x88
149 #define OV7670_CTL_GAM15 0x89
150 #define OV7670_CTL_RGB444 0x8c
151 #define OV7670_CTL_DM_LNL 0x92
152 #define OV7670_CTL_DM_LNH 0x93
153 #define OV7670_CTL_LCC6 0x94
154 #define OV7670_CTL_LCC7 0x95
155 #define OV7670_CTL_BD50ST 0x9d
156 #define OV7670_CTL_BD60ST 0x9e
157 #define OV7670_CTL_HAECC1 0x9f
158 #define OV7670_CTL_HAECC2 0xa0
159 #define OV7670_CTL_SCALING_PCLK_DELAY 0xa2
160 #define OV7670_CTL_NT_CTRL 0xa4
161 #define OV7670_CTL_BD50MAX 0xa5
162 #define OV7670_CTL_HAECC3 0xa6
163 #define OV7670_CTL_HAECC4 0xa7
164 #define OV7670_CTL_HAECC5 0xa8
165 #define OV7670_CTL_HAECC6 0xa9
166 #define OV7670_CTL_HAECC7 0xaa
167 #define OV7670_CTL_BD60MAX 0xab
168 #define OV7670_CTL_STR_OPT 0xac
169 #define OV7670_CTL_STR_R 0xad
170 #define OV7670_CTL_STR_G 0xae
171 #define OV7670_CTL_STR_B 0xaf
172 #define OV7670_CTL_ABLC1 0xb1
173 #define OV7670_CTL_THL_ST 0xb3
174 #define OV7670_CTL_THL_DLT 0xb5
175 #define OV7670_CTL_AD_CHB 0xbe
176 #define OV7670_CTL_AH_CHR 0xbf
177 #define OV7670_CTL_AD_CHGb 0xc0
178 #define OV7670_CTL_AD_CHGr 0xc1
179 #define OV7670_CTL_SATCTR 0xc9
181 #endif