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

XCLK generation via PWM. More...

#include <stdint.h>
Include dependency graph for xclk.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)

Detailed Description

XCLK generation via PWM.

Function Documentation

◆ xclk_start()

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.

Parameters
pinGPIO number
freq_hzrequested frequency, typically 10-24 MHz
Returns
0 on success

◆ xclk_stop()

void xclk_stop ( int pin)

Stop the clock and release the pin.

中文文档