-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers: sensor: wsen_itds_2533020201601: add sensor driver
Add wsen_itds_2533020201601 driver with the corrected name and compatibility with the hal update as well as added new features. Signed-off-by: Wajdi ELMuhtadi <wajdi.elmuhtadi@we-online.com>
- Loading branch information
Showing
14 changed files
with
1,751 additions
and
0 deletions.
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,7 @@ | ||
# Copyright (c) 2023 Würth Elektronik eiSos GmbH & Co. KG | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
zephyr_library() | ||
|
||
zephyr_library_sources(wsen_itds_2533020201601.c) | ||
zephyr_library_sources_ifdef(CONFIG_WSEN_ITDS_2533020201601_TRIGGER wsen_itds_2533020201601_trigger.c) |
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,80 @@ | ||
# Copyright (c) 2023 Würth Elektronik eiSos GmbH & Co. KG | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
menuconfig WSEN_ITDS_2533020201601 | ||
bool "WSEN-ITDS-2533020201601 3-axis acceleration sensor" | ||
default y | ||
depends on DT_HAS_WE_WSEN_ITDS_2533020201601_ENABLED | ||
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_WE_WSEN_ITDS_2533020201601),i2c) | ||
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_WE_WSEN_ITDS_2533020201601),spi) | ||
select HAS_WESENSORS | ||
help | ||
Enable driver for the WSEN-ITDS I2C/SPI-based acceleration sensor with integrated | ||
temperature sensor. | ||
|
||
if WSEN_ITDS_2533020201601 | ||
|
||
choice WSEN_ITDS_2533020201601_TRIGGER_MODE | ||
prompt "Trigger mode" | ||
default WSEN_ITDS_2533020201601_TRIGGER_NONE | ||
help | ||
Specify the type of triggering to be used by the driver. | ||
|
||
config WSEN_ITDS_2533020201601_TRIGGER_NONE | ||
bool "No trigger" | ||
|
||
config WSEN_ITDS_2533020201601_TRIGGER_GLOBAL_THREAD | ||
bool "Use global thread" | ||
depends on GPIO | ||
select WSEN_ITDS_2533020201601_TRIGGER | ||
|
||
config WSEN_ITDS_2533020201601_TRIGGER_OWN_THREAD | ||
bool "Use own thread" | ||
depends on GPIO | ||
select WSEN_ITDS_2533020201601_TRIGGER | ||
|
||
endchoice # WSEN_ITDS_2533020201601_TRIGGER_MODE | ||
|
||
config WSEN_ITDS_2533020201601_TRIGGER | ||
bool | ||
|
||
config WSEN_ITDS_2533020201601_EVENTS | ||
bool | ||
|
||
config WSEN_ITDS_2533020201601_THREAD_PRIORITY | ||
int "Thread priority" | ||
depends on WSEN_ITDS_2533020201601_TRIGGER_OWN_THREAD | ||
default 10 | ||
help | ||
Priority of thread used by the driver to handle interrupts. | ||
|
||
config WSEN_ITDS_2533020201601_THREAD_STACK_SIZE | ||
int "Thread stack size" | ||
depends on WSEN_ITDS_2533020201601_TRIGGER_OWN_THREAD | ||
default 1024 | ||
help | ||
Stack size of thread used by the driver to handle interrupts. | ||
|
||
config WSEN_ITDS_2533020201601_TAP | ||
bool "Tap and double tap detection" | ||
depends on WSEN_ITDS_2533020201601_TRIGGER | ||
select WSEN_ITDS_2533020201601_EVENTS | ||
help | ||
Enable tap (single/double) detection | ||
Note that the minimum ODR required for using the tap recognition functionality is 400 Hz. | ||
|
||
config WSEN_ITDS_2533020201601_FREEFALL | ||
bool "Free-fall detection" | ||
depends on WSEN_ITDS_2533020201601_TRIGGER | ||
select WSEN_ITDS_2533020201601_EVENTS | ||
help | ||
Enable free-fall detection | ||
|
||
config WSEN_ITDS_2533020201601_DELTA | ||
bool "Wake-up detection (SENSOR_TRIG_DELTA)" | ||
depends on WSEN_ITDS_2533020201601_TRIGGER | ||
select WSEN_ITDS_2533020201601_EVENTS | ||
help | ||
Enable wake-up detection (SENSOR_TRIG_DELTA) | ||
|
||
endif # WSEN_ITDS_2533020201601 |
Oops, something went wrong.