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
16if ADXL345
17
18choice ADXL345_TRIGGER_MODE
19	prompt "Trigger mode"
20	default ADXL345_TRIGGER_NONE
21	help
22	  Specify the type of triggering used by the driver.
23
24config ADXL345_TRIGGER_NONE
25	bool "No trigger"
26
27config ADXL345_TRIGGER_GLOBAL_THREAD
28	bool "Use global thread"
29	depends on GPIO
30	select ADXL345_TRIGGER
31
32config ADXL345_TRIGGER_OWN_THREAD
33	bool "Use own thread"
34	depends on GPIO
35	select ADXL345_TRIGGER
36
37endchoice
38
39config ADXL345_STREAM
40	bool "Use FIFO to stream data"
41	select ADXL345_TRIGGER
42	depends on (SPI_RTIO || I2C_RTIO)
43	depends on SENSOR_ASYNC_API
44	help
45	  Use this configuration option to enable streaming sensor data via RTIO.
46
47config ADXL345_TRIGGER
48	bool
49
50config ADXL345_THREAD_PRIORITY
51	int "Thread priority"
52	depends on ADXL345_TRIGGER_OWN_THREAD && ADXL345_TRIGGER
53	default 10
54	help
55	  Priority of thread used by the driver to handle interrupts.
56
57config ADXL345_THREAD_STACK_SIZE
58	int "Thread stack size"
59	depends on ADXL345_TRIGGER_OWN_THREAD && ADXL345_TRIGGER
60	default 1024
61	help
62	  Stack size of thread used by the driver to handle interrupts.
63
64endif # ADXL345
65