# Target: ESP32-S3
CONFIG_IDF_TARGET="esp32s3"

# Flash: 16MB
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y

# Partition table
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"

# PSRAM: Octal 8MB
CONFIG_ESP32S3_SPIRAM_SUPPORT=y
CONFIG_SPIRAM_MODE_OCT=y
CONFIG_SPIRAM_SPEED_80M=y
CONFIG_SPIRAM_BOOT_INIT=y
CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY=y

# ESP-SR: WakeNet + MultiNet
CONFIG_ESP_SR_WAKENET_ENABLE=y
CONFIG_ESP_SR_WAKENET9_HIESP=y
CONFIG_ESP_SR_MULTINET_ENABLE=y

# WiFi
CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=16
CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=64
CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM=64

# FreeRTOS
CONFIG_FREERTOS_HZ=1000
CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=4096

# Logging
CONFIG_LOG_DEFAULT_LEVEL_INFO=y

# Watchdog: extend for model loading
CONFIG_ESP_TASK_WDT_TIMEOUT_S=30

# Enable HTTPS / TLS for voice bridge
CONFIG_ESP_TLS_USING_MBEDTLS=y
CONFIG_MBEDTLS_DYNAMIC_BUFFER=y

# Heap: place large buffers in PSRAM
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=32768

# WiFi credentials — set via `idf.py menuconfig` (Zacus BOX-3 Voice
# Configuration) or via a local sdkconfig override that is NOT committed.
# Defaults stay empty so credentials never land in git.
# CONFIG_ZACUS_WIFI_SSID="..."
# CONFIG_ZACUS_WIFI_PASSWORD="..."

# WiFi channel: must match the master ESP32's connected channel for ESP-NOW
# co-channel operation. The master (idf_zacus) connects to channel 11 on the
# lab multi-AP "Les cils" network. Set to 0 to scan all channels and connect
# to whichever AP responds first (may differ from master → ESP-NOW will break).
# CONFIG_ZACUS_WIFI_CHANNEL=11

# esp-box BSP uses the legacy i2c driver; esp_codec_dev uses driver_ng.
# Force-enable legacy mode so both coexist (and prevent the runtime abort
# in bsp_display_start when both drivers race to register on the same bus).
CONFIG_I2C_ENABLE_LEGACY_DRIVERS=y

# PLIP phone UI fonts (plip_ui.c)
CONFIG_LV_FONT_MONTSERRAT_24=y
CONFIG_LV_FONT_MONTSERRAT_48=y

# Stimulus generator (QR display for the master camera, melody for its mic)
CONFIG_LV_USE_QRCODE=y
