1# Bosch BMI08X inertial measurement configuration options 2 3# Copyright (c) 2022 Meta Platforms, Inc. and its affiliates 4# SPDX-License-Identifier: Apache-2.0 5 6menuconfig BMI08X 7 bool "Bosch BMI08X inertial measurement unit" 8 default y 9 depends on DT_HAS_BOSCH_BMI08X_ACCEL_ENABLED || DT_HAS_BOSCH_BMI08X_GYRO_ENABLED 10 select I2C if $(dt_compat_on_bus,$(DT_COMPAT_BOSCH_BMI08X_ACCEL),i2c) \ 11 || $(dt_compat_on_bus,$(DT_COMPAT_BOSCH_BMI08X_GYRO),i2c) 12 select SPI if $(dt_compat_on_bus,$(DT_COMPAT_BOSCH_BMI08X_ACCEL),spi) \ 13 || $(dt_compat_on_bus,$(DT_COMPAT_BOSCH_BMI08X_GYRO),spi) 14 help 15 Enable Bosch BMI08X inertial measurement unit that provides acceleration 16 and angular rate measurements. 17 18if BMI08X 19 20choice BMI08X_ACCEL_TRIGGER_MODE 21 prompt "Accelerometer trigger mode" 22 default BMI08X_ACCEL_TRIGGER_GLOBAL_THREAD 23 help 24 Specify the type of triggering to be used by the driver. 25 26config BMI08X_ACCEL_TRIGGER_NONE 27 bool "No trigger" 28 29config BMI08X_ACCEL_TRIGGER_GLOBAL_THREAD 30 bool "Use global thread" 31 depends on GPIO 32 depends on $(dt_compat_any_has_prop,$(DT_COMPAT_BOSCH_BMI08X_ACCEL),int-gpios) 33 select BMI08X_ACCEL_TRIGGER 34 35config BMI08X_ACCEL_TRIGGER_OWN_THREAD 36 bool "Use own thread" 37 depends on GPIO 38 depends on $(dt_compat_any_has_prop,$(DT_COMPAT_BOSCH_BMI08X_ACCEL),int-gpios) 39 select BMI08X_ACCEL_TRIGGER 40endchoice 41 42config BMI08X_ACCEL_TRIGGER 43 bool 44 45config BMI08X_ACCEL_THREAD_PRIORITY 46 int "Accelerometer own thread priority" 47 depends on BMI08X_ACCEL_TRIGGER_OWN_THREAD 48 default 10 49 help 50 The priority of the thread used for handling interrupts. 51 52config BMI08X_ACCEL_THREAD_STACK_SIZE 53 int "Accelerometer own thread stack size" 54 depends on BMI08X_ACCEL_TRIGGER_OWN_THREAD 55 default 1536 56 help 57 The thread stack size. 58 59choice BMI08X_GYRO_TRIGGER_MODE 60 prompt "Gyroscope trigger mode" 61 default BMI08X_GYRO_TRIGGER_NONE 62 default BMI08X_GYRO_TRIGGER_GLOBAL_THREAD 63 help 64 Specify the type of triggering to be used by the driver. 65 66config BMI08X_GYRO_TRIGGER_NONE 67 bool "No trigger" 68 69config BMI08X_GYRO_TRIGGER_GLOBAL_THREAD 70 bool "Use global thread" 71 select BMI08X_GYRO_TRIGGER 72 73config BMI08X_GYRO_TRIGGER_OWN_THREAD 74 bool "Use own thread" 75 select BMI08X_GYRO_TRIGGER 76endchoice 77 78config BMI08X_GYRO_TRIGGER 79 bool 80 81config BMI08X_GYRO_THREAD_PRIORITY 82 int "Own thread priority" 83 depends on BMI08X_GYRO_TRIGGER_OWN_THREAD 84 default 10 85 help 86 The priority of the thread used for handling interrupts. 87 88config BMI08X_GYRO_THREAD_STACK_SIZE 89 int "Own thread stack size" 90 depends on BMI08X_GYRO_TRIGGER_OWN_THREAD 91 default 1536 92 help 93 The thread stack size. 94 95config BMI08X_I2C_WRITE_BURST_SIZE 96 int "Maximum length of single i2c write" 97 default 16 98 99endif # BMI08X 100