Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: sensors: add ST lis2dux12 accelerometer support #65259

Merged
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 drivers/sensor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ add_subdirectory_ifdef(CONFIG_LIS2DH lis2dh)
add_subdirectory_ifdef(CONFIG_LIS2DE12 lis2de12)
add_subdirectory_ifdef(CONFIG_LIS2DS12 lis2ds12)
add_subdirectory_ifdef(CONFIG_LIS2DU12 lis2du12)
add_subdirectory_ifdef(CONFIG_LIS2DUX12 lis2dux12)
add_subdirectory_ifdef(CONFIG_LIS2DW12 lis2dw12)
add_subdirectory_ifdef(CONFIG_LIS2MDL lis2mdl)
add_subdirectory_ifdef(CONFIG_LIS3MDL lis3mdl)
Expand Down
1 change: 1 addition & 0 deletions drivers/sensor/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ source "drivers/sensor/lis2dh/Kconfig"
source "drivers/sensor/lis2de12/Kconfig"
source "drivers/sensor/lis2ds12/Kconfig"
source "drivers/sensor/lis2du12/Kconfig"
source "drivers/sensor/lis2dux12/Kconfig"
source "drivers/sensor/lis2dw12/Kconfig"
source "drivers/sensor/lis2mdl/Kconfig"
source "drivers/sensor/lis3mdl/Kconfig"
Expand Down
8 changes: 8 additions & 0 deletions drivers/sensor/lis2dux12/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SPDX-License-Identifier: Apache-2.0

zephyr_library()

zephyr_library_sources(lis2dux12.c)
zephyr_library_sources_ifdef(CONFIG_LIS2DUX12_TRIGGER lis2dux12_trigger.c)

zephyr_library_include_directories(../stmemsc)
30 changes: 30 additions & 0 deletions drivers/sensor/lis2dux12/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# ST Microelectronics LIS2DUX12 3-axis accelerometer driver

# Copyright (c) 2024 STMicroelectronics
# SPDX-License-Identifier: Apache-2.0

menuconfig LIS2DUX12
bool "LIS2DUX12 I2C/SPI accelerometer sensor driver"
default y
depends on DT_HAS_ST_LIS2DUX12_ENABLED
depends on ZEPHYR_HAL_ST_MODULE
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2DUX12),i2c)
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2DUX12),spi)
select HAS_STMEMSC
select USE_STDC_LIS2DUX12
help
Enable driver for LIS2DUX12 accelerometer sensor driver

if LIS2DUX12

module = LIS2DUX12
thread_priority = 10
thread_stack_size = 1024
source "drivers/sensor/Kconfig.trigger_template"

config LIS2DUX12_ENABLE_TEMP
bool "Temperature"
help
Enable/disable temperature

endif # LIS2DUX12
Loading
Loading