mainmenu "LoRa KISS Modem Configuration"

source "Kconfig.zephyr"

menu "KISS Interface"

config LORAMODEM_KISS_IFACE_USB
	bool "Use USB CDC-ACM as KISS serial interface"
	depends on USB_DEVICE_STACK || USB_DEVICE_STACK_NEXT
	help
	  Use USB CDC-ACM virtual serial port for the KISS interface.
	  Requires the host to enumerate the device before framing begins.
	  The board overlay must define the loramodem,kiss-uart chosen node
	  pointing to a cdc_acm_uart instance.

config LORAMODEM_KISS_IFACE_UART
	bool "Use hardware UART as KISS serial interface"
	default y if !LORAMODEM_KISS_IFACE_USB
	help
	  Use a hardware UART for the KISS interface.
	  The board overlay must define the loramodem,kiss-uart chosen node
	  pointing to the desired uart instance.

endmenu

menu "LoRa Radio Parameters"

config LORAMODEM_LORA_FREQ_HZ
	int "Center frequency (Hz)"
	default 915000000
	help
	  LoRa radio center frequency in Hz.
	  Common values: 915000000 (US/AU), 868000000 (EU), 433000000 (Asia).

config LORAMODEM_LORA_SF
	int "Spreading factor"
	default 9
	range 7 12
	help
	  LoRa spreading factor. Higher values increase range and time-on-air.

config LORAMODEM_LORA_BW
	int "Bandwidth (kHz)"
	default 62
	help
	  LoRa bandwidth in kHz. Supported values include: 7, 10, 15, 20, 31, 41, 62 (62.5 kHz), 125, 200, 250, 400, 500, 800, 1000, 1600.

config LORAMODEM_LORA_CR
	int "Coding rate denominator"
	default 5
	range 5 8
	help
	  LoRa coding rate as the denominator N of 4/N.
	  5 = 4/5 (lowest overhead), 8 = 4/8 (highest redundancy).

config LORAMODEM_LORA_TX_POWER_DBM
	int "TX power (dBm)"
	default 14
	range 2 22

config LORAMODEM_LORA_PREAMBLE_LEN
	int "Preamble length (symbols)"
	default 8
	range 6 65535

endmenu

config LORAMODEM_MAX_PACKET_SIZE
	int "Maximum LoRa packet payload size (bytes)"
	default 255
	range 1 255
