From d97340886738ba14d49aa54e11a7305099296845 Mon Sep 17 00:00:00 2001 From: Jason2866 Date: Fri, 18 Jun 2021 15:44:39 +0000 Subject: [PATCH] Fix s2 --- include/esp32x_fixes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/esp32x_fixes.h b/include/esp32x_fixes.h index dbf512a6a..606c87b6e 100644 --- a/include/esp32x_fixes.h +++ b/include/esp32x_fixes.h @@ -39,12 +39,12 @@ #endif // __riscv +#if CONFIG_IDF_TARGET_ESP32C3 // fix a bug in esp-idf 4.4 for esp32c3 #ifndef REG_SPI_BASE #define REG_SPI_BASE(i) (DR_REG_SPI1_BASE + (((i)>1) ? (((i)* 0x1000) + 0x20000) : (((~(i)) & 1)* 0x1000 ))) #endif -#if CONFIG_IDF_TARGET_ESP32C3 // SPI_MOSI_DLEN_REG is not defined anymore in esp32c3, instead use SPI_MS_DLEN_REG #define SPI_MOSI_DLEN_REG(x) SPI_MS_DLEN_REG(x) //alias for different chips, deprecated for the chips after esp32s2