
#
# Copyright (c) 2018 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# BT
CONFIG_BT=y
CONFIG_BT_ATT_PREPARE_COUNT=2
CONFIG_BT_BONDABLE=n
CONFIG_BT_BUF_ACL_RX_SIZE=251
CONFIG_BT_BUF_ACL_TX_COUNT=10
CONFIG_BT_BUF_ACL_TX_SIZE=251
CONFIG_BT_DEVICE_NAME="Zephyr Bluetooth device"
CONFIG_BT_GATT_AUTO_SEC_REQ=y
CONFIG_BT_L2CAP_TX_MTU=247
CONFIG_BT_MAX_CONN=1
CONFIG_BT_MAX_PAIRED=1
CONFIG_BT_NUS=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_SMP=y
CONFIG_BT_USER_DATA_LEN_UPDATE=y
CONFIG_BT_USER_PHY_UPDATE=y

# console
CONFIG_CONSOLE=n
CONFIG_UART_CONSOLE=n

# debug
CONFIG_DEBUG=n

# flash
CONFIG_FLASH=y
CONFIG_FLASH_JESD216_API=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_SOC_FLASH_NRF=y

# GPIO
CONFIG_GPIO=y
CONFIG_NFCT_PINS_AS_GPIOS=y
CONFIG_NRFX_GPIOTE=y
CONFIG_NRFX_GPIOTE_NUM_OF_EVT_HANDLERS=2

# heap
CONFIG_HEAP_MEM_POOL_SIZE=1024

# I2C
CONFIG_I2C=y
CONFIG_I2C_NRFX=y

#  libc 
CONFIG_NEWLIB_LIBC=y

# logging
#CONFIG_BT_LOG_SNIFFER_INFO=y
CONFIG_LOG=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_UART=n
CONFIG_LOG_DEFAULT_LEVEL=3
CONFIG_LOG_MODE_DEFERRED=y
CONFIG_NVS_LOG_LEVEL_INF=y
CONFIG_PRINTK=y
CONFIG_USE_SEGGER_RTT=y

# MCUboot
CONFIG_BOOTLOADER_MCUBOOT=y

# MCUmgr
CONFIG_MCUMGR=y
CONFIG_IMG_MANAGER=y
CONFIG_MCUMGR_GRP_FS=y
CONFIG_MCUMGR_GRP_IMG=y
CONFIG_MCUMGR_GRP_OS=y
CONFIG_MCUMGR_GRP_STAT=y
CONFIG_MCUMGR_GRP_ZBASIC=y
CONFIG_MCUMGR_GRP_ZBASIC_STORAGE_ERASE=y
CONFIG_MCUMGR_TRANSPORT_BT=y
CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN=n
CONFIG_MCUMGR_TRANSPORT_BT_CONN_PARAM_CONTROL=y
CONFIG_MCUMGR_TRANSPORT_BT_REASSEMBLY=y
CONFIG_MCUMGR_TRANSPORT_NETBUF_SIZE=2475
CONFIG_MCUMGR_GRP_OS_MCUMGR_PARAMS=y
CONFIG_MCUMGR_TRANSPORT_WORKQUEUE_STACK_SIZE=4608
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y

# NOR
CONFIG_NORDIC_QSPI_NOR=y
CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16
CONFIG_NRFX_QSPI=y

# NVS
CONFIG_NVS=y

# power saving
CONFIG_PM=y

# SPI
CONFIG_SPI=y
CONFIG_SPI_NOR=n

# stack
CONFIG_MAIN_STACK_SIZE=8192
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096

# thread
CONFIG_THREAD_NAME=y
