1# Common Kconfig template for all sensors
2# Copyright (c) 2023 STMicroelectronics
3# SPDX-License-Identifier: Apache-2.0
4
5choice "$(module)_TRIGGER_MODE"
6	prompt "Trigger mode"
7	help
8	  Specify the type of triggering to be used by the sensor module.
9
10config $(module)_TRIGGER_NONE
11	bool "No trigger"
12
13config $(module)_TRIGGER_GLOBAL_THREAD
14	bool "Use global thread"
15	depends on GPIO
16	select $(module)_TRIGGER
17
18config $(module)_TRIGGER_OWN_THREAD
19	bool "Use own thread"
20	depends on GPIO
21	select $(module)_TRIGGER
22
23endchoice
24
25config $(module)_TRIGGER
26	bool
27
28if $(module)_TRIGGER
29
30config $(module)_THREAD_PRIORITY
31	int "Thread priority"
32	depends on $(module)_TRIGGER_OWN_THREAD
33	default $(thread_priority)
34	help
35	  Priority of thread used by the driver to handle interrupts.
36
37config $(module)_THREAD_STACK_SIZE
38	int "Thread stack size"
39	depends on $(module)_TRIGGER_OWN_THREAD
40	default $(thread_stack_size)
41	help
42	  Stack size of thread used by the driver to handle interrupts.
43
44endif # $(module)_TRIGGER
45