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

source "Kconfig.zephyr"

menu "PHY Test Tool configuration"

choice
	prompt "Device Mode"
	default PTT_BOTH
	help
	  Select the device mode

config PTT_DUT_MODE
	bool "Configure device as a DUT"
	help
	  DUT (Device Under Test) - serial communication is not initialized

config PTT_CMD_MODE
	bool "Configure device as a CMD"
	help
	  CMD - serial communication is available with 115200 8N1 settings

config PTT_BOTH
	bool "Supports both CMD and DUT modes"
	help
	  Device can be switched between modes using "custom changemode 0/1" command.

endchoice

config PTT_POWER
	int "Transmit Power (dBm)"
	default 0
	range -20 8

config PTT_CHANNEL_MASK
	hex "Channel page and channel number mask"
	default 0x00000800

config PTT_SW_VERSION
	int "Software Version"
	default 1
	range 0 255

config PTT_HW_VERSION
	int "Hardware Version"
	default 1
	range 0 255

config PTT_ANTENNA_DIVERSITY
	depends on !SOC_SERIES_NRF53X
	depends on NRFX_GPIOTE
	bool "Enable Antenna Diversity [EXPERIMENTAL]"
	select EXPERIMENTAL

if PTT_ANTENNA_DIVERSITY

choice
	prompt "Antenna Mode"
	default PTT_ANT_MODE_AUTO
	help
	  Select the antenna diversity mode

config PTT_ANT_MODE_AUTO
	bool "Automatic"

config PTT_ANT_MODE_MANUAL
	bool "Manual"

endchoice

config PTT_ANTENNA_NUMBER
	int "Antenna Number"
	range 0 1
	default 0

config PTT_ANT_PIN
	int "Antenna Selection Pin"
	default 20
	help
	  Choose which GPIO Pin is responsible for antenna selection

config PTT_ANT_TOGGLE_TIME
	int "Antenna Toggle Time"
	default 40
	help
	  Time in microseconds between antenna switches in Auto Mode

endif #PTT_ANTENNA_DIVERSITY

config PTT_CLK_OUT
	bool "Enable external clock signal generator"
	default y
	depends on NRFX_GPIOTE
	help
	  Output clock signal to an external pin

config PTT_POWER_MGMT
	bool "Enable power management commands"
	default y
	depends on NRFX_POWER
	help
	  Enable power management commands.

config PTT_CACHE_MGMT
	bool "Enable cache management commands"
	default y
	help
	  Enable cache management commands.

config PTT_RF_INIT_PRIORITY
	int "PTT RF init priority"
	default 50
	help
	  PTT RF module init priority

endmenu
