1# ST Microelectronics LIS2DW12 3-axis accelerometer driver 2 3# Copyright (c) 2019 STMicroelectronics 4# SPDX-License-Identifier: Apache-2.0 5 6menuconfig LIS2DW12 7 bool "LIS2DW12 I2C/SPI accelerometer sensor driver" 8 default y 9 depends on DT_HAS_ST_LIS2DW12_ENABLED 10 depends on ZEPHYR_HAL_ST_MODULE 11 select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2DW12),i2c) 12 select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2DW12),spi) 13 select HAS_STMEMSC 14 select USE_STDC_LIS2DW12 15 help 16 Enable driver for LIS2DW12 accelerometer sensor driver 17 18if LIS2DW12 19 20choice LIS2DW12_TRIGGER_MODE 21 prompt "Trigger mode" 22 help 23 Specify the type of triggering to be used by the driver. 24 25config LIS2DW12_TRIGGER_NONE 26 bool "No trigger" 27 28config LIS2DW12_TRIGGER_GLOBAL_THREAD 29 bool "Use global thread" 30 depends on GPIO 31 depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ST_LIS2DW12),irq-gpios) 32 select LIS2DW12_TRIGGER 33 34config LIS2DW12_TRIGGER_OWN_THREAD 35 bool "Use own thread" 36 depends on GPIO 37 depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ST_LIS2DW12),irq-gpios) 38 select LIS2DW12_TRIGGER 39 40endchoice 41 42config LIS2DW12_TRIGGER 43 bool 44 45if LIS2DW12_TRIGGER 46 47config LIS2DW12_THREAD_PRIORITY 48 int "Thread priority" 49 depends on LIS2DW12_TRIGGER_OWN_THREAD 50 default 10 51 help 52 Priority of thread used by the driver to handle interrupts. 53 54config LIS2DW12_THREAD_STACK_SIZE 55 int "Thread stack size" 56 depends on LIS2DW12_TRIGGER_OWN_THREAD 57 default 1024 58 help 59 Stack size of thread used by the driver to handle interrupts. 60 61config LIS2DW12_TAP 62 bool "Tap and Tap-Tap detection" 63 help 64 Enable tap (single/double) detection 65 66endif # LIS2DW12_TRIGGER 67 68config LIS2DW12_SLEEP 69 bool "Sleep mode" 70 help 71 Enable sleep (inactivity) mode with ODR change when detected 72 73config LIS2DW12_WAKEUP 74 bool "Wakeup detection (via interrupt)" 75 help 76 Enable the wakeup detection feature. 77 The wake-up interrupt signal is generated if a certain number of 78 consecutive data exceed the configured threshold (config in DT). 79 The threshold is applied to both positive and negative data: for 80 a wake-up interrupt generation at least one of the three axes must 81 be bigger than the threshold. See ST AN5038 for more details about 82 the feature. 83 84config LIS2DW12_FREEFALL 85 bool "Free Fall detection (via interrupt)" 86 help 87 Enable freefall detection via interrupt. 88endif # LIS2DW12 89