Fix PSRAM compilation for Esp32c3

This commit is contained in:
Stephan Hadinger 2021-09-02 20:54:50 +02:00
parent c044fd22c4
commit 19d313622a
1 changed files with 4 additions and 0 deletions

View File

@ -472,7 +472,11 @@ extern "C" {
// `psramFound()` can return true even if no PSRAM is actually installed
// This new version also checks `esp_spiram_is_initialized` to know if the PSRAM is initialized
bool FoundPSRAM(void) {
#if CONFIG_IDF_TARGET_ESP32C3
return psramFound();
#else
return psramFound() && esp_spiram_is_initialized();
#endif
}
// new function to check whether PSRAM is present and supported (i.e. required pacthes are present)