Skip to content

Commit

Permalink
[ESP-IDF 5.1] Fix building ESP32-S3
Browse files Browse the repository at this point in the history
  • Loading branch information
TD-er committed Oct 6, 2023
1 parent 8e0e502 commit e4a9bea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/src/Helpers/Hardware.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,17 @@
# if ESP_IDF_VERSION_MAJOR > 3 // IDF 4+
# if CONFIG_IDF_TARGET_ESP32S3 // ESP32-S3
# include <esp32s3/rom/spi_flash.h>
#if ESP_IDF_VERSION_MAJOR < 5
# include <esp32s3/spiram.h>
#endif
# include <esp32s3/rom/rtc.h>

# define HAS_HALL_EFFECT_SENSOR 0
# elif CONFIG_IDF_TARGET_ESP32S2 // ESP32-S2
# include <esp32s2/rom/spi_flash.h>
#if ESP_IDF_VERSION_MAJOR < 5
# include <esp32s2/spiram.h>
#endif
# include <esp32s2/rom/rtc.h>

# define HAS_HALL_EFFECT_SENSOR 0
Expand Down
4 changes: 4 additions & 0 deletions src/src/Helpers/Hardware_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
# if CONFIG_IDF_TARGET_ESP32
# define MAX_ADC_VALUE 4095
# else // if CONFIG_IDF_TARGET_ESP32
#if ESP_IDF_VERSION_MAJOR < 5
# define MAX_ADC_VALUE ((1 << SOC_ADC_MAX_BITWIDTH) - 1)
#else
# define MAX_ADC_VALUE ((1 << SOC_ADC_RTC_MAX_BITWIDTH) - 1)
#endif
# endif // if CONFIG_IDF_TARGET_ESP32
#endif // ifdef ESP32
#ifdef ESP8266
Expand Down

0 comments on commit e4a9bea

Please sign in to comment.