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

# Enable the UART driver
CONFIG_UART_ASYNC_API=y
CONFIG_NRFX_UARTE0=y
CONFIG_SERIAL=y

CONFIG_GPIO=y

# Make sure printk is printing to the UART console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

CONFIG_HEAP_MEM_POOL_SIZE=2048

CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="peripheral_uart"
CONFIG_BT_MAX_CONN=1
CONFIG_BT_MAX_PAIRED=1

# Enable the NUS service
CONFIG_BT_NUS=y

# Enable bonding
CONFIG_BT_SETTINGS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y

# Enable DK LED and Buttons library
CONFIG_DK_LIBRARY=y

CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

# Config logger
CONFIG_LOG=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_UART=y
CONFIG_LOG_PRINTK=y

CONFIG_ASSERT=y


CONFIG_BT_BUF_ACL_RX_SIZE=502
CONFIG_BT_ATT_PREPARE_COUNT=2
CONFIG_BT_ATT_TX_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


#FEM EKEK
# CONFIG_MPSL_FEM=y
# CONFIG_MPSL=y
# CONFIG_MPSL_FEM_NRF21540_GPIO=y
# # CONFIG_MPSL_FEM_NRF21540_GPIO_SPI=y EK用不上
# CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y
# CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB=20
# CONFIG_MPSL_FEM_NRF21540_RX_GAIN_DB=13
# CONFIG_BT_CTLR_TX_PWR_ANTENNA=20

# #FEM general
# CONFIG_MPSL_FEM=y
# CONFIG_MPSL=y
# CONFIG_MPSL_FEM_NRF21540_GPIO=y
# CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y
# CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB=20
# CONFIG_MPSL_FEM_NRF21540_RX_GAIN_DB=13
# CONFIG_MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL=y
CONFIG_BT_CTLR_TX_PWR_ANTENNA=8
# CONFIG_NFCT_PINS_AS_GPIOS=y

