mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
GC2145 driver fixes.
This commit is contained in:
parent
3205e96afd
commit
29e2c0918b
@ -498,6 +498,9 @@ int sensor_init()
|
||||
|
||||
#if (OMV_ENABLE_GC2145 == 1)
|
||||
case GC2145_ID:
|
||||
if (extclk_config(GC2145_XCLK_FREQ) != 0) {
|
||||
return -3;
|
||||
}
|
||||
init_ret = gc2145_init(&sensor);
|
||||
break;
|
||||
#endif //(OMV_ENABLE_GC2145 == 1)
|
||||
|
||||
@ -785,8 +785,8 @@ static int set_framesize(sensor_t *sensor, framesize_t framesize)
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Write pixel format registers
|
||||
for (int i=0; regs[i][0] != 0xFF; i++) {
|
||||
// Write frame size registers
|
||||
for (int i=0; regs[i][0]; i++) {
|
||||
ret |= cambus_writeb(&sensor->bus, sensor->slv_addr, regs[i][0], regs[i][1]);
|
||||
}
|
||||
return ret;
|
||||
|
||||
@ -10,5 +10,6 @@
|
||||
*/
|
||||
#ifndef __GC2145_H__
|
||||
#define __GC2145_H__
|
||||
#define GC2145_XCLK_FREQ (6000000)
|
||||
int gc2145_init(sensor_t *sensor);
|
||||
#endif // __GC2145_H__
|
||||
|
||||
Loading…
Reference in New Issue
Block a user