Browse Source

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
pull/487/head
Bruno Randolf 3 years ago committed by GitHub
parent
commit
8bcc835cf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      sensors/ov7670.c

8
sensors/ov7670.c

@ -173,7 +173,7 @@ int ret = 0; @@ -173,7 +173,7 @@ int ret = 0;
*/
static int ov7670_frame_control(sensor_t *sensor, int hstart, int hstop, int vstart, int vstop)
{
struct regval_list frame[7];
struct regval_list frame[7];
frame[0].reg_num = HSTART;
frame[0].value = (hstart >> 3);
@ -194,8 +194,8 @@ struct regval_list frame[7]; @@ -194,8 +194,8 @@ struct regval_list frame[7];
frame[5].value = (((vstop & 0x02) << 2) | (vstart & 0x02));
/* End mark */
frame[5].reg_num = 0xFF;
frame[5].value = 0xFF;
frame[6].reg_num = 0xFF;
frame[6].value = 0xFF;
return ov7670_write_array(sensor, frame);
}
@ -277,7 +277,7 @@ static int set_framesize(sensor_t *sensor, framesize_t framesize) @@ -277,7 +277,7 @@ static int set_framesize(sensor_t *sensor, framesize_t framesize)
case FRAMESIZE_QQVGA:
if( (ret = ov7670_write_array(sensor, ov7670_qqvga)) == 0 ) {
/* These values from Omnivision */
ret = ov7670_frame_control(sensor, 158, 14, 10, 490);
ret = ov7670_frame_control(sensor, 158, 14, 12, 490);
}
break;

Loading…
Cancel
Save