1# ST Microelectronics IIS2DH 3-axis accelerometer driver 2 3# Copyright (c) 2020 STMicroelectronics 4# SPDX-License-Identifier: Apache-2.0 5 6menuconfig IIS2DH 7 bool "IIS2DH I2C/SPI accelerometer sensor driver" 8 depends on I2C || SPI 9 select HAS_STMEMSC 10 select USE_STDC_IIS2DH 11 help 12 Enable driver for IIS2DH accelerometer sensor driver 13 14if IIS2DH 15 16choice IIS2DH_TRIGGER_MODE 17 prompt "Trigger mode" 18 help 19 Specify the type of triggering to be used by the driver. 20 21config IIS2DH_TRIGGER_NONE 22 bool "No trigger" 23 24config IIS2DH_TRIGGER_GLOBAL_THREAD 25 bool "Use global thread" 26 depends on GPIO 27 select IIS2DH_TRIGGER 28 29config IIS2DH_TRIGGER_OWN_THREAD 30 bool "Use own thread" 31 depends on GPIO 32 select IIS2DH_TRIGGER 33 34endchoice 35 36config IIS2DH_TRIGGER 37 bool 38 39if IIS2DH_TRIGGER 40 41config IIS2DH_THREAD_PRIORITY 42 int "Thread priority" 43 depends on IIS2DH_TRIGGER_OWN_THREAD 44 default 10 45 help 46 Priority of thread used by the driver to handle interrupts. 47 48config IIS2DH_THREAD_STACK_SIZE 49 int "Thread stack size" 50 depends on IIS2DH_TRIGGER_OWN_THREAD 51 default 1024 52 help 53 Stack size of thread used by the driver to handle interrupts. 54 55endif # IIS2DH_TRIGGER 56 57config IIS2DH_RANGE 58 int "Accelerometer Full-scale range setting" 59 default 0 60 help 61 Specify the default accelerometer full-scale range. 62 Valid values are: 63 0: Full Scale selected at runtime 64 2: +/- 2g 65 4: +/- 4g 66 8: +/- 8g 67 16: +/- 16g 68 69config IIS2DH_ODR 70 int "Accelerometer sampling frequency (ODR)" 71 range 0 9 72 default 0 73 help 74 Specify the default accelerometer output data rate expressed in 75 samples per second (Hz). 76 0: ODR selected at runtime 77 1: 1 Hz 78 2: 10 Hz 79 3: 25 Hz 80 4: 50 Hz 81 5: 100 Hz 82 6: 200 Hz 83 7: 400 Hz 84 8: 1620 Hz (only LP) 85 9: Depends by mode. LP: 5376 Hz - NORM or HR: 1344 Hz 86 87config IIS2DH_POWER_MODE 88 int "Sensor Power Modes" 89 range 0 2 90 default 0 91 help 92 Specify the sensor power mode 93 0: High Resolution mode 94 1: Normal mode 95 2: Low Power mode 96 97endif # IIS2DH 98