PicoIris/src/PicoIris.cpp
Jakub Wiśnia 4286ab04ee Add pio i2c controller
Add sccb basic init
Add basic camera skeleton (no control, no frames, basically nothing)
2025-03-05 18:10:36 +01:00

37 lines
1.5 KiB
C++

#include <stdio.h>
#include "pico/stdlib.h"
#include "hardware/spi.h"
#include "hardware/i2c.h"
#include "hardware/dma.h"
#include "hardware/pio.h"
#include "hardware/interp.h"
#include "hardware/timer.h"
#include "hardware/clocks.h"
#include "hardware/uart.h"
#include <ov2640/camera.hpp>
camera_config_t left_eye_config = {
.pin_pwdn = -1, /*!< GPIO pin for camera power down line */ //? Also called PWDN, or set to -1 and tie to GND
.pin_reset = -1, /*!< GPIO pin for camera reset line */ //? Cam reset, or set to -1 and tie to 3.3V
.pin_xclk = 0, /*!< GPIO pin for camera XCLK line */ //? in theory could be shared or perhaps ommited?
.pin_sccb_sda = 0, /*!< GPIO pin for camera SDA line */
.pin_sccb_scl = 0, /*!< GPIO pin for camera SCL line */
.pin_data_base = 0, /*!< this pin + 7 consecutive will be used D0-D7 */
.pin_vsync = 0, /*!< GPIO pin for camera VSYNC line */
.pin_href = 0, /*!< GPIO pin for camera HREF line */
.pin_pclk = 0, /*!< GPIO pin for camera PCLK line */
.xclk_freq_hz = 0, /*!< Frequency of XCLK signal, in Hz. */ //! Figure out the highest it can go to
.sccb_ctrl = 0, /* Select i2c controller ctrl: 0 - i2c0, 1 - i2c1, 2 - pio0, 3 - pio1, 4 - pio2 */
};
int main()
{
stdio_init_all();
while (true) {
printf("Hello, world!\n");
sleep_ms(1000);
}
}