PicoCamera 0.2.0
Camera library for RP2040 with an esp32-camera compatible API
GitHub
Loading...
Searching...
No Matches
ov7725.cpp File Reference

OV7725 sensor driver. More...

#include "ov7725.h"
#include "pico/stdlib.h"
#include "../driver/sccb.h"
#include "ov7725_regs.h"
Include dependency graph for ov7725.cpp:

Functions

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

Detailed Description

OV7725 sensor driver.

Register tables and control logic adapted from esp32-camera's ov7725.c (OpenMV, MIT license). The OV7725 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 (same register family as the OV7670):

  • COM10 selects VSYNC active during frame data (VSYNC_NEG) and a free-running PCLK, matching what the PIO capture engine expects.
  • The default table bypasses the PLL and divides PCLK down via CLKRC (QVGA: XCLK/4, VGA: XCLK/8), which the RP2040 capture path needs.

Function Documentation

◆ ov7725_detect()

int ov7725_detect ( sensor_t * sensor)

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

Returns
0 if detected

◆ ov7725_init_sensor()

int ov7725_init_sensor ( sensor_t * sensor)

Fill sensor_t function pointers and write the default register set.

Returns
0 on success
中文文档