From 230e82d852d10d8f303d02d47cd68002a6ff33a6 Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Tue, 1 Feb 2022 14:41:01 +0100 Subject: [PATCH] REG_SPI_BASE not defined for S3 --- include/esp32x_fixes.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/esp32x_fixes.h b/include/esp32x_fixes.h index 62a9c2824..a9f963d42 100644 --- a/include/esp32x_fixes.h +++ b/include/esp32x_fixes.h @@ -58,6 +58,11 @@ #define FSPI_HOST SPI2_HOST #define HSPI_HOST SPI3_HOST #define VSPI_HOST SPI3_HOST +#ifndef REG_SPI_BASE +#define REG_SPI_BASE(i) (DR_REG_SPI1_BASE + (((i)>1) ? (((i)* 0x1000) + 0x20000) : (((~(i)) & 1)* 0x1000 ))) +// SPI_MOSI_DLEN_REG is not defined anymore in esp32s3, instead use SPI_MS_DLEN_REG +#define SPI_MOSI_DLEN_REG(x) SPI_MS_DLEN_REG(x) +#endif // REG_SPI_BASE #elif CONFIG_IDF_TARGET_ESP32C3 #define SPI_HOST SPI1_HOST