mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 21:44:55 +01:00
Update PSRAM config params for IDF4+ (#5298)
This commit is contained in:
parent
b20bae23cc
commit
c4adb30ab2
1 changed files with 6 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
import esphome.codegen as cg
|
||||
import esphome.config_validation as cv
|
||||
from esphome.components.esp32 import add_idf_sdkconfig_option
|
||||
from esphome.components.esp32 import add_idf_sdkconfig_option, get_esp32_variant
|
||||
from esphome.core import CORE
|
||||
from esphome.const import (
|
||||
CONF_ID,
|
||||
|
@ -21,7 +21,11 @@ async def to_code(config):
|
|||
cg.add_build_flag("-DBOARD_HAS_PSRAM")
|
||||
|
||||
if CORE.using_esp_idf:
|
||||
add_idf_sdkconfig_option("CONFIG_ESP32_SPIRAM_SUPPORT", True)
|
||||
add_idf_sdkconfig_option(
|
||||
f"CONFIG_{get_esp32_variant().upper()}_SPIRAM_SUPPORT", True
|
||||
)
|
||||
add_idf_sdkconfig_option("CONFIG_SPIRAM", True)
|
||||
add_idf_sdkconfig_option("CONFIG_SPIRAM_USE", True)
|
||||
add_idf_sdkconfig_option("CONFIG_SPIRAM_USE_CAPS_ALLOC", True)
|
||||
add_idf_sdkconfig_option("CONFIG_SPIRAM_IGNORE_NOTFOUND", True)
|
||||
|
||||
|
|
Loading…
Reference in a new issue