Fix psram below idf 5 (#8584)

This commit is contained in:
Jesse Hills 2025-04-17 17:04:43 +12:00 committed by GitHub
parent 31ed1eb6f0
commit e5b7e3039a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,7 +1,8 @@
#ifdef USE_ESP32
#include "psram.h"
#ifdef USE_ESP_IDF
#include <esp_idf_version.h>
#if defined(USE_ESP_IDF) && ESP_IDF_VERSION_MAJOR >= 5
#include <esp_psram.h>
#endif // USE_ESP_IDF
@ -15,7 +16,7 @@ static const char *const TAG = "psram";
void PsramComponent::dump_config() {
ESP_LOGCONFIG(TAG, "PSRAM:");
#ifdef USE_ESP_IDF
#if defined(USE_ESP_IDF) && ESP_IDF_VERSION_MAJOR >= 5
bool available = esp_psram_is_initialized();
ESP_LOGCONFIG(TAG, " Available: %s", YESNO(available));