Merge pull request #13045 from s-hadinger/psramfix

Fix PSRAM compilation for Esp32c3
This commit is contained in:
Jason2866 2021-09-02 21:05:24 +02:00 committed by GitHub
commit 86205d0c29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)