#pragma once #include "driver/i2c.h" // // Hardware Configuration // // ESP // LEPTON // #define LEP_SCK_PIN 14 // SPI_CLK 18 // #define LEP_CSN_PIN 15 // SPI_CS 10 // #define LEP_VSYNC_PIN 13 // GPIO3/VSYNC 15 // #define LEP_MISO_PIN 12 // SPI_MISO 12 // #define LEP_RESET_PIN 27 // RESET_L 17 // #define I2C_MASTER_SDA_PIN 21 // SDA 5 // #define I2C_MASTER_SCL_PIN 22 // SCL 8 #define LEP_MISO_PIN GPIO_NUM_40 // SPI_MISO 12 #define LEP_VSYNC_PIN GPIO_NUM_41 // GPIO3/VSYNC 15 #define LEP_SCK_PIN GPIO_NUM_47 // SPI_CLK 18 #define LEP_CSN_PIN GPIO_NUM_14 // SPI_CS 10 #define LEP_RESET_PIN GPIO_NUM_20 // RESET_L 17 #define I2C_MASTER_SDA_PIN GPIO_NUM_4 // SDA 5 #define I2C_MASTER_SCL_PIN 5 // SCL 8 // I2C #define I2C_MASTER_NUM I2C_NUM_1 #define I2C_MASTER_FREQ_HZ 100000 // SPI // Lepton uses HSPI (no MOSI) // Host SPI Slave uses VSPI (no MOSI) #define LEP_SPI_HOST SPI2_HOST #define LEP_DMA_NUM SPI_DMA_CH_AUTO #define LEP_SPI_FREQ_HZ 20000000 // // Lepton Buffers Typedef // typedef struct { bool telem_valid; uint16_t lep_min_val; uint16_t lep_max_val; uint8_t *lep_bufferP; uint16_t *lep_telemP; } lep_buffer_t; extern lep_buffer_t rsp_lep_buffer; // // System init functions // bool lepton_io_init(); bool lepton_buffer_init();