CONFIG_IDF_TARGET="esp32c6"

# Arduino Settings
CONFIG_FREERTOS_HZ=1000
CONFIG_AUTOSTART_ARDUINO=y

# Log Levels
# Boot Messages - Log level
CONFIG_BOOTLOADER_LOG_LEVEL_ERROR=y
# Arduino Log Level
CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_INFO=y
# IDF Log Level
CONFIG_LOG_DEFAULT_LEVEL_ERROR=y

# Default to 921600 baud when flashing and monitoring device
CONFIG_ESPTOOLPY_BAUD_921600B=y
CONFIG_ESPTOOLPY_BAUD=921600
CONFIG_ESPTOOLPY_COMPRESSED=y
CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y
CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y

#enable BT
CONFIG_BT_ENABLED=y
CONFIG_BT_NIMBLE_ENABLED=y

#disable BT connection reattempt
CONFIG_BT_NIMBLE_ENABLE_CONN_REATTEMPT=n

# NIMBLE
CONFIG_BT_NIMBLE_EXT_ADV=n
CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70
CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING=y

#enable lwip ipv6 autoconfig
CONFIG_LWIP_IPV6_AUTOCONFIG=y

# Use a custom partition table
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_OFFSET=0xC000

# Disable chip shell
CONFIG_ENABLE_CHIP_SHELL=n

# Enable OTA Requester
CONFIG_ENABLE_OTA_REQUESTOR=n

#enable lwIP route hooks
CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT=y
CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT=y

# disable softap by default
CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n
CONFIG_ENABLE_WIFI_STATION=y
CONFIG_ENABLE_WIFI_AP=n

# Disable DS Peripheral
CONFIG_ESP_SECURE_CERT_DS_PERIPHERAL=n

# Use compact attribute storage mode
CONFIG_ESP_MATTER_NVS_USE_COMPACT_ATTR_STORAGE=y

# Enable HKDF in mbedtls
CONFIG_MBEDTLS_HKDF_C=y

# Increase LwIP IPv6 address number to 6 (MAX_FABRIC + 1)
# unique local addresses for fabrics(MAX_FABRIC), a link local address(1)
CONFIG_LWIP_IPV6_NUM_ADDRESSES=6

# libsodium
CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y

# FreeRTOS should use legacy API
CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y

# Use minimal mDNS
CONFIG_USE_MINIMAL_MDNS=y
CONFIG_ENABLE_EXTENDED_DISCOVERY=y

# ESP32-C6-DevKit Settings
# Buttons
CONFIG_BUTTON_PIN=9
# LEDs
CONFIG_WS2812_PIN=8
# max GPIO
CONFIG_ENV_GPIO_RANGE_MIN=0
CONFIG_ENV_GPIO_RANGE_MAX=30
CONFIG_ENV_GPIO_IN_RANGE_MAX=30
CONFIG_ENV_GPIO_OUT_RANGE_MAX=30
