Fix ESP32C3 compile error

Fix ESP32C3 compile error, maybe work in eps32s2 to.
This commit is contained in:
Jansen Arruda 2021-06-01 11:04:26 -03:00 committed by GitHub
parent d54afb47a9
commit a1fed60730
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -63,12 +63,16 @@
#include <sys/lock.h>
#include <sys/param.h>
#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"