CONFIG_IDF_TARGET="esp32s3"
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
CONFIG_LWIP_MAX_SOCKETS=32
CONFIG_PM_ENABLE=y
CONFIG_FREERTOS_USE_TICKLESS_IDLE=y

# W5500 Ethernet Configuration
CONFIG_ETH_USE_SPI_ETHERNET=y
CONFIG_ETH_SPI_ETHERNET_W5500=y
CONFIG_ETHERNET_SPI_USE_W5500=1
CONFIG_ETHERNET_SPI_DEV0_W5500=y
CONFIG_ETHERNET_SPI_DEV0_ID=2
CONFIG_ETHERNET_SPI_HOST=1
CONFIG_ETHERNET_SPI_SCLK_GPIO=13
CONFIG_ETHERNET_SPI_MOSI_GPIO=11
CONFIG_ETHERNET_SPI_MISO_GPIO=12
CONFIG_ETHERNET_SPI_CLOCK_MHZ=32
CONFIG_ETHERNET_SPI_CS0_GPIO=14
CONFIG_ETHERNET_SPI_INT0_GPIO=10
CONFIG_ETHERNET_SPI_PHY_RST0_GPIO=9
CONFIG_ETHERNET_SPI_PHY_ADDR0=1
CONFIG_ETHERNET_SPI_AUTOCONFIG_MAC_ADDR0=y
CONFIG_ETHERNET_SPI_POLLING0_MS=0

# Enable PSRAM
CONFIG_SPIRAM=y
CONFIG_SPIRAM_MODE_OCT=y
CONFIG_SPIRAM_SPEED_80M=y
CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y
CONFIG_SPIRAM_RODATA=y

# LVGL Configuration
CONFIG_LV_COLOR_DEPTH_8=y
CONFIG_LV_USE_SYSMON=n
CONFIG_LV_USE_OBJ_NAME=y

# LVGL Memory Allocator (Use ESP-IDF Heap instead of internal 64kB BSS pool!)
CONFIG_LV_USE_BUILTIN_MALLOC=n
CONFIG_LV_USE_CLIB_MALLOC=y
CONFIG_LV_USE_BUILTIN_STRING=n
CONFIG_LV_USE_CLIB_STRING=y
CONFIG_LV_USE_BUILTIN_SPRINTF=n
CONFIG_LV_USE_CLIB_SPRINTF=y

# LVGL Headless / Optimization Configurations
# Disable default examples and demos that waste flash
CONFIG_LV_BUILD_EXAMPLES=n
CONFIG_LV_BUILD_DEMOS=n

# Disable unused software drawing color formats (Only L8 and A8 matter for grayscale)
CONFIG_LV_DRAW_SW_SUPPORT_RGB565=n
CONFIG_LV_DRAW_SW_SUPPORT_RGB565A8=n
CONFIG_LV_DRAW_SW_SUPPORT_RGB888=n
CONFIG_LV_DRAW_SW_SUPPORT_XRGB8888=n
CONFIG_LV_DRAW_SW_SUPPORT_ARGB8888=n
CONFIG_LV_DRAW_SW_SUPPORT_ARGB8888_PREMULTIPLIED=n
CONFIG_LV_DRAW_SW_SUPPORT_L8=y
CONFIG_LV_DRAW_SW_SUPPORT_AL88=n
CONFIG_LV_DRAW_SW_SUPPORT_A8=y
CONFIG_LV_DRAW_SW_SUPPORT_I1=n

# Disable complex drawing features to save memory (no shadows, no complex gradients)
CONFIG_LV_DRAW_SW_COMPLEX=n

# Disable unneeded widgets for a simple static screen generator
CONFIG_LV_USE_CHART=n
CONFIG_LV_USE_WIN=n
CONFIG_LV_USE_TABVIEW=n
CONFIG_LV_USE_TILEVIEW=n
CONFIG_LV_USE_LIST=n
CONFIG_LV_USE_MENU=n
CONFIG_LV_USE_MSGBOX=n
CONFIG_LV_USE_SPINBOX=n
CONFIG_LV_USE_SPINNER=n
CONFIG_LV_USE_KEYBOARD=n
CONFIG_LV_USE_CALENDAR=n
CONFIG_LV_USE_CHECKBOX=y
CONFIG_LV_USE_DROPDOWN=n
CONFIG_LV_USE_IMAGEBUTTON=n
CONFIG_LV_USE_ROLLER=n
CONFIG_LV_USE_SCALE=n
CONFIG_LV_USE_SLIDER=n
CONFIG_LV_USE_SWITCH=y
CONFIG_LV_USE_TEXTAREA=n
CONFIG_LV_USE_TABLE=n

# Disable animations to save code and RAM
CONFIG_LV_USE_ANIMIMG=n

# Disable theme transitions (we just want static renders)
CONFIG_LV_THEME_DEFAULT_TRANSITION_TIME=0

# Disable data observer patterns (unused in static render flow)
CONFIG_LV_USE_OBSERVER=n

# Enable XML runtime for dynamic screen layouts (LVGL 9.4+)
CONFIG_LV_USE_XML=y
CONFIG_LV_USE_OBSERVER=y
