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

# Enable Some Sample Default Configs
#CONFIG_NCS_SAMPLES_DEFAULTS=y

# Enable GPIO
CONFIG_GPIO=y

# Enable DFU/OTA
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y
CONFIG_FPROTECT=y
# CONFIG_MCUBOOT_BUILD_STRATEGY_FROM_SOURCE=n
# CONFIG_BOOT_SIGNATURE_KEY_FILE="C:\nordic\myapps\RES-BPB\priv.pem"



CONFIG_BT=y
CONFIG_BT_EXT_ADV=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="AnyXXXX"

# Enable Dynamic name modification
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
# Maximum chcaracter of the device name
# (Range: 2 to 248)
CONFIG_BT_DEVICE_NAME_MAX=30


# Enable Device Information Service (DIS)
CONFIG_BT_DIS=y
CONFIG_BT_DIS_MANUF="RTL"
CONFIG_BT_DIS_MODEL="CAB"
CONFIG_BT_DIS_HW_REV=y
CONFIG_BT_DIS_HW_REV_STR="1.0.1"
CONFIG_BT_DIS_SW_REV=y
CONFIG_BT_DIS_SW_REV_STR="Bootloader: 1.0.1, SoftDevice: 6.1.0, Application: 2.0.12"
CONFIG_BT_DIS_PNP=n

# Enable Battery Service (BAS)
CONFIG_BT_BAS=y

# Enable ADC for battery measurement
CONFIG_ADC=y

# Increase stack size for the main thread and System Workqueue
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
#CONFIG_MAIN_STACK_SIZE=2048


# Enable PWM
CONFIG_LED=y
CONFIG_PWM=y
CONFIG_LED_PWM=y
CONFIG_TIMER=y

# Enable Debugging Tools
# CONFIG_DEBUG_THREAD_INFO=y
# CONFIG_DEBUG_OPTIMIZATIONS=y

# Enable Crypto Functionality
# The Zephyr CMSIS emulation assumes that ticks are ms, currently
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000

CONFIG_MAIN_STACK_SIZE=2048
CONFIG_HEAP_MEM_POOL_SIZE=1024

# Enable logging
# CONFIG_LOG=y

# Enable nordic security backend and PSA APIs
CONFIG_NRF_SECURITY=y
CONFIG_MBEDTLS_PSA_CRYPTO_C=y

CONFIG_MBEDTLS_ENABLE_HEAP=y
CONFIG_MBEDTLS_HEAP_SIZE=2048

CONFIG_PSA_WANT_ALG_ECDSA=y
CONFIG_PSA_WANT_KEY_TYPE_ECC_KEY_PAIR=y
CONFIG_PSA_WANT_ECC_SECP_R1_384=y
CONFIG_PSA_WANT_ALG_SHA_384=y

# # For key generation
CONFIG_PSA_WANT_GENERATE_RANDOM=y


# CONFIGS to reduce Memory usage
CONFIG_BT_DEBUG_NONE=y
CONFIG_BT_ASSERT=n
CONFIG_BT_PHY_UPDATE=n

# BLE TX BUF
CONFIG_BT_BUF_ACL_TX_COUNT=10
CONFIG_BT_BUF_ACL_TX_SIZE=251
CONFIG_BT_L2CAP_TX_BUF_COUNT=10
CONFIG_BT_L2CAP_TX_MTU=247
CONFIG_BT_GATT_CLIENT=y
CONFIG_BT_DATA_LEN_UPDATE=y


