From 502b103771180bf611ea7faf5e086957b06bd1e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Thu, 27 Feb 2025 21:51:48 +0100 Subject: [PATCH] update --- lepton_img2serial.ino | 2 +- src/lipton/lepton_system.h | 18 ++++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/lepton_img2serial.ino b/lepton_img2serial.ino index e7ee3af..2fcd48c 100644 --- a/lepton_img2serial.ino +++ b/lepton_img2serial.ino @@ -151,7 +151,7 @@ uint16_t* take_picture() { return nullptr; } -int lepton_restart() { +void lepton_restart() { while (1) { delay(LEP_RESET_FAIL_RETRY_SECS*1000); diff --git a/src/lipton/lepton_system.h b/src/lipton/lepton_system.h index 877d9da..8b02b07 100644 --- a/src/lipton/lepton_system.h +++ b/src/lipton/lepton_system.h @@ -14,24 +14,22 @@ // #define I2C_MASTER_SCL_PIN 22 // SCL 8 #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_CSN_PIN 10 // SPI_CS 10 +#define LEP_VSYNC_PIN 12 // GPIO3/VSYNC 15 +#define LEP_MISO_PIN 13 // SPI_MISO 12 #define LEP_RESET_PIN 16 // RESET_L 17 -#define I2C_MASTER_SDA_PIN 2 // SDA 5 -#define I2C_MASTER_SCL_PIN 4 // SCL 8 +#define I2C_MASTER_SDA_PIN 8 // SDA 5 +#define I2C_MASTER_SCL_PIN 9 // SCL 8 // I2C #define I2C_MASTER_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 HSPI_HOST -#define LEP_DMA_NUM 2 -#define LEP_SPI_FREQ_HZ 16000000 +#define LEP_SPI_HOST SPI2_HOST +#define LEP_DMA_NUM SPI_DMA_CH_AUTO +#define LEP_SPI_FREQ_HZ 10000000 //