1# ADXL345, 3-Axis, +/-16g Digital Accelerometer
2
3# Copyright (c) 2020 Antmicro <www.antmicro.com>
4# SPDX-License-Identifier: Apache-2.0
5
6config ADXL345
7	bool "ADXL345 Three Axis accelerometer"
8	default y
9	depends on DT_HAS_ADI_ADXL345_ENABLED
10	select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ADI_ADXL345),i2c)
11	select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ADI_ADXL345),spi)
12	select RTIO_WORKQ if SENSOR_ASYNC_API
13	help
14	  Enable driver for ADXL345 Three-Axis Digital Accelerometer.
15
16choice ADXL345_TRIGGER_MODE
17	prompt "Trigger mode"
18	default ADXL345_TRIGGER_NONE
19	help
20	  Specify the type of triggering used by the driver.
21
22config ADXL345_TRIGGER_NONE
23	bool "No trigger"
24
25config ADXL345_TRIGGER_GLOBAL_THREAD
26	bool "Use global thread"
27	depends on GPIO
28	select ADXL345_TRIGGER
29
30config ADXL345_TRIGGER_OWN_THREAD
31	bool "Use own thread"
32	depends on GPIO
33	select ADXL345_TRIGGER
34
35endchoice
36
37config ADXL345_STREAM
38	bool "Use FIFO to stream data"
39	select ADXL345_TRIGGER
40	default y
41	depends on (SPI_RTIO || I2C_RTIO)
42	depends on SENSOR_ASYNC_API
43	help
44	  Use this configuration option to enable streaming sensor data via RTIO.
45
46config ADXL345_TRIGGER
47	bool
48
49config ADXL345_THREAD_PRIORITY
50	int "Thread priority"
51	depends on ADXL345_TRIGGER_OWN_THREAD && ADXL345_TRIGGER
52	default 10
53	help
54	  Priority of thread used by the driver to handle interrupts.
55
56config ADXL345_THREAD_STACK_SIZE
57	int "Thread stack size"
58	depends on ADXL345_TRIGGER_OWN_THREAD && ADXL345_TRIGGER
59	default 1024
60	help
61	  Stack size of thread used by the driver to handle interrupts.
62