# ====================================================================
# 1. CORE STORAGE & SETTINGS SUBSYSTEM
# ====================================================================
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_FCB=y
CONFIG_SETTINGS=y
CONFIG_SETTINGS_FCB=y
CONFIG_NORDIC_QSPI_NOR=n
CONFIG_SPI_NOR=n

# ====================================================================
# 2. BLUETOOTH LE
# ====================================================================
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_ZEPHYR_NUS=n
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
CONFIG_BT_DEVICE_NAME_MAX=30
CONFIG_BT_GATT_CLIENT=y

# High-throughput adjustments
CONFIG_BT_BUF_ACL_RX_SIZE=251
CONFIG_BT_BUF_ACL_TX_SIZE=251
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
CONFIG_BT_L2CAP_TX_MTU=247

# ====================================================================
# 3. MCUMGR - UART TRANSPORT (REMOVE BT)
# ====================================================================
CONFIG_MCUMGR=y
CONFIG_MCUMGR_GRP_OS=y
CONFIG_MCUMGR_GRP_IMG=y
CONFIG_MCUMGR_TRANSPORT_UART=y
CONFIG_MCUMGR_MGMT_NOTIFICATION_HOOKS=y

# Dependencies for MCUMGR
CONFIG_NET_BUF=y
CONFIG_ZCBOR=y
CONFIG_CRC=y
CONFIG_IMG_MANAGER=y
CONFIG_STREAM_FLASH=y
CONFIG_BASE64=y

# REMOVE THESE - NOT NEEDED FOR UART OTA
# CONFIG_MCUMGR_TRANSPORT_BT=y
# CONFIG_BT_SMP=y
# CONFIG_MCUBOOT_IMG_MANAGER=y
# CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y

# ====================================================================
# 4. HARDWARE, PERIPHERALS & POWER
# ====================================================================
CONFIG_DK_LIBRARY=y
CONFIG_LORA=y
CONFIG_PRINTK=y
CONFIG_LORA_LOG_LEVEL_DBG=n

# UART Configuration
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_ASYNC_API=y
CONFIG_UART_21_INTERRUPT_DRIVEN=n
CONFIG_UART_21_ASYNC=y
CONFIG_UART_30_INTERRUPT_DRIVEN=n
CONFIG_UART_30_ASYNC=y
CONFIG_NRF_SYS_EVENT=y
CONFIG_UART_CONSOLE=y
CONFIG_CONSOLE=y
CONFIG_LOG=y
CONFIG_ADC=y

# Power Management
CONFIG_PM=y
CONFIG_POWEROFF=y
CONFIG_PM_DEVICE=y
CONFIG_PM_DEVICE_SYSTEM_MANAGED=y
CONFIG_REBOOT=y
CONFIG_GPIO=y
CONFIG_GPIO_NRFX=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y

# MCUMGR Logs
CONFIG_MCUMGR_LOG_LEVEL_DBG=y
CONFIG_MCUMGR_TRANSPORT_LOG_LEVEL_DBG=y
CONFIG_IMG_MANAGER_LOG_LEVEL_DBG=y