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

CONFIG_NCS_SAMPLES_DEFAULTS=n

CONFIG_NCS_INCLUDE_RPMSG_CHILD_IMAGE=n

CONFIG_SPEED_OPTIMIZATIONS=y

CONFIG_FPU=y
CONFIG_SCHED_DEADLINE=y
CONFIG_THREAD_LOCAL_STORAGE=y
CONFIG_UART_CONSOLE=n
CONFIG_MAIN_STACK_SIZE=8192
CONFIG_TIMESLICE_SIZE=5

# BLE
CONFIG_BOARD_ENABLE_CPUNET=y

CONFIG_DK_LIBRARY=y

CONFIG_HEAP_MEM_POOL_SIZE=1024

# Peripherals we use
CONFIG_PINCTRL_DYNAMIC=y
CONFIG_NRFX_TIMER0=y
CONFIG_NRFX_UARTE0=y
CONFIG_NRFX_UARTE1=y
CONFIG_NRFX_TWIM1=n
CONFIG_NRFX_TWIM2=y

# Libraries we may use in app
CONFIG_NEWLIB_LIBC=y
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
CONFIG_CBPRINTF_LIBC_SUBSTS=y
CONFIG_CBPRINTF_FP_SUPPORT=y
CONFIG_CBPRINTF_N_SPECIFIER=y
CONFIG_TASK_WDT=y

# MODEM - alternate modem mode with simple AT and sockets
CONFIG_MODEM=y
CONFIG_NETWORKING=y
CONFIG_NET_DRIVERS=y

# Only relevant for ns
#CONFIG_BUILD_WITH_TFM=y
#CONFIG_TFM_PROFILE_TYPE_LARGE=y
# Only for ns build
#CONFIG_TFM_HW_INIT_RESET_ON_BOOT=y
#CONFIG_TFM_HW_INIT_NRF_PERIPHERALS=y
# Need to silence TF-M UART logs or it takes over UART1
#CONFIG_TFM_LOG_LEVEL_SILENCE=y

# UART settings
CONFIG_UART_ASYNC_API=y
CONFIG_UART_INTERRUPT_DRIVEN=n
CONFIG_UART_0_ASYNC=y
CONFIG_UART_0_INTERRUPT_DRIVEN=n
CONFIG_UART_0_NRF_ASYNC_LOW_POWER=n
CONFIG_UART_0_NRF_HW_ASYNC=y
CONFIG_UART_0_NRF_HW_ASYNC_TIMER=0
CONFIG_MODEM_IFACE_UART_ASYNC_RX_BUFFER_SIZE=512
CONFIG_MODEM_IFACE_UART_ASYNC_RX_NUM_BUFFERS=5
CONFIG_UART_1_NRF_ASYNC_LOW_POWER=n
CONFIG_UART_1_ASYNC=y
CONFIG_UART_1_INTERRUPT_DRIVEN=n
CONFIG_UART_1_NRF_HW_ASYNC=y
CONFIG_UART_1_NRF_HW_ASYNC_TIMER=0
CONFIG_UART_LINE_CTRL=y
CONFIG_TFM_SECURE_UART1=n
CONFIG_LOG_BACKEND_UART=n
CONFIG_UART_RTT=n

# Power saving
CONFIG_SYSTEM_CLOCK_SLOPPY_IDLE=y
CONFIG_PM_CPU_OPS=y

CONFIG_MODEM_IFACE_UART_ASYNC=y
#CONFIG_MODEM_IFACE_UART_INTERRUPT=y
CONFIG_MODEM_NRF9160_SLM=y
