From a1fed60730334e0a28673ffeee7f5de7fdf8d123 Mon Sep 17 00:00:00 2001 From: Jansen Arruda Date: Tue, 1 Jun 2021 11:04:26 -0300 Subject: [PATCH] Fix ESP32C3 compile error Fix ESP32C3 compile error, maybe work in eps32s2 to. --- lib/libesp32/LITTLEFS/src/esp_littlefs.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/libesp32/LITTLEFS/src/esp_littlefs.c b/lib/libesp32/LITTLEFS/src/esp_littlefs.c index 2b0c2e4cf..edcc2b360 100755 --- a/lib/libesp32/LITTLEFS/src/esp_littlefs.c +++ b/lib/libesp32/LITTLEFS/src/esp_littlefs.c @@ -63,12 +63,16 @@ #include #include -#if __has_include("esp32/rom/spi_flash.h") +#if CONFIG_IDF_TARGET_ESP32C3 +#include "esp32c3/rom/spi_flash.h" +#elif CONFIG_IDF_TARGET_ESP32S2 +#include "esp32s2/rom/spi_flash.h" +#elif __has_include("esp32/rom/spi_flash.h") //#warning("LITTLEFS: IDF 4, spi_flash.h file location different from IDF 3") -#include "esp32/rom/spi_flash.h" +#include "esp32/rom/spi_flash.h" //IDF 4 #else //#warning("LITTLEFS: IDF 3") -#include "rom/spi_flash.h" +#include "rom/spi_flash.h" //IDF 3 #endif #include "esp_system.h"