1# CCS811 Digital Gas sensor configuration options
2
3# Copyright (c) 2018 Linaro Ltd.
4# Copyright (c) 2018 Peter Bigot Consulting, LLC
5#
6# SPDX-License-Identifier: Apache-2.0
7
8menuconfig CCS811
9	bool "CCS811 Digital Gas Sensor"
10	default y
11	depends on DT_HAS_AMS_CCS811_ENABLED
12	select I2C
13	help
14	  Enable driver for CCS811 Gas sensors.
15
16if CCS811
17
18choice CCS811_DRIVE_MODE
19	prompt "Measurement drive mode"
20	default CCS811_DRIVE_MODE_1
21	help
22	  Specifies the measurement rate used by the driver.
23
24config CCS811_DRIVE_MODE_0
25	bool "Measurements disabled"
26
27config CCS811_DRIVE_MODE_1
28	bool "Measurement every second"
29
30config CCS811_DRIVE_MODE_2
31	bool "Measurement every ten seconds"
32
33config CCS811_DRIVE_MODE_3
34	bool "Measurement every sixty seconds"
35
36config CCS811_DRIVE_MODE_4
37	bool "Measurement every 250 milliseconds"
38
39endchoice
40
41config CCS811_TRIGGER
42	bool
43
44choice
45	prompt "Trigger mode"
46	default CCS811_TRIGGER_NONE
47	help
48	  Specify the type of triggering to be used by the driver.
49
50config CCS811_TRIGGER_NONE
51	bool "No trigger"
52
53config CCS811_TRIGGER_GLOBAL_THREAD
54	bool "Use global thread"
55	depends on GPIO
56	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_AMS_CCS811),irq-gpios)
57	select CCS811_TRIGGER
58
59config CCS811_TRIGGER_OWN_THREAD
60	bool "Use own thread"
61	depends on GPIO
62	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_AMS_CCS811),irq-gpios)
63	select CCS811_TRIGGER
64
65endchoice
66
67config CCS811_THREAD_PRIORITY
68	int "Thread priority"
69	depends on CCS811_TRIGGER_OWN_THREAD
70	default 10
71	help
72	  Priority of thread used by the driver to handle interrupts.
73
74config CCS811_THREAD_STACK_SIZE
75	int "Thread stack size"
76	depends on CCS811_TRIGGER_OWN_THREAD
77	default 1024
78	help
79	  Stack size of thread used by the driver to handle interrupts.
80
81endif # CCS811
82