ESPHome 2025.9.0-dev
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 {
12namespace psram {
13static const char *const TAG = "psram";
14
15void PsramComponent::dump_config() {
16 ESP_LOGCONFIG(TAG, "PSRAM:");
17 bool available = esp_psram_is_initialized();
18
19 ESP_LOGCONFIG(TAG, " Available: %s", YESNO(available));
20 if (available) {
21 ESP_LOGCONFIG(TAG, " Size: %zu KB", esp_psram_get_size() / 1024);
22#if CONFIG_SPIRAM_ECC_ENABLE
23 ESP_LOGCONFIG(TAG, " ECC enabled: YES");
24#endif
25 }
26}
27
28} // namespace psram
29} // namespace esphome
30
31#endif
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7