2020-03-06 17:54:25 +08:00
|
|
|
# ST Microelectronics ISM330DHCX 6-axis IMU sensor driver
|
|
|
|
|
|
|
|
# Copyright (c) 2020 STMicroelectronics
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
menuconfig ISM330DHCX
|
|
|
|
bool "ISM330DHCX I2C/SPI accelerometer and gyroscope Chip"
|
2020-09-18 22:21:59 +08:00
|
|
|
depends on I2C || SPI
|
2020-03-06 17:54:25 +08:00
|
|
|
select HAS_STMEMSC
|
|
|
|
select USE_STDC_ISM330DHCX
|
|
|
|
help
|
|
|
|
Enable driver for ISM330DHCX accelerometer and gyroscope
|
|
|
|
sensor.
|
|
|
|
|
|
|
|
if ISM330DHCX
|
|
|
|
|
|
|
|
choice ISM330DHCX_TRIGGER_MODE
|
|
|
|
prompt "Trigger mode"
|
|
|
|
help
|
|
|
|
Specify the type of triggering to be used by the driver.
|
|
|
|
|
|
|
|
config ISM330DHCX_TRIGGER_NONE
|
|
|
|
bool "No trigger"
|
|
|
|
|
|
|
|
config ISM330DHCX_TRIGGER_GLOBAL_THREAD
|
|
|
|
bool "Use global thread"
|
|
|
|
depends on GPIO
|
|
|
|
select ISM330DHCX_TRIGGER
|
|
|
|
|
|
|
|
config ISM330DHCX_TRIGGER_OWN_THREAD
|
|
|
|
bool "Use own thread"
|
|
|
|
depends on GPIO
|
|
|
|
select ISM330DHCX_TRIGGER
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config ISM330DHCX_TRIGGER
|
|
|
|
bool
|
|
|
|
|
|
|
|
if ISM330DHCX_TRIGGER
|
|
|
|
|
|
|
|
config ISM330DHCX_THREAD_PRIORITY
|
|
|
|
int "Thread priority"
|
|
|
|
depends on ISM330DHCX_TRIGGER_OWN_THREAD
|
|
|
|
default 10
|
|
|
|
help
|
|
|
|
Priority of thread used by the driver to handle interrupts.
|
|
|
|
|
|
|
|
config ISM330DHCX_THREAD_STACK_SIZE
|
|
|
|
int "Thread stack size"
|
|
|
|
depends on ISM330DHCX_TRIGGER_OWN_THREAD
|
|
|
|
default 1024
|
|
|
|
help
|
|
|
|
Stack size of thread used by the driver to handle interrupts.
|
|
|
|
|
|
|
|
choice ISM330DHCX_INT_PIN
|
|
|
|
prompt "Sensor INT pin number"
|
|
|
|
default ISM330DHCX_INT_PIN_1
|
|
|
|
help
|
|
|
|
The number of ISM330DHCX int pin used to generate interrupt to cpu.
|
|
|
|
Supported values are int1 or int2
|
|
|
|
|
|
|
|
config ISM330DHCX_INT_PIN_1
|
|
|
|
bool "int1"
|
|
|
|
|
|
|
|
config ISM330DHCX_INT_PIN_2
|
|
|
|
bool "int2"
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
endif # ISM330DHCX_TRIGGER
|
|
|
|
|
|
|
|
config ISM330DHCX_ENABLE_TEMP
|
|
|
|
bool "Enable temperature"
|
|
|
|
help
|
|
|
|
Enable/disable temperature
|
|
|
|
|
|
|
|
config ISM330DHCX_SENSORHUB
|
|
|
|
bool "Enable I2C sensorhub feature"
|
|
|
|
help
|
|
|
|
Enable/disable internal sensorhub. You can enable
|
|
|
|
a maximum of two external sensors (if more than two are enabled
|
|
|
|
the system would enumerate only the first two found)
|
|
|
|
|
|
|
|
if ISM330DHCX_SENSORHUB
|
|
|
|
|
|
|
|
config ISM330DHCX_EXT_LIS2MDL
|
|
|
|
bool "Enable LIS2MDL as external sensor"
|
|
|
|
|
|
|
|
config ISM330DHCX_EXT_IIS2MDC
|
|
|
|
bool "Enable IIS2MDC as external sensor"
|
|
|
|
|
|
|
|
config ISM330DHCX_EXT_LPS22HH
|
|
|
|
bool "Enable LPS22HH as external sensor"
|
|
|
|
|
|
|
|
config ISM330DHCX_EXT_HTS221
|
|
|
|
bool "Enable HTS221 as external sensor"
|
|
|
|
|
|
|
|
config ISM330DHCX_EXT_LPS22HB
|
|
|
|
bool "Enable LPS22HB as external sensor"
|
|
|
|
|
|
|
|
endif # ISM330DHCX_SENSORHUB
|
|
|
|
|
|
|
|
menu "Attributes"
|
|
|
|
|
|
|
|
config ISM330DHCX_GYRO_FS
|
|
|
|
int "Gyroscope full-scale range"
|
|
|
|
default 0
|
|
|
|
help
|
|
|
|
Specify the default gyroscope full-scale range.
|
|
|
|
An X value for the config represents a range of +/- X degree per
|
|
|
|
second. Valid values are:
|
|
|
|
0: Full Scale selected at runtime
|
|
|
|
125: +/- 125dps
|
|
|
|
250: +/- 250dps
|
|
|
|
500: +/- 500dps
|
|
|
|
1000: +/- 1000dps
|
|
|
|
2000: +/- 2000dps
|
|
|
|
|
|
|
|
config ISM330DHCX_GYRO_ODR
|
|
|
|
int "Gyroscope Output data rate frequency"
|
|
|
|
range 0 10
|
|
|
|
default 0
|
|
|
|
help
|
|
|
|
Specify the default accelerometer output data rate expressed in
|
|
|
|
samples per second (Hz).
|
|
|
|
0: ODR selected at runtime
|
|
|
|
1: 12.5Hz
|
|
|
|
2: 26Hz
|
|
|
|
3: 52Hz
|
|
|
|
4: 104Hz
|
|
|
|
5: 208Hz
|
|
|
|
6: 416Hz
|
|
|
|
7: 833Hz
|
|
|
|
8: 1660Hz
|
|
|
|
9: 3330Hz
|
|
|
|
10: 6660Hz
|
|
|
|
|
|
|
|
config ISM330DHCX_ACCEL_FS
|
|
|
|
int "Accelerometer full-scale range"
|
|
|
|
default 0
|
|
|
|
help
|
|
|
|
Specify the default accelerometer full-scale range.
|
|
|
|
An X value for the config represents a range of +/- X G. Valid values
|
|
|
|
are:
|
|
|
|
0: Full Scale selected at runtime
|
|
|
|
2: +/- 2g
|
|
|
|
4: +/- 4g
|
|
|
|
8: +/- 8g
|
|
|
|
16: +/- 16g
|
|
|
|
|
|
|
|
config ISM330DHCX_ACCEL_ODR
|
|
|
|
int "Accelerometer Output data rate frequency"
|
|
|
|
range 0 10
|
|
|
|
default 0
|
|
|
|
help
|
|
|
|
Specify the default accelerometer output data rate expressed in
|
|
|
|
samples per second (Hz).
|
|
|
|
0: ODR selected at runtime
|
|
|
|
1: 12.5Hz
|
|
|
|
2: 26Hz
|
|
|
|
3: 52Hz
|
|
|
|
4: 104Hz
|
|
|
|
5: 208Hz
|
|
|
|
6: 416Hz
|
|
|
|
7: 833Hz
|
|
|
|
8: 1660Hz
|
|
|
|
9: 3330Hz
|
|
|
|
10: 6660Hz
|
|
|
|
endmenu
|
|
|
|
|
|
|
|
endif # ISM330DHCX
|