ESPHome 2026.5.0b1
Loading...
Searching...
No Matches
psram.cpp
Go to the documentation of this file.
1
2#ifdef USE_ESP32
3#include "psram.h"
4#include <esp_idf_version.h>
5#include <esp_psram.h>
6
7#include "esphome/core/log.h"
8
9#include <esp_heap_caps.h>
10
11namespace esphome::psram {
12static const char *const TAG = "psram";
13
14void PsramComponent::dump_config() {
15 ESP_LOGCONFIG(TAG, "PSRAM:");
16 bool available = esp_psram_is_initialized();
17
18 ESP_LOGCONFIG(TAG, " Available: %s", YESNO(available));
19 if (available) {
20 ESP_LOGCONFIG(TAG, " Size: %zu KB", esp_psram_get_size() / 1024);
21#if CONFIG_SPIRAM_ECC_ENABLE
22 ESP_LOGCONFIG(TAG, " ECC enabled: YES");
23#endif
24 }
25}
26
27} // namespace esphome::psram
28
29#endif