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	select IIS2DLPC_TRIGGER
32
33config IIS2DLPC_TRIGGER_OWN_THREAD
34	bool "Use own thread"
35	depends on GPIO
36	select IIS2DLPC_TRIGGER
37
38endchoice
39
40config IIS2DLPC_TRIGGER
41	bool
42
43if IIS2DLPC_TRIGGER
44
45config IIS2DLPC_THREAD_PRIORITY
46	int "Thread priority"
47	depends on IIS2DLPC_TRIGGER_OWN_THREAD
48	default 10
49	help
50	  Priority of thread used by the driver to handle interrupts.
51
52config IIS2DLPC_THREAD_STACK_SIZE
53	int "Thread stack size"
54	depends on IIS2DLPC_TRIGGER_OWN_THREAD
55	default 1024
56	help
57	  Stack size of thread used by the driver to handle interrupts.
58
59config IIS2DLPC_TAP
60	bool "Tap and Tap-Tap detection"
61	help
62	  Enable tap (single/double) detection
63
64config IIS2DLPC_ACTIVITY
65	bool "Activity detection"
66	help
67	  Enable activity/inactivity detection
68
69endif # IIS2DLPC_TRIGGER
70
71endif # IIS2DLPC
72