2016-10-15 20:19:51 +08:00
|
|
|
# Kconfig - BMA280 Three Axis Accelerometer configuration options
|
2016-02-18 23:40:55 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# Copyright (c) 2016 Intel Corporation
|
|
|
|
#
|
2017-01-19 09:01:01 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2016-02-18 23:40:55 +08:00
|
|
|
#
|
|
|
|
|
|
|
|
menuconfig BMA280
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "BMA280 Three Axis Accelerometer Family"
|
2017-09-22 02:28:16 +08:00
|
|
|
depends on I2C
|
2016-02-18 23:40:55 +08:00
|
|
|
help
|
2016-04-19 21:53:37 +08:00
|
|
|
Enable driver for BMA280 I2C-based triaxial accelerometer sensor
|
|
|
|
family.
|
|
|
|
|
2018-09-13 06:23:26 +08:00
|
|
|
if BMA280
|
|
|
|
|
2016-04-19 21:53:37 +08:00
|
|
|
choice
|
|
|
|
prompt "Chip type"
|
|
|
|
default BMA280_CHIP_BMA280
|
|
|
|
help
|
|
|
|
Choose desired chip type from the BMA280 family.
|
|
|
|
|
|
|
|
config BMA280_CHIP_BMA280
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "BMA280"
|
2016-04-19 21:53:37 +08:00
|
|
|
help
|
|
|
|
Choose this option to enable the BMA280 chip.
|
|
|
|
|
|
|
|
config BMA280_CHIP_BMC150_ACCEL
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "BMC150_ACCEL"
|
2016-04-19 21:53:37 +08:00
|
|
|
help
|
|
|
|
Choose this option to enable the accelerometer of the BMC150 chip.
|
|
|
|
|
|
|
|
endchoice
|
2016-02-18 23:40:55 +08:00
|
|
|
|
|
|
|
config BMA280_NAME
|
2018-08-14 22:19:20 +08:00
|
|
|
string "Driver name"
|
2016-04-19 21:53:37 +08:00
|
|
|
default "BMA280" if BMA280_CHIP_BMA280
|
|
|
|
default "BMC150_ACCEL" if BMA280_CHIP_BMC150_ACCEL
|
2016-02-18 23:40:55 +08:00
|
|
|
help
|
2016-04-19 21:53:37 +08:00
|
|
|
Device name with which the sensor is identified.
|
2016-02-18 23:40:55 +08:00
|
|
|
|
2016-10-05 20:45:54 +08:00
|
|
|
config BMA280_I2C_ADDR
|
|
|
|
hex "BMA280 I2C address"
|
|
|
|
default 0x18 if BMA280_CHIP_BMA280
|
|
|
|
default 0x10 if BMA280_CHIP_BMC150_ACCEL
|
2016-02-18 23:40:55 +08:00
|
|
|
help
|
|
|
|
I2C address of the BMA280 sensor.
|
|
|
|
|
2016-10-05 20:45:54 +08:00
|
|
|
0x10: Use if the SDO pin is pulled to GND.
|
|
|
|
0x10: Use if the SDO pin is pulled to VDDIO.
|
|
|
|
0x18: Use if the SDO pin is pulled to GND.
|
|
|
|
0x19: Use if the SDO pin is pulled to VDDIO.
|
2016-02-18 23:40:55 +08:00
|
|
|
|
|
|
|
config BMA280_I2C_MASTER_DEV_NAME
|
2018-08-14 22:19:20 +08:00
|
|
|
string "I2C master device name"
|
2016-04-23 23:06:05 +08:00
|
|
|
default "I2C_0"
|
2016-02-18 23:40:55 +08:00
|
|
|
help
|
2016-04-19 21:53:37 +08:00
|
|
|
Specify the device name of the I2C master device to which chip is
|
2016-02-18 23:40:55 +08:00
|
|
|
connected.
|
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "Trigger mode"
|
2016-11-10 23:05:53 +08:00
|
|
|
default BMA280_TRIGGER_GLOBAL_THREAD
|
2016-02-18 23:40:55 +08:00
|
|
|
help
|
|
|
|
Specify the type of triggering to be used by the driver.
|
|
|
|
|
|
|
|
config BMA280_TRIGGER_NONE
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "No trigger"
|
2016-02-18 23:40:55 +08:00
|
|
|
|
2016-11-10 23:05:53 +08:00
|
|
|
config BMA280_TRIGGER_GLOBAL_THREAD
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "Use global thread"
|
2016-11-05 03:47:32 +08:00
|
|
|
depends on GPIO
|
2016-02-18 23:40:55 +08:00
|
|
|
select BMA280_TRIGGER
|
|
|
|
|
2016-11-10 23:05:53 +08:00
|
|
|
config BMA280_TRIGGER_OWN_THREAD
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "Use own thread"
|
2016-02-18 23:40:55 +08:00
|
|
|
depends on GPIO
|
|
|
|
select BMA280_TRIGGER
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config BMA280_TRIGGER
|
|
|
|
bool
|
|
|
|
|
|
|
|
config BMA280_GPIO_DEV_NAME
|
2018-08-14 22:19:20 +08:00
|
|
|
string "GPIO device"
|
2016-02-18 23:40:55 +08:00
|
|
|
default "GPIO_0"
|
2018-09-13 06:23:26 +08:00
|
|
|
depends on BMA280_TRIGGER
|
2016-02-18 23:40:55 +08:00
|
|
|
help
|
2016-04-19 21:53:37 +08:00
|
|
|
The device name of the GPIO device to which the chip's interrupt pins
|
2016-02-18 23:40:55 +08:00
|
|
|
are connected.
|
|
|
|
|
|
|
|
config BMA280_GPIO_PIN_NUM
|
2018-08-14 22:19:20 +08:00
|
|
|
int "Interrupt GPIO pin number"
|
2016-02-18 23:40:55 +08:00
|
|
|
default 0
|
2018-09-13 06:23:26 +08:00
|
|
|
depends on BMA280_TRIGGER
|
2016-02-18 23:40:55 +08:00
|
|
|
help
|
2016-04-19 21:53:37 +08:00
|
|
|
The number of the GPIO on which the interrupt signal from the chip
|
|
|
|
will be received.
|
2016-02-18 23:40:55 +08:00
|
|
|
|
2016-11-10 23:05:53 +08:00
|
|
|
config BMA280_THREAD_PRIORITY
|
2018-08-14 22:19:20 +08:00
|
|
|
int "Thread priority"
|
2018-09-13 06:23:26 +08:00
|
|
|
depends on BMA280_TRIGGER_OWN_THREAD
|
2016-02-18 23:40:55 +08:00
|
|
|
default 10
|
|
|
|
help
|
2016-11-10 23:05:53 +08:00
|
|
|
Priority of thread used by the driver to handle interrupts.
|
2016-02-18 23:40:55 +08:00
|
|
|
|
2016-11-10 23:05:53 +08:00
|
|
|
config BMA280_THREAD_STACK_SIZE
|
2018-08-14 22:19:20 +08:00
|
|
|
int "Thread stack size"
|
2018-09-13 06:23:26 +08:00
|
|
|
depends on BMA280_TRIGGER_OWN_THREAD
|
2016-02-18 23:40:55 +08:00
|
|
|
default 1024
|
|
|
|
help
|
2016-11-10 23:05:53 +08:00
|
|
|
Stack size of thread used by the driver to handle interrupts.
|
2016-02-18 23:40:55 +08:00
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "Acceleration measurement range"
|
|
|
|
default BMA280_PMU_RANGE_2G
|
|
|
|
help
|
|
|
|
Measurement range for acceleration values.
|
|
|
|
|
|
|
|
config BMA280_PMU_RANGE_2G
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "+/-2g"
|
2016-02-18 23:40:55 +08:00
|
|
|
|
|
|
|
config BMA280_PMU_RANGE_4G
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "+/-4g"
|
2016-02-18 23:40:55 +08:00
|
|
|
|
|
|
|
config BMA280_PMU_RANGE_8G
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "+/-8g"
|
2016-02-18 23:40:55 +08:00
|
|
|
|
|
|
|
config BMA280_PMU_RANGE_16G
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "+/-16g"
|
2016-02-18 23:40:55 +08:00
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "Acceleration data filter bandwidth"
|
|
|
|
default BMA280_PMU_BW_7
|
|
|
|
help
|
|
|
|
Bandwidth of filtered acceleration data.
|
|
|
|
|
|
|
|
config BMA280_PMU_BW_1
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "7.81Hz"
|
2016-02-18 23:40:55 +08:00
|
|
|
|
|
|
|
config BMA280_PMU_BW_2
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "15.63HZ"
|
2016-02-18 23:40:55 +08:00
|
|
|
|
|
|
|
config BMA280_PMU_BW_3
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "31.25Hz"
|
2016-02-18 23:40:55 +08:00
|
|
|
|
|
|
|
config BMA280_PMU_BW_4
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "62.5Hz"
|
2016-02-18 23:40:55 +08:00
|
|
|
|
|
|
|
config BMA280_PMU_BW_5
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "125Hz"
|
2016-02-18 23:40:55 +08:00
|
|
|
|
|
|
|
config BMA280_PMU_BW_6
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "250HZ"
|
2016-02-18 23:40:55 +08:00
|
|
|
|
|
|
|
config BMA280_PMU_BW_7
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "500Hz"
|
2016-02-18 23:40:55 +08:00
|
|
|
|
|
|
|
config BMA280_PMU_BW_8
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "unfiltered"
|
2016-02-18 23:40:55 +08:00
|
|
|
|
|
|
|
endchoice
|
2018-09-13 06:23:26 +08:00
|
|
|
|
|
|
|
endif # BMA280
|