PicoCamera 0.2.0
Camera library for RP2040 with an esp32-camera compatible API
GitHub
载入中...
搜索中...
未找到
ov7670.cpp 文件参考

OV7670 sensor driver. 更多...

#include "ov7670.h"
#include "pico/stdlib.h"
#include "../driver/sccb.h"
#include "ov7670_regs.h"
ov7670.cpp 的引用(Include)关系图:

函数

int ov7670_detect (sensor_t *sensor)
 Probe the bus for an OV7670. On success fills sensor->id.
int ov7670_init_sensor (sensor_t *sensor)
 Fill sensor_t function pointers and write the default register set.

详细描述

OV7670 sensor driver.

Register tables and control logic adapted from esp32-camera's ov7670.c (OpenMV, MIT license). The OV7670 has no JPEG encoder, so set_pixformat(PIXFORMAT_JPEG) always fails; the core also rejects it up front via camera_sensor_info_t.support_jpeg.

Timing notes:

  • The default table targets "30 fps @ 12 MHz XCLK" (CLKRC=0, PLL x4). With this library's 10 MHz XCLK the frame rate scales to ~25 fps.
  • COM10 selects VSYNC active during frame data (VSYNC_NEG) and a free-running PCLK, matching what the PIO capture engine expects.

函数说明

◆ ov7670_detect()

int ov7670_detect ( sensor_t * sensor)

Probe the bus for an OV7670. On success fills sensor->id.

返回
0 if detected

◆ ov7670_init_sensor()

int ov7670_init_sensor ( sensor_t * sensor)

Fill sensor_t function pointers and write the default register set.

返回
0 on success
English version