1# Bosch BMI160 inertial measurement configuration options 2 3# Copyright (c) 2016 Intel Corporation 4# SPDX-License-Identifier: Apache-2.0 5 6menuconfig BMI160 7 bool "Bosch BMI160 inertial measurement unit" 8 default y 9 depends on DT_HAS_BOSCH_BMI160_ENABLED 10 select I2C if $(dt_compat_on_bus,$(DT_COMPAT_BOSCH_BMI160),i2c) 11 select SPI if $(dt_compat_on_bus,$(DT_COMPAT_BOSCH_BMI160),spi) 12 help 13 Enable Bosch BMI160 inertial measurement unit that provides acceleration 14 and angular rate measurements. 15 16if BMI160 17 18choice 19 prompt "Trigger mode" 20 default BMI160_TRIGGER_GLOBAL_THREAD 21 help 22 Specify the type of triggering to be used by the driver. 23 24config BMI160_TRIGGER_NONE 25 bool "No trigger" 26 27config BMI160_TRIGGER_GLOBAL_THREAD 28 bool "Use global thread" 29 depends on GPIO 30 depends on $(dt_compat_any_has_prop,$(DT_COMPAT_BOSCH_BMI160),int-gpios) 31 select BMI160_TRIGGER 32 33config BMI160_TRIGGER_OWN_THREAD 34 bool "Use own thread" 35 depends on GPIO 36 depends on $(dt_compat_any_has_prop,$(DT_COMPAT_BOSCH_BMI160),int-gpios) 37 select BMI160_TRIGGER 38endchoice 39 40config BMI160_TRIGGER 41 bool 42 43config BMI160_THREAD_PRIORITY 44 int "Own thread priority" 45 depends on BMI160_TRIGGER_OWN_THREAD 46 default 10 47 help 48 The priority of the thread used for handling interrupts. 49 50config BMI160_THREAD_STACK_SIZE 51 int "Own thread stack size" 52 depends on BMI160_TRIGGER_OWN_THREAD 53 default 1024 54 help 55 The thread stack size. 56 57choice 58 prompt "Accelerometer power mode" 59 default BMI160_ACCEL_PMU_RUNTIME 60 61config BMI160_ACCEL_PMU_RUNTIME 62 bool "Set at runtime." 63 64config BMI160_ACCEL_PMU_SUSPEND 65 bool "suspended/not used" 66 67config BMI160_ACCEL_PMU_NORMAL 68 bool "normal" 69 70config BMI160_ACCEL_PMU_LOW_POWER 71 bool "low power" 72endchoice 73 74choice 75 prompt "Accelerometer range setting" 76 depends on BMI160_ACCEL_PMU_RUNTIME || BMI160_ACCEL_PMU_NORMAL || BMI160_ACCEL_PMU_LOW_POWER 77 default BMI160_ACCEL_RANGE_RUNTIME 78 79config BMI160_ACCEL_RANGE_RUNTIME 80 bool "Set at runtime." 81 82config BMI160_ACCEL_RANGE_2G 83 bool "2G" 84 85config BMI160_ACCEL_RANGE_4G 86 bool "4G" 87 88config BMI160_ACCEL_RANGE_8G 89 bool "8G" 90 91config BMI160_ACCEL_RANGE_16G 92 bool "16G" 93endchoice 94 95choice 96 prompt "Accelerometer sampling frequency." 97 depends on BMI160_ACCEL_PMU_RUNTIME || BMI160_ACCEL_PMU_NORMAL || BMI160_ACCEL_PMU_LOW_POWER 98 default BMI160_ACCEL_ODR_RUNTIME 99 100config BMI160_ACCEL_ODR_RUNTIME 101 bool "Set at runtime." 102 103config BMI160_ACCEL_ODR_25_32 104 depends on BMI160_ACCEL_PMU_LOW_POWER 105 bool "0.78 Hz" 106 107config BMI160_ACCEL_ODR_25_16 108 depends on BMI160_ACCEL_PMU_LOW_POWER 109 bool "1.56 Hz" 110 111config BMI160_ACCEL_ODR_25_8 112 depends on BMI160_ACCEL_PMU_LOW_POWER 113 bool "3.125 Hz" 114 115config BMI160_ACCEL_ODR_25_4 116 depends on BMI160_ACCEL_PMU_LOW_POWER 117 bool "6.25 Hz" 118 119config BMI160_ACCEL_ODR_25_2 120 bool "12.5 Hz" 121 122config BMI160_ACCEL_ODR_25 123 bool "25 Hz" 124 125config BMI160_ACCEL_ODR_50 126 bool "50 Hz" 127 128config BMI160_ACCEL_ODR_100 129 bool "100 Hz" 130 131config BMI160_ACCEL_ODR_200 132 bool "200 Hz" 133 134config BMI160_ACCEL_ODR_400 135 bool "400 Hz" 136 137config BMI160_ACCEL_ODR_800 138 bool "800 Hz" 139 140config BMI160_ACCEL_ODR_1600 141 bool "1600 Hz" 142endchoice 143 144choice 145 prompt "Gyroscope power mode" 146 default BMI160_GYRO_PMU_RUNTIME 147 148config BMI160_GYRO_PMU_RUNTIME 149 bool "Set at runtime." 150 151config BMI160_GYRO_PMU_SUSPEND 152 bool "suspended/not used" 153 154config BMI160_GYRO_PMU_NORMAL 155 bool "normal" 156 157config BMI160_GYRO_PMU_FAST_STARTUP 158 bool "fast start-up" 159endchoice 160 161choice 162 prompt "Gyroscope range setting." 163 depends on BMI160_GYRO_PMU_RUNTIME || BMI160_GYRO_PMU_NORMAL || BMI160_GYRO_PMU_FAST_STARTUP 164 default BMI160_GYRO_RANGE_RUNTIME 165 166config BMI160_GYRO_RANGE_RUNTIME 167 bool "Set at runtime." 168 169config BMI160_GYRO_RANGE_2000DPS 170 bool "2000 DPS" 171 172config BMI160_GYRO_RANGE_1000DPS 173 bool "1000 DPS" 174 175config BMI160_GYRO_RANGE_500DPS 176 bool "500 DPS" 177 178config BMI160_GYRO_RANGE_250DPS 179 bool "250 DPS" 180 181config BMI160_GYRO_RANGE_125DPS 182 bool "125 DPS" 183endchoice 184 185choice 186 prompt "Gyroscope sampling frequency." 187 depends on BMI160_GYRO_PMU_RUNTIME || BMI160_GYRO_PMU_NORMAL || BMI160_GYRO_PMU_FAST_STARTUP 188 default BMI160_GYRO_ODR_RUNTIME 189 190config BMI160_GYRO_ODR_RUNTIME 191 bool "Set at runtime." 192 193config BMI160_GYRO_ODR_25 194 bool "25 Hz" 195 196config BMI160_GYRO_ODR_50 197 bool "50 Hz" 198 199config BMI160_GYRO_ODR_100 200 bool "100 Hz" 201 202config BMI160_GYRO_ODR_200 203 bool "200 Hz" 204 205config BMI160_GYRO_ODR_400 206 bool "400 Hz" 207 208config BMI160_GYRO_ODR_800 209 bool "800 Hz" 210 211config BMI160_GYRO_ODR_1600 212 bool "1600 Hz" 213 214config BMI160_GYRO_ODR_3200 215 bool "3200 Hz" 216endchoice 217 218 219config EMUL_BMI160 220 bool "Emulate a Bosch BMI160 accelerometer" 221 default y 222 depends on EMUL 223 depends on BMI160 224 help 225 This is an emulator for the Bosch BMI160 accelerometer. 226 227 It provides readings which follow a simple sequence, thus allowing 228 test code to check that things are working as expected. 229 230 It supports both I2C and SPI which is why it is not in one of the 231 i2c/ or spi/ directories. 232 233endif # BMI160 234