-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers: sensor: lis2dux12: Add lis2dux12 driver
Adds support for the STMicroelectronics LIS2DUX12 3-axis accelerometer. Signed-off-by: Kyle Dunn <[email protected]>
- Loading branch information
Showing
19 changed files
with
915 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.