1# ST Microelectronics IIS2DLPC 3-axis accelerometer driver
2
3# Copyright (c) 2020 STMicroelectronics
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig IIS2DLPC
7	bool "IIS2DLPC I2C/SPI accelerometer sensor driver"
8	default y
9	depends on DT_HAS_ST_IIS2DLPC_ENABLED
10	depends on ZEPHYR_HAL_ST_MODULE
11	select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_IIS2DLPC),i2c)
12	select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_IIS2DLPC),spi)
13	select HAS_STMEMSC
14	select USE_STDC_IIS2DLPC
15	help
16	  Enable driver for IIS2DLPC accelerometer sensor driver
17
18if IIS2DLPC
19
20choice IIS2DLPC_TRIGGER_MODE
21	prompt "Trigger mode"
22	help
23	  Specify the type of triggering to be used by the driver.
24
25config IIS2DLPC_TRIGGER_NONE
26	bool "No trigger"
27
28config IIS2DLPC_TRIGGER_GLOBAL_THREAD
29	bool "Use global thread"
30	depends on GPIO
31	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ST_IIS2DLPC),drdy-gpios)
32	select IIS2DLPC_TRIGGER
33
34config IIS2DLPC_TRIGGER_OWN_THREAD
35	bool "Use own thread"
36	depends on GPIO
37	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ST_IIS2DLPC),drdy-gpios)
38	select IIS2DLPC_TRIGGER
39
40endchoice
41
42config IIS2DLPC_TRIGGER
43	bool
44
45if IIS2DLPC_TRIGGER
46
47config IIS2DLPC_THREAD_PRIORITY
48	int "Thread priority"
49	depends on IIS2DLPC_TRIGGER_OWN_THREAD
50	default 10
51	help
52	  Priority of thread used by the driver to handle interrupts.
53
54config IIS2DLPC_THREAD_STACK_SIZE
55	int "Thread stack size"
56	depends on IIS2DLPC_TRIGGER_OWN_THREAD
57	default 1024
58	help
59	  Stack size of thread used by the driver to handle interrupts.
60
61config IIS2DLPC_TAP
62	bool "Tap and Tap-Tap detection"
63	help
64	  Enable tap (single/double) detection
65
66config IIS2DLPC_ACTIVITY
67	bool "Activity detection"
68	help
69	  Enable activity/inactivity detection
70
71endif # IIS2DLPC_TRIGGER
72
73endif # IIS2DLPC
74