1# ST Microelectronics ISM330DHCX 6-axis IMU sensor driver
2
3# Copyright (c) 2020 STMicroelectronics
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig ISM330DHCX
7	bool "ISM330DHCX I2C/SPI accelerometer and gyroscope Chip"
8	default y
9	depends on DT_HAS_ST_ISM330DHCX_ENABLED
10	depends on ZEPHYR_HAL_ST_MODULE
11	select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_ISM330DHCX),i2c)
12	select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_ISM330DHCX),spi)
13	select HAS_STMEMSC
14	select USE_STDC_ISM330DHCX
15	help
16	  Enable driver for ISM330DHCX accelerometer and gyroscope
17	  sensor.
18
19if ISM330DHCX
20
21choice ISM330DHCX_TRIGGER_MODE
22	prompt "Trigger mode"
23	help
24	  Specify the type of triggering to be used by the driver.
25
26config ISM330DHCX_TRIGGER_NONE
27	bool "No trigger"
28
29config ISM330DHCX_TRIGGER_GLOBAL_THREAD
30	bool "Use global thread"
31	depends on GPIO
32	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ST_ISM330DHCX),drdy-gpios)
33	select ISM330DHCX_TRIGGER
34
35config ISM330DHCX_TRIGGER_OWN_THREAD
36	bool "Use own thread"
37	depends on GPIO
38	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ST_ISM330DHCX),drdy-gpios)
39	select ISM330DHCX_TRIGGER
40
41endchoice
42
43config ISM330DHCX_TRIGGER
44	bool
45
46if ISM330DHCX_TRIGGER
47
48config ISM330DHCX_THREAD_PRIORITY
49	int "Thread priority"
50	depends on ISM330DHCX_TRIGGER_OWN_THREAD
51	default 10
52	help
53	  Priority of thread used by the driver to handle interrupts.
54
55config ISM330DHCX_THREAD_STACK_SIZE
56	int "Thread stack size"
57	depends on ISM330DHCX_TRIGGER_OWN_THREAD
58	default 1024
59	help
60	  Stack size of thread used by the driver to handle interrupts.
61
62endif # ISM330DHCX_TRIGGER
63
64config ISM330DHCX_ENABLE_TEMP
65	bool "Temperature"
66	help
67	  Enable/disable temperature
68
69config ISM330DHCX_SENSORHUB
70	bool "I2C sensorhub feature"
71	help
72	  Enable/disable internal sensorhub. You can enable
73	  a maximum of two external sensors (if more than two are enabled
74	  the system would enumerate only the first two found)
75
76if ISM330DHCX_SENSORHUB
77
78config ISM330DHCX_EXT_LIS2MDL
79	bool "LIS2MDL as external sensor"
80
81config ISM330DHCX_EXT_IIS2MDC
82	bool "IIS2MDC as external sensor"
83
84config ISM330DHCX_EXT_LPS22HH
85	bool "LPS22HH as external sensor"
86
87config ISM330DHCX_EXT_HTS221
88	bool "HTS221 as external sensor"
89
90config ISM330DHCX_EXT_LPS22HB
91	bool "LPS22HB as external sensor"
92
93endif # ISM330DHCX_SENSORHUB
94
95endif # ISM330DHCX
96