To enable a 24MHz output on pin 21, the USB clock (48MHz) can be divided by 2, using the following code:
#include "hardware/clocks.h"clock_gpio_init(21, CLOCKS_CLK_GPOUT1_CTRL_AUXSRC_VALUE_CLK_USB, 2);
This is a hardware function, it only has to be initialized, no further code is necessary.
Unfortunately, pins 23, 24, and 25 are already used for internal purposes on the original Rapsi PICO board, and 21 is used for the I2C, but the Waveshare Pico Zero has them all available.
I think that this'll be useful for DIY builds, but this is on you to decide.
I didn't test it, because I don't have a bare camera yet.
In case the builder wants to use a bare Wiimote camera instead of the DF Robot camera, they need a separate 24MHz oscillator to clock the camera. The RP2040 can output a square wave on pins 21, 23, 24, and 25. See https://lorenz-ruprecht.at/docu/pico-sdk/1.4.0/html/group__hardware__clocks.html#gacc2b6fcdf0b38daf931b4ac821e1bf16
To enable a 24MHz output on pin 21, the USB clock (48MHz) can be divided by 2, using the following code:
#include "hardware/clocks.h"
clock_gpio_init(21, CLOCKS_CLK_GPOUT1_CTRL_AUXSRC_VALUE_CLK_USB, 2);
This is a hardware function, it only has to be initialized, no further code is necessary.
Unfortunately, pins 23, 24, and 25 are already used for internal purposes on the original Rapsi PICO board, and 21 is used for the I2C, but the Waveshare Pico Zero has them all available.
I think that this'll be useful for DIY builds, but this is on you to decide. I didn't test it, because I don't have a bare camera yet.