Fix OV2640 sensor clock

This commit is contained in:
Kwabena W. Agyeman 2020-12-04 15:19:49 -08:00
parent 5e419eedde
commit 7f62250b36
3 changed files with 5 additions and 1 deletions

View File

@ -11,5 +11,6 @@
#ifndef __OV2640_H__
#define __OV2640_H__
#include "sensor.h"
#define OV2640_XCLK_FREQ 24000000
int ov2640_init(sensor_t *sensor);
#endif // __OV2640_H__

View File

@ -113,7 +113,7 @@
#define AEC 0x10
#define CLKRC 0x11
#define CLKRC_DOUBLE 0x80
#define CLKRC_DOUBLE 0x82
#define CLKRC_DIVIDER_MASK 0x3F
#define COM10 0x15

View File

@ -389,6 +389,9 @@ int sensor_init()
switch (sensor.chip_id) {
#if (OMV_ENABLE_OV2640 == 1)
case OV2640_ID:
if (extclk_config(OV2640_XCLK_FREQ) != 0) {
return -3;
}
init_ret = ov2640_init(&sensor);
break;
#endif // (OMV_ENABLE_OV2640 == 1)