Files
EmbeddedCameraIDF/main/lipton/lepton_system.h
2025-04-29 21:38:06 +02:00

55 lines
1.3 KiB
C

#pragma once
//
// 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 40 // SPI_MISO 12
#define LEP_VSYNC_PIN 41 // GPIO3/VSYNC 15
#define LEP_SCK_PIN 47 // SPI_CLK 18
#define LEP_CSN_PIN 14 // SPI_CS 10
#define LEP_RESET_PIN 20 // RESET_L 17
#define I2C_MASTER_SDA_PIN 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();