Loading...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | # Kconfig - LIS2DH Three Axis Accelerometer configuration options # # Copyright (c) 2017 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 # menuconfig LIS2DH bool prompt "LIS2DH Three Axis Accelerometer" depends on SENSOR && (I2C || SPI) default n help Enable driver for LIS2DH SPI/I2C-based triaxial accelerometer sensor. config LIS2DH_NAME string "Driver name" default "LIS2DH" depends on LIS2DH help Device name with which the LIS2DH sensor is identified. choice prompt "Sensor Bus Type" depends on LIS2DH default LIS2DH_BUS_SPI help Specify bus type, SPI versus I2C, to which the sensor is attached. config LIS2DH_BUS_SPI bool "SPI bus" depends on SPI help Use a SPI master to communicate with accelerometer (SPI slave) config LIS2DH_BUS_I2C bool "I2C bus" depends on I2C help Use an I2C master to communicate with accelerometer (I2C slave) endchoice config LIS2DH_SPI_MASTER_DEV_NAME string "SPI master device name" depends on LIS2DH && LIS2DH_BUS_SPI default "SPI_0" help Specify the device name of the SPI master device to which LIS2DH is connected. config LIS2DH_SPI_SS_1 int "LIS2DH SPI slave 1 select number" depends on LIS2DH && LIS2DH_BUS_SPI range 1 4 default 1 help SPI slave select line to use to talk to LIS2DH sensor. config LIS2DH_SPI_FREQUENCY int "SPI clock frequency" depends on LIS2DH && LIS2DH_BUS_SPI range 125000 10000000 default 4000000 help SPI clock frequency to use. Make sure the SPI master hardware supports this frequency. config LIS2DH_I2C_ADDR hex "LIS2DH I2C address" depends on LIS2DH && LIS2DH_BUS_I2C default 0x18 help I2C address of the LIS2DH sensor. 0x18: Choose this option if the SDO pin is pulled to GND. 0x19: Choose this option if the SDO pin is pulled to VDDIO. config LIS2DH_I2C_MASTER_DEV_NAME string prompt "I2C master where LIS2DH is connected" depends on LIS2DH && LIS2DH_BUS_I2C default "I2C_0" help Specify the device name of the I2C master device to which LIS2DH is connected. choice prompt "Trigger mode" depends on LIS2DH default LIS2DH_TRIGGER_GLOBAL_THREAD help Specify the type of triggering to be used by the driver. config LIS2DH_TRIGGER_NONE bool "No trigger" config LIS2DH_TRIGGER_GLOBAL_THREAD bool "Use global thread" depends on GPIO select LIS2DH_TRIGGER config LIS2DH_TRIGGER_OWN_THREAD bool "Use own thread" depends on GPIO select LIS2DH_TRIGGER endchoice config LIS2DH_TRIGGER bool depends on LIS2DH config LIS2DH_GPIO_DEV_NAME string "GPIO device" default "GPIO_0" depends on LIS2DH && LIS2DH_TRIGGER help The device name of the GPIO device to which the LIS2DH interrupt pins are connected. config LIS2DH_INT1_GPIO_PIN int "Interrupt 1 GPIO pin number" range 0 254 default 25 depends on LIS2DH && LIS2DH_TRIGGER help The number of the GPIO on which the interrupt 1 signal from the LIS2DH chip will be received. config LIS2DH_INT2_GPIO_PIN int "Interrupt 2 GPIO pin number" range 0 254 default 26 depends on LIS2DH && LIS2DH_TRIGGER help The number of the GPIO on which the interrupt 2 signal from the LIS2DH chip will be received. config LIS2DH_THREAD_PRIORITY int "Thread priority" depends on LIS2DH && LIS2DH_TRIGGER_OWN_THREAD default 10 help Priority of thread used by the driver to handle interrupts. config LIS2DH_THREAD_STACK_SIZE int "Thread stack size" depends on LIS2DH && LIS2DH_TRIGGER_OWN_THREAD default 1024 help Stack size of thread used by the driver to handle interrupts. choice prompt "Acceleration measurement range" depends on LIS2DH default LIS2DH_ACCEL_RANGE_RUNTIME help Initial measurement full scale range for acceleration values. config LIS2DH_ACCEL_RANGE_RUNTIME bool "Set at runtime" config LIS2DH_ACCEL_RANGE_2G bool "+/-2g" config LIS2DH_ACCEL_RANGE_4G bool "+/-4g" config LIS2DH_ACCEL_RANGE_8G bool "+/-8g" config LIS2DH_ACCEL_RANGE_16G bool "+/-16g" endchoice choice prompt "Power mode" depends on LIS2DH default LIS2DH_POWER_MODE_NORMAL help Choose between normal or low power operation mode for chip at init. config LIS2DH_POWER_MODE_NORMAL bool "normal" config LIS2DH_POWER_MODE_LOW bool "low" endchoice choice prompt "Output data rate frequency" depends on LIS2DH default LIS2DH_ODR_RUNTIME help Initial data rate frequency of acceleration data at initialization. Supported values: 1Hz, 10Hz, 25Hz, 50Hz, 100Hz, 200Hz, 400Hz in all power modes 1620Hz, 5376Hz in low power mode only 1344Hz in normal power mode config LIS2DH_ODR_RUNTIME bool "Set at runtime" config LIS2DH_ODR_1 bool "1Hz" config LIS2DH_ODR_2 bool "10Hz" config LIS2DH_ODR_3 bool "25Hz" config LIS2DH_ODR_4 bool "50Hz" config LIS2DH_ODR_5 bool "100Hz" config LIS2DH_ODR_6 bool "200Hz" config LIS2DH_ODR_7 bool "400Hz" config LIS2DH_ODR_8 bool "1.6KHz" depends on LIS2DH_POWER_MODE_LOW config LIS2DH_ODR_9_NORMAL bool "1.25KHz" depends on LIS2DH_POWER_MODE_NORMAL config LIS2DH_ODR_9_LOW bool "5KHz" depends on LIS2DH_POWER_MODE_LOW endchoice |