Skip to content

Commit 8bcc835

Browse files
author
Bruno Randolf
authored
OV7670 fixes (#484)
* ov7670: fix ov7670_frame_control() Last value of array (VREF) was overwritten by end marker * OV7670: Adapt QQVGA VSTART value to remove bar on top Remove empty bar at the top of the frame. This is more visible on OV7675, but also present on OV7670
1 parent 9e8d7cd commit 8bcc835

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sensors/ov7670.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ int ret = 0;
173173
*/
174174
static int ov7670_frame_control(sensor_t *sensor, int hstart, int hstop, int vstart, int vstop)
175175
{
176-
struct regval_list frame[7];
176+
struct regval_list frame[7];
177177

178178
frame[0].reg_num = HSTART;
179179
frame[0].value = (hstart >> 3);
@@ -194,8 +194,8 @@ struct regval_list frame[7];
194194
frame[5].value = (((vstop & 0x02) << 2) | (vstart & 0x02));
195195

196196
/* End mark */
197-
frame[5].reg_num = 0xFF;
198-
frame[5].value = 0xFF;
197+
frame[6].reg_num = 0xFF;
198+
frame[6].value = 0xFF;
199199

200200
return ov7670_write_array(sensor, frame);
201201
}
@@ -277,7 +277,7 @@ static int set_framesize(sensor_t *sensor, framesize_t framesize)
277277
case FRAMESIZE_QQVGA:
278278
if( (ret = ov7670_write_array(sensor, ov7670_qqvga)) == 0 ) {
279279
/* These values from Omnivision */
280-
ret = ov7670_frame_control(sensor, 158, 14, 10, 490);
280+
ret = ov7670_frame_control(sensor, 158, 14, 12, 490);
281281
}
282282
break;
283283

0 commit comments

Comments
 (0)