# Minimum flash size set to 16MB
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y

# Enable PSRAM
CONFIG_SPIRAM=y

# As we do not have enough internal RAM for tasks, some performance loss must be accepted.
CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y
CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY=y
CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC=y

# Use custom partition table, 4MB application.
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"

# Custom CA bundle for mbedTLS
CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC=y
CONFIG_MBEDTLS_DYNAMIC_BUFFER=y
CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA=y
CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE=y
CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH="main/assets/ssl/ca"

# 64bit formatting is not supported in Newlib-nano
CONFIG_NEWLIB_NANO_FORMAT=n

# EPD settings
CONFIG_EPD_DISPLAY_TYPE_ED047TC1=y
CONFIG_EPD_BOARD_REVISION_LILYGO_T5_47=y

# LVGL settings
CONFIG_LV_USE_LOG=y
CONFIG_LV_LOG_LEVEL_ERROR=y
CONFIG_LV_FONT_FMT_TXT_LARGE=y
CONFIG_LV_USE_FONT_COMPRESSED=y

# MbedTLS