Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
/dts/bindings/can/ @alexanderwachter
/dts/bindings/*/nordic* @anangl
/dts/bindings/*/nxp* @MaureenHelm
/dts/bindings/sensor/st,* @avisconti
/ext/fs/ @nashif @ramakrishnapallala
/ext/hal/cmsis/ @MaureenHelm @galak
/ext/hal/libmetal/ @galak
Expand Down
1 change: 1 addition & 0 deletions drivers/sensor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ add_subdirectory_ifdef(CONFIG_LPS25HB lps25hb)
add_subdirectory_ifdef(CONFIG_LSM303DLHC_MAGN lsm303dlhc_magn)
add_subdirectory_ifdef(CONFIG_LSM6DS0 lsm6ds0)
add_subdirectory_ifdef(CONFIG_LSM6DSL lsm6dsl)
add_subdirectory_ifdef(CONFIG_LSM6DSO lsm6dso)
add_subdirectory_ifdef(CONFIG_LSM9DS0_GYRO lsm9ds0_gyro)
add_subdirectory_ifdef(CONFIG_LSM9DS0_MFD lsm9ds0_mfd)
add_subdirectory_ifdef(CONFIG_MAX30101 max30101)
Expand Down
2 changes: 2 additions & 0 deletions drivers/sensor/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ source "drivers/sensor/lsm6ds0/Kconfig"

source "drivers/sensor/lsm6dsl/Kconfig"

source "drivers/sensor/lsm6dso/Kconfig"

source "drivers/sensor/lsm9ds0_gyro/Kconfig"

source "drivers/sensor/lsm9ds0_mfd/Kconfig"
Expand Down
13 changes: 13 additions & 0 deletions drivers/sensor/lsm6dso/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# ST Microelectronics LSM6DSO 6-axis IMU sensor driver
#
# Copyright (c) 2019 STMicroelectronics
#
# SPDX-License-Identifier: Apache-2.0
#
zephyr_library()

zephyr_library_sources_ifdef(CONFIG_LSM6DSO lsm6dso.c)
zephyr_library_sources_ifdef(CONFIG_LSM6DSO lsm6dso_i2c.c)
zephyr_library_sources_ifdef(CONFIG_LSM6DSO lsm6dso_spi.c)
zephyr_library_sources_ifdef(CONFIG_LSM6DSO_SENSORHUB lsm6dso_shub.c)
zephyr_library_sources_ifdef(CONFIG_LSM6DSO_TRIGGER lsm6dso_trigger.c)
172 changes: 172 additions & 0 deletions drivers/sensor/lsm6dso/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
# ST Microelectronics LSM6DSO 6-axis IMU sensor driver
#
# Copyright (c) 2019 STMicroelectronics
#
# SPDX-License-Identifier: Apache-2.0
#
menuconfig LSM6DSO
bool "LSM6DSO I2C/SPI accelerometer and gyroscope Chip"
depends on (I2C && HAS_DTS_I2C) || (SPI && HAS_DTS_SPI)
help
Enable driver for LSM6DSO accelerometer and gyroscope
sensor.

if LSM6DSO

choice LSM6DSO_TRIGGER_MODE
prompt "Trigger mode"
help
Specify the type of triggering to be used by the driver.

config LSM6DSO_TRIGGER_NONE
bool "No trigger"

config LSM6DSO_TRIGGER_GLOBAL_THREAD
bool "Use global thread"
depends on GPIO
select LSM6DSO_TRIGGER

config LSM6DSO_TRIGGER_OWN_THREAD
bool "Use own thread"
depends on GPIO
select LSM6DSO_TRIGGER

endchoice

config LSM6DSO_TRIGGER
bool

if LSM6DSO_TRIGGER

config LSM6DSO_THREAD_PRIORITY
int "Thread priority"
depends on LSM6DSO_TRIGGER_OWN_THREAD
default 10
help
Priority of thread used by the driver to handle interrupts.

config LSM6DSO_THREAD_STACK_SIZE
int "Thread stack size"
depends on LSM6DSO_TRIGGER_OWN_THREAD
default 1024
help
Stack size of thread used by the driver to handle interrupts.

choice
prompt "Sensor INT pin number"
default LSM6DSO_INT_PIN_1
help
The number of LSM6DSO int pin used to generate interrupt to cpu.
Supported values are int1 or int2

config LSM6DSO_INT_PIN_1
bool "int1"

config LSM6DSO_INT_PIN_2
bool "int2"
endchoice

endif # LSM6DSO_TRIGGER

config LSM6DSO_ENABLE_TEMP
bool "Enable temperature"
help
Enable/disable temperature

config LSM6DSO_SENSORHUB
bool "Enable I2C sensorhub feature"
default n
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 LSM6DSO_SENSORHUB

config LSM6DSO_EXT_LIS2MDL
bool "Enable LIS2MDL as external sensor"
default y

config LSM6DSO_EXT_LPS22HH
bool "Enable LPS22HH as external sensor"
default y

config LSM6DSO_EXT_HTS221
bool "Enable HTS221 as external sensor"
default n

config LSM6DSO_EXT_LPS22HB
bool "Enable LPS22HB as external sensor"
default n

endif #LSM6DSO_SENSORHUB

menu "Attributes"

config LSM6DSO_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 LSM6DSO_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 LSM6DSO_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 LSM6DSO_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 # LSM6DSO
Loading