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

# This sample uses Kconfig.defaults to set options common for all
# samples. This file should contain only options specific for this sample
# or overrides of default values.

# Enable CHIP
CONFIG_CHIP=y
CONFIG_CHIP_PROJECT_CONFIG="src/chip_project_config.h"
# 32774 == 0x8006 (example lock-app)
CONFIG_CHIP_DEVICE_PRODUCT_ID=32774
CONFIG_STD_CPP17=y

# Enable Matter extended announcement and increase duration to 1 hour.
CONFIG_CHIP_BLE_EXT_ADVERTISING=y
CONFIG_CHIP_BLE_ADVERTISING_DURATION=60

# Add support for LEDs and buttons on Nordic development kits
CONFIG_DK_LIBRARY=y

# Bluetooth Low Energy configuration
CONFIG_BT_DEVICE_NAME="MatterLock"

# Other settings
CONFIG_MPU_STACK_GUARD=y
CONFIG_RESET_ON_FATAL_ERROR=n

# Enable switching between Thread and Wi-Fi variants
CONFIG_THREAD_WIFI_SWITCHING=y
CONFIG_THREAD_WIFI_SWITCHING_SHELL=y
CONFIG_CHIP_WIFI=y
CONFIG_NET_L2_OPENTHREAD=y
CONFIG_CHIP_FACTORY_RESET_ERASE_SETTINGS=n # Do not restore initial transport on factory reset

# Reduce application size
CONFIG_USE_SEGGER_RTT=n
CONFIG_WIFI_NM_WPA_SUPPLICANT_ADVANCED_FEATURES=n
CONFIG_CHIP_NFC_COMMISSIONING=n
CONFIG_MATTER_LOG_LEVEL_INF=y
CONFIG_CHIP_APP_LOG_LEVEL=3
CONFIG_THREAD_NAME=n
CONFIG_BOOT_BANNER=n

# Enable Factory Data feature
CONFIG_CHIP_FACTORY_DATA=y
CONFIG_CHIP_FACTORY_DATA_BUILD=y

# Enable LTO
CONFIG_LTO=y
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y

# Enforce the use of mbedTLS crypto backend instead of PSA Crypto by
# building OpenThread from sources. Wi-Fi stack does not support PSA Crypto yet.
CONFIG_OPENTHREAD_SOURCES=y

# Do not enable RAM power-down library for nRF7002 DK due to incompatible WiFi configuration.
CONFIG_RAM_POWER_DOWN_LIBRARY=n
