![]() |
PicoCamera 0.2.0
Camera library for RP2040 with an esp32-camera compatible API
|
GitHub |
GC0308 sensor driver. 更多...
#include "gc0308.h"#include "pico/stdlib.h"#include "../driver/sccb.h"#include "gc0308_regs.h"#include "gc0308_settings.h"宏定义 | |
| #define | H8(v) |
| #define | L8(v) |
函数 | |
| int | gc0308_detect (sensor_t *sensor) |
| Probe the bus for a GC0308. On success fills sensor->id. | |
| int | gc0308_init_sensor (sensor_t *sensor) |
| Fill sensor_t function pointers and write the default register set. | |
GC0308 sensor driver.
Register tables and control logic adapted from esp32-camera's gc0308.c (Apache-2.0). The GC0308 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.
Framesize scaling uses the subsample strategy (esp32-camera's Kconfig default, CONFIG_GC_SENSOR_SUBSAMPLE_MODE): keep the widest field of view and pick the coarsest subsample ratio that still covers the requested window.
| #define H8 | ( | v | ) |
| #define L8 | ( | v | ) |
| int gc0308_detect | ( | sensor_t * | sensor | ) |
Probe the bus for a GC0308. On success fills sensor->id.
| int gc0308_init_sensor | ( | sensor_t * | sensor | ) |
Fill sensor_t function pointers and write the default register set.