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

mainmenu "Nordic DTM sample"

config DTM_RADIO_IRQ_PRIORITY
	int "Radio interrupt priority"
	range 0 5 if ZERO_LATENCY_IRQS
	range 0 6
	default 2
	help
	  Sets Radio interrupt priority.
	  Levels are from 0 (highest priority) to 6 (lowest priority)

config DTM_TIMER_IRQ_PRIORITY
	int "DTM timer interrupt priority"
	range 0 5 if ZERO_LATENCY_IRQS
	range 0 6
	default 3
	help
	  Sets DTM timer interrupt priority.
	  Levels are from 0 (highest priority) to 6 (lowest priority)

config ANOMALY_172_TIMER_IRQ_PRIORITY
	int "Anomaly 172 timer interrupt priority"
	depends on SOC_NRF52840
	range 0 5 if ZERO_LATENCY_IRQS
	range 0 6
	default 2
	help
	  Sets anomaly 172 timer interrupt priority.
	  Levels are from 0 (highest priority) to 6 (lowest priority)

config DTM_USB
	bool "DTM over USB CDC ACM class"
	depends on SOC_NRF5340_CPUNET && !DTM_TRANSPORT_HCI
	select EXPERIMENTAL
	help
	  Use USB instead of UART as the DTM interface. For nRF5340 the USB from application core
	  is used as communication interface.

config DTM_TRANSPORT_HCI
	bool "DTM over HCI UART [EXPERIMENTAL]"
	depends on SERIAL
	depends on NET_BUF
	select EXPERIMENTAL
	help
	  Use the HCI UART transport interface as the DTM transport layer.
	  This option is inherited from SB_CONFIG_DTM_TRANSPORT_HCI.

if DTM_TRANSPORT_HCI

config DTM_HCI_QUEUE_COUNT
	int "Count of HCI RX/TX queues"
	default 16
	help
	  Maximum depth of the HCI RX/TX queues.

config DTM_HCI_QUEUE_SIZE
	int "Size of HCI RX/TX queue buffer"
	default 1024
	help
	  Maximum size of the HCI RX/TX queue element.

config DTM_HCI_TX_THREAD_STACK_SIZE
	int "Stack size of TX thread"
	default 2048
	help
	  Stack size of the TX thread.

config DTM_HCI_TX_THREAD_PRIORITY
	int "TX thread priority"
	default 7
	help
	  Priority of the TX thread.

endif # DTM_TRANSPORT_HCI

config DTM_POWER_CONTROL_AUTOMATIC
	bool "Automatic power control"
	depends on FEM
	default y
	help
	  Set the SoC output power and the front-end module gain to achieve the TX output power
	  requested by user. If the exact value cannot be achieved, power is set to the closest
	  possible value. If this option is disabled, user can set the SoC output power and the
	  front-end module gain with the separate vendor specific commands.

config DTM_FAST_RAMP_UP
	bool "Enable radio fast ramp up mode"
	default y
	help
	  Do fast ramp up when starting the radio peripheral. This mode will significancy reduce
	  the ramp up time and makes it almost the same on all supported chips.

module = DTM_TRANSPORT
module-str = "DTM_transport"
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"

source "Kconfig.zephyr"
