fix psram check

This commit is contained in:
technyon
2024-12-21 08:33:46 +01:00
parent dc43b45f33
commit 02c3b58761
4 changed files with 3 additions and 28 deletions

View File

@@ -1,12 +0,0 @@
#include "esp_psram.h"
#include "esp32-hal.h"
#include "PSRAM.h"
const bool PSRAM::found(void)
{
#if CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C6 || DISABLE_PSRAMCHECK || CORE32SOLO1
return psramFound();
#else
return psramFound() && esp_psram_is_initialized();
#endif
}

View File

@@ -1,11 +0,0 @@
#pragma once
class PSRAM
{
public:
// this function is a replacement for `psramFound()`.
// `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
static const bool found(void);
};