![]() |
PicoCamera 0.2.0
Camera library for RP2040 with an esp32-camera compatible API
|
GitHub |
XCLK generation via PWM. More...
#include <stdint.h>Go to the source code of this file.
Functions | |
| int | xclk_start (int pin, uint32_t freq_hz) |
| Start the camera master clock on a GPIO. | |
| void | xclk_stop (int pin) |
XCLK generation via PWM.
| int xclk_start | ( | int | pin, |
| uint32_t | freq_hz ) |
Start the camera master clock on a GPIO.
Uses the PWM slice of the given pin. Frequency is derived from the actual sys clock, so overclocked boards get the right frequency. The achievable granularity near 20 MHz is limited (sys_clk/N); OV sensors tolerate a wide range, so the closest divider is used.
| pin | GPIO number |
| freq_hz | requested frequency, typically 10-24 MHz |
| void xclk_stop | ( | int | pin | ) |
Stop the clock and release the pin.