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