# Target: ESP32 (AI-Thinker ESP32-A1S, 4MB flash, 8MB PSRAM N4R8)
CONFIG_IDF_TARGET="esp32"

# Flash: 4MB DIO (A1S default)
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_ESPTOOLPY_FLASHMODE_DIO=y
CONFIG_ESPTOOLPY_FLASHFREQ_40M=y

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

# WiFi
CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=10
CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=32
CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM=32
CONFIG_ESP_WIFI_NVS_ENABLED=y
CONFIG_LWIP_LOCAL_HOSTNAME="plip"

# FreeRTOS
CONFIG_FREERTOS_HZ=1000

# Logging
CONFIG_LOG_DEFAULT_LEVEL_INFO=y
CONFIG_LOG_COLORS=y

# HTTPD
CONFIG_HTTPD_MAX_REQ_HDR_LEN=1024
CONFIG_HTTPD_MAX_URI_LEN=512

# Watchdog — allow for codec init time
CONFIG_ESP_TASK_WDT_TIMEOUT_S=15

# FreeRTOS IDLE task stack — increase from default 1536 to avoid overflow
# when I2S/WiFi interrupts spill into idle stack on original ESP32.
CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=2048

# SLIC hook GPIO — SHK on GPIO23 (A1S KEY4, active-HIGH: HIGH = off-hook)
CONFIG_PLIP_HOOK_GPIO=23
CONFIG_PLIP_HOOK_ACTIVE_HIGH=y

# WiFi credentials — set via `idf.py menuconfig` (PLIP Voice Configuration)
# or override locally in sdkconfig (NOT committed).
# CONFIG_PLIP_WIFI_SSID="..."
# CONFIG_PLIP_WIFI_PASSWORD="..."
# CONFIG_PLIP_WIFI_CHANNEL=11

# Zacus master URL — default matches the lab IP
# CONFIG_PLIP_MASTER_URL="http://192.168.0.188"

# NPC gateway (Stage 2) — override in sdkconfig (NOT committed) for local testing.
# Example: CONFIG_PLIP_GATEWAY_URL="http://192.168.0.175:8401"
#          CONFIG_PLIP_GATEWAY_TOKEN="testtoken"
# Default (Kconfig): http://192.168.0.50:8401 with empty token.

# Long file names on the SD (voice sample pack uses >8.3 names)
CONFIG_FATFS_LFN_HEAP=y
CONFIG_FATFS_MAX_LFN=255
