# Enable mcuboot
CONFIG_BOOTLOADER_MCUBOOT=y

# Enable SMP server and its dependencies
CONFIG_MCUMGR=y
##CONFIG_MCUMGR_GRP_IMG=y
CONFIG_FLASH=y
##CONFIG_IMG_MANAGER=y
##CONFIG_STREAM_FLASH=y
CONFIG_NET_BUF=y
CONFIG_ZCBOR=y
##CONFIG_FLASH_MAP=y

# Enable BLE features
CONFIG_BT=y
CONFIG_BT_DEVICE_NAME="Custom Dev"
#CONFIG_BT_SMP=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_CENTRAL=y

# BLE OTA/DFU options
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y
CONFIG_MCUBOOT_USE_ALL_AVAILABLE_RAM=y
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU_SPEEDUP=y
CONFIG_NRF53_UPGRADE_NETWORK_CORE=y
CONFIG_UPDATEABLE_IMAGE_NUMBER=2
CONFIG_ADD_MCUBOOT_MEDIATE_SIM_FLASH_DTS=y

# Other BLE options
CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_MAX_CONN=2

CONFIG_BT_SCAN=y
CONFIG_BT_SCAN_FILTER_ENABLE=y
CONFIG_BT_SCAN_UUID_CNT=1

CONFIG_BT_GATT_CLIENT=y
CONFIG_BT_THROUGHPUT=y

CONFIG_BT_GATT_DM=y

CONFIG_BT_USER_DATA_LEN_UPDATE=y
CONFIG_BT_USER_PHY_UPDATE=y
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n

CONFIG_BT_BUF_ACL_RX_SIZE=502
CONFIG_BT_ATT_PREPARE_COUNT=2
CONFIG_BT_L2CAP_TX_BUF_COUNT=10
CONFIG_BT_L2CAP_TX_MTU=498
CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
CONFIG_BT_CONN_TX_MAX=10
CONFIG_BT_BUF_ACL_TX_COUNT=10
CONFIG_BT_BUF_ACL_TX_SIZE=502

CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
CONFIG_BT_CTLR_PHY_2M=y
CONFIG_BT_CTLR_RX_BUFFERS=2
CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT=4000000

CONFIG_HEAP_MEM_POOL_SIZE=4096

CONFIG_MCUMGR_CMD_IMG_MGMT=y
CONFIG_MCUMGR_CMD_OS_MGMT=y
CONFIG_BT_L2CAP_TX_MTU=252
CONFIG_BT_BUF_ACL_RX_SIZE=256
CONFIG_MCUMGR_SMP_BT=y
CONFIG_MCUMGR_SMP_BT_AUTHEN=n
#CONFIG_BT_CTLR_ADV_EXT=y
#CONFIG_BT_EXT_ADV=y

CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096

CONFIG_NFCT_PINS_AS_GPIOS=y

CONFIG_NCS_SAMPLES_DEFAULTS=y

CONFIG_SHELL=y

CONFIG_PINCTRL=y
CONFIG_PINCTRL_DYNAMIC=y
# configure serial and console to come after remap hook
CONFIG_SERIAL_INIT_PRIORITY=60
CONFIG_CONSOLE_INIT_PRIORITY=70

# Enable CAF_BUTTONS
CONFIG_CAF=y
CONFIG_CAF_BUTTONS=y
CONFIG_CAF_BUTTONS_POLARITY_INVERSED=y

# Dependencies for CAF_LEDS
CONFIG_LED=y
CONFIG_PWM=y
CONFIG_LED_PWM=y

# Enable CAF_LEDS
CONFIG_CAF_LEDS=y
CONFIG_CAF_LEDS_PWM=y

# Enable logging
CONFIG_LOG=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_PRINTK=y
CONFIG_LOG_PRINTK=y
CONFIG_LOG_MODE_DEFERRED=y

CONFIG_LOG_BACKEND_FS=y
CONFIG_LOG_BACKEND_FS_FILE_SIZE=4096
CONFIG_LOG_BACKEND_FS_FILES_LIMIT=4

CONFIG_FILE_SYSTEM=y
CONFIG_FILE_SYSTEM_LITTLEFS=y
CONFIG_PM_PARTITION_REGION_LITTLEFS_EXTERNAL=y
CONFIG_FS_LOG_LEVEL_OFF=y

# fs_dirent structures are big.
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=4096

# Need this when storage is on flash
CONFIG_MPU_ALLOW_FLASH_WRITE=y

# Need this when storage is on MX25R64
CONFIG_NORDIC_QSPI_NOR=y
CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096

CONFIG_SHELL=y
CONFIG_FILE_SYSTEM_SHELL=y

CONFIG_BT_NUS=y
CONFIG_SHELL_BT_NUS=y
CONFIG_SHELL_BT_NUS_LOG_LEVEL_DBG=y

CONFIG_NRF_SW_LPUART=y
CONFIG_UART_1_ASYNC=y
CONFIG_UART_1_INTERRUPT_DRIVEN=n
CONFIG_UART_1_NRF_HW_ASYNC=y
CONFIG_UART_1_NRF_HW_ASYNC_TIMER=2
CONFIG_UART_1_NRF_ASYNC_LOW_POWER=y
CONFIG_NRFX_TIMER2=y
CONFIG_NRF_SW_LPUART_INT_DRIVEN=y

CONFIG_ADC=y
CONFIG_SENSOR=y
