# Velxio BLE Deployer - ESP32-S3 N16R8
# ESP-IDF v6.0
# Native USB OTG (GPIO19/20) = USB Host → Arduino
# Debug log via UART0 (USB-to-UART bridge devkit)

# FreeRTOS
CONFIG_FREERTOS_HZ=100

# NimBLE
CONFIG_BT_ENABLED=y
CONFIG_BT_NIMBLE_ENABLED=y
CONFIG_BT_NIMBLE_ROLE_PERIPHERAL=y
CONFIG_BT_NIMBLE_SVC_GAP_DEVICE_NAME="Velxio-Deployer"
CONFIG_BT_NIMBLE_MAX_CONNECTIONS=1
CONFIG_BT_NIMBLE_MAX_BONDS=1
CONFIG_BT_NIMBLE_HS_STOP_TIMEOUT_MS=5000
CONFIG_BT_NIMBLE_ATT_PREFERRED_MTU=255
CONFIG_BT_NIMBLE_MSYS_1_BLOCK_COUNT=24

# PSRAM (octal, N16R8)
CONFIG_SPIRAM=y
CONFIG_SPIRAM_MODE_OCT=y
CONFIG_SPIRAM_TYPE_AUTO=y
CONFIG_SPIRAM_USE_CAPS_ALLOC=y

# Partition Table
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"

# Compiler Optimizations
CONFIG_COMPILER_OPTIMIZATION_PERF=y

# Flash Size (16 MB untuk ESP32-S3 N16R8)
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y

# Logging
CONFIG_LOG_DEFAULT_LEVEL_INFO=y

# Serial console via UART0 (bukan USB-JTAG, karena USB native dipakai Host)
CONFIG_ESP_CONSOLE_UART_DEFAULT=y

# CherryUSB Host (native USB OTG S3)
CONFIG_CHERRYUSB=y
CONFIG_CHERRYUSB_HOST=y
# Serial drivers — enable all for max Arduino clone compatibility
CONFIG_CHERRYUSB_HOST_CDC_ACM=y
CONFIG_CHERRYUSB_HOST_CH34X=y
CONFIG_CHERRYUSB_HOST_FTDI=y
CONFIG_CHERRYUSB_HOST_CP210X=y
CONFIG_CHERRYUSB_HOST_PL2303=y
