1# ST Microelectronics IIS3DHHC accelerometer sensor
2
3# Copyright (c) 2019 STMicroelectronics
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig IIS3DHHC
7	bool "IIS3DHHC accelerometer sensor"
8	default y
9	depends on DT_HAS_ST_IIS3DHHC_ENABLED
10	depends on ZEPHYR_HAL_ST_MODULE
11	select SPI
12	select HAS_STMEMSC
13	select USE_STDC_IIS3DHHC
14	help
15	  Enable driver for IIS3DHHC SPI-based accelerometer sensor.
16
17if IIS3DHHC
18
19choice IIS3DHHC_TRIGGER_MODE
20	prompt "Trigger mode"
21	default IIS3DHHC_TRIGGER_GLOBAL_THREAD
22	help
23	  Specify the type of triggering to be used by the driver.
24
25config IIS3DHHC_TRIGGER_NONE
26	bool "No trigger"
27
28config IIS3DHHC_TRIGGER_GLOBAL_THREAD
29	bool "Use global thread"
30	depends on GPIO
31	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ST_IIS3DHHC),irq-gpios)
32	select IIS3DHHC_TRIGGER
33
34config IIS3DHHC_TRIGGER_OWN_THREAD
35	bool "Use own thread"
36	depends on GPIO
37	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ST_IIS3DHHC),irq-gpios)
38	select IIS3DHHC_TRIGGER
39
40endchoice # IIS3DHHC_TRIGGER_MODE
41
42config IIS3DHHC_TRIGGER
43	bool
44
45config IIS3DHHC_THREAD_PRIORITY
46	int "Thread priority"
47	depends on IIS3DHHC_TRIGGER_OWN_THREAD
48	default 10
49	help
50	  Priority of thread used by the driver to handle interrupts.
51
52config IIS3DHHC_THREAD_STACK_SIZE
53	int "Thread stack size"
54	depends on IIS3DHHC_TRIGGER_OWN_THREAD
55	default 1024
56	help
57	  Stack size of thread used by the driver to handle interrupts.
58
59menu "Attributes"
60
61config IIS3DHHC_NORM_MODE
62	bool "Sensor at 1KHz"
63	default y
64
65config IIS3DHHC_DRDY_INT1
66	bool "Data ready interrupt to INT1 pin"
67	depends on IIS3DHHC_TRIGGER
68	default y
69	help
70	  Say Y to route data ready interrupt to INT1 pin. Say N to route to
71	  INT2 pin.
72
73endmenu
74
75endif # IIS3DHHC
76