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

CONFIG_MAIN_STACK_SIZE=4096

###################################################################
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_IMG_MANAGER=y
CONFIG_MCUBOOT_IMG_MANAGER=y

#CONFIG_PM_EXTERNAL_FLASH=y
#CONFIG_PM_EXTERNAL_FLASH_DEV_NAME="W25Q80DV"
#CONFIG_PM_EXTERNAL_FLASH_BASE=0x0
#CONFIG_PM_EXTERNAL_FLASH_SIZE=0x100000

CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y
CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y
#CONFIG_PM_PARTITION_SIZE_MCUBOOT_SECONDARY=0x50000

# Enable flash operations.
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_FLASH_PAGE_LAYOUT=y

CONFIG_SIZE_OPTIMIZATIONS=n

# SPI Flash
#CONFIG_NORDIC_QSPI_NOR=y
#CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
#CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16

###################################################################
#
CONFIG_NCS_SAMPLES_DEFAULTS=y

CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="HALO"
#CONFIG_BT_PER_ADV=y
CONFIG_BT_CTLR_ADV_DATA_LEN_MAX=255
CONFIG_BT_DEBUG_LOG=y

CONFIG_BT_RX_STACK_SIZE=2048

CONFIG_BT_SMP=y
CONFIG_BT_FIXED_PASSKEY=n
CONFIG_BT_SETTINGS=y

CONFIG_NVS=y
#CONFIG_SETTINGS=y
CONFIG_BT_EXT_ADV=y
CONFIG_BT_USER_PHY_UPDATE=y
CONFIG_BT_EXT_ADV_MAX_ADV_SET=2

## Coded PHY
CONFIG_BT_CTLR_PHY_CODED=y

## Power control
##CONFIG_BT_HRS=y
##CONFIG_BT_DEVICE_APPEARANCE=833
##CONFIG_BT_CTLR_ADVANCED_FEATURES=y
CONFIG_BT_CTLR_CONN_RSSI=y
CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y

## NUS service
CONFIG_BT_NUS=y
#CONFIG_BT_L2CAP_TX_MTU=75
CONFIG_BT_L2CAP_TX_MTU=300
CONFIG_BT_GATT_CLIENT=y
CONFIG_BT_GATT_DM=y
CONFIG_BT_MAX_CONN=2
#CONFIG_BT_BUF_ACL_RX_SIZE=79
CONFIG_BT_BUF_ACL_RX_SIZE=300
CONFIG_BT_BUF_ACL_TX_SIZE=300
#CONFIG_BT_CTLR_DATA_LENGTH_MAX=270

CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_I2C=y
##CONFIG_I2C_NRFX=y
#CONFIG_SENSOR=y

## Debugging
CONFIG_DEBUG_OPTIMIZATIONS=y
CONFIG_DEBUG_THREAD_INFO=y

## Power management
CONFIG_PM=y
CONFIG_PM_DEVICE=y

CONFIG_PWM=y

CONFIG_NRFX_GPIOTE=y
CONFIG_COMPILER_OPT="-DGPIOTE_IRQn=GPIOTE1_IRQn -DNRFX_TIMER_ENABLED=1 -DNRFX_GPIOTE_ENABLED=1 -DNRFX_TIMER0_ENABLED=1"

## ADC
##CONFIG_ADC=y
##CONFIG_ADC_ASYNC=y
##CONFIG_ADC_NRFX_SAADC=y
##CONFIG_FPU=y

## NFC
CONFIG_NFC_T2T_NRFXLIB=y
CONFIG_NFC_NDEF=y
CONFIG_NFC_NDEF_MSG=y
CONFIG_NFC_NDEF_RECORD=y
CONFIG_NFC_NDEF_TEXT_RECORD=y
CONFIG_NFC_NDEF_URI_REC=y
CONFIG_NFC_NDEF_LAUNCHAPP_MSG=y

## SPI
CONFIG_SPI=y
CONFIG_SPI_NOR=y
#CONFIG_FLASH=y
#CONFIG_FLASH_PAGE_LAYOUT=y
#CONFIG_FLASH_MAP=y

CONFIG_NRFX_TIMER2=y
CONFIG_NRFX_TIMER1=y

## PPI
CONFIG_NRFX_PPI=y

CONFIG_FPU=y
