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

menu "User Interface"

config UI_LED_USE_PWM
	bool "Use PWM to control LEDs"
	default y
	depends on $(dt_alias_enabled,rgb-pwm)
	select PWM if BOARD_THINGY91_NRF9160NS
	select PWM_0 if BOARD_THINGY91_NRF9160NS
	help
		If enabled, LEDs will be controlled with PWM. In order
		to enable this option, the devicetree must have an
		"rgb-pwm" property in /aliases, which must point to an
		enabled PWM node with compatible "nordic,nrf-pwm". The
		red, green, and blue LEDs must be connected to
		channels 0, 1, and 2 of this PWM, respectively.

config UI_BUZZER
	bool "Enable buzzer"
	default y
	depends on $(dt_alias_enabled,buzzer-pwm)
	select PWM if BOARD_THINGY91_NRF9160NS
	select PWM_1 if BOARD_THINGY91_NRF9160NS
	help
		If enabled, a buzzer will be controllable with PWM. In
		order to enable this option, the devicetree must have
		a "buzzer-pwm" property in /aliases, which must point
		to an enabled PWM node with compatible
		"nordic,nrf-pwm". The buzzer must be connected to
		channel 0 of this PWM.

if UI_BUZZER

config UI_BUZZER_MIN_FREQUENCY
	int "Minimum buzzer frequency"
	default 100

config UI_BUZZER_MAX_FREQUENCY
	int "Maximum buzzer frequency"
	default 10000

endif # UI_BUZZER

config UI_BUTTON
	bool "Enable buttons"
	default y if BOARD_NRF9160DK_NRF9160NS

endmenu

module = UI
module-str = User Interface
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"
