![]() |
PicoCamera 0.2.0
Camera library for RP2040 with an esp32-camera compatible API
|
GitHub |
GC2145 sensor driver. More...
#include "gc2145.h"#include "pico/stdlib.h"#include "../driver/sccb.h"#include "gc2145_regs.h"#include "gc2145_settings.h"Macros | |
| #define | H8(v) |
| #define | L8(v) |
Functions | |
| int | gc2145_detect (sensor_t *sensor) |
| Probe the bus for a GC2145. On success fills sensor->id. | |
| int | gc2145_init_sensor (sensor_t *sensor) |
| Fill sensor_t function pointers and write the default register set. | |
GC2145 sensor driver.
Register tables and control logic adapted from esp32-camera's gc2145.c (Apache-2.0). The GC2145 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 gc2145_detect | ( | sensor_t * | sensor | ) |
Probe the bus for a GC2145. On success fills sensor->id.
| int gc2145_init_sensor | ( | sensor_t * | sensor | ) |
Fill sensor_t function pointers and write the default register set.