1# Copyright (c) 2024 Gustavo Silva
2# SPDX-License-Identifier: Apache-2.0
3
4menuconfig ENS160
5	bool "ENS160 multi-gas sensor"
6	default y
7	depends on DT_HAS_SCIOSENSE_ENS160_ENABLED
8	select I2C if $(dt_compat_on_bus,$(DT_COMPAT_SCIOSENSE_ENS160),i2c)
9	select SPI if $(dt_compat_on_bus,$(DT_COMPAT_SCIOSENSE_ENS160),spi)
10	help
11	  Enable driver for ENS160 Digital Metal Oxide Multi-Gas Sensor.
12
13if ENS160
14
15choice
16	prompt "Trigger Mode"
17	default ENS160_TRIGGER_NONE
18	help
19	  Specify the type of triggering to be used by the driver.
20
21config ENS160_TRIGGER_NONE
22	bool "No trigger"
23
24config ENS160_TRIGGER_GLOBAL_THREAD
25	bool "Use global thread"
26	depends on GPIO
27	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_SCIOSENSE_ENS160),int-gpios)
28	select ENS160_TRIGGER
29
30config ENS160_TRIGGER_OWN_THREAD
31	bool "Use own thread"
32	depends on GPIO
33	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_SCIOSENSE_ENS160),int-gpios)
34	select ENS160_TRIGGER
35
36endchoice # Trigger Mode
37
38config ENS160_TRIGGER
39	bool
40
41config ENS160_THREAD_PRIORITY
42	int "Thread priority"
43	depends on ENS160_TRIGGER_OWN_THREAD && ENS160_TRIGGER
44	default 10
45	help
46	  Priority of thread used by the driver to handle interrupts.
47
48config ENS160_THREAD_STACK_SIZE
49	int "Thread stack size"
50	depends on ENS160_TRIGGER_OWN_THREAD && ENS160_TRIGGER
51	default 1024
52	help
53	  Stack size of thread used by the driver to handle interrupts.
54
55endif # ENS160
56