Skip to content

Commit

Permalink
drivers: sensor: wsen_itds_2533020201601: add sensor driver
Browse files Browse the repository at this point in the history
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
wm-eisos committed Aug 21, 2024
1 parent 41620c0 commit 9b847bb
Show file tree
Hide file tree
Showing 14 changed files with 1,751 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/sensor/wsen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# zephyr-keep-sorted-start
add_subdirectory_ifdef(CONFIG_WSEN_HIDS_2525020210001 wsen_hids_2525020210001)
add_subdirectory_ifdef(CONFIG_WSEN_HIDS_2525020210002 wsen_hids_2525020210002)
add_subdirectory_ifdef(CONFIG_WSEN_ITDS_2533020201601 wsen_itds_2533020201601)
add_subdirectory_ifdef(CONFIG_WSEN_PADS_2511020213301 wsen_pads_2511020213301)
add_subdirectory_ifdef(CONFIG_WSEN_PDUS_25131308XXXXX wsen_pdus_25131308XXXXX)
add_subdirectory_ifdef(CONFIG_WSEN_TIDS_2521020222501 wsen_tids_2521020222501)
Expand Down
1 change: 1 addition & 0 deletions drivers/sensor/wsen/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# zephyr-keep-sorted-start
source "drivers/sensor/wsen/wsen_hids_2525020210001/Kconfig"
source "drivers/sensor/wsen/wsen_hids_2525020210002/Kconfig"
source "drivers/sensor/wsen/wsen_itds_2533020201601/Kconfig"
source "drivers/sensor/wsen/wsen_pads_2511020213301/Kconfig"
source "drivers/sensor/wsen/wsen_pdus_25131308XXXXX/Kconfig"
source "drivers/sensor/wsen/wsen_tids_2521020222501/Kconfig"
Expand Down
7 changes: 7 additions & 0 deletions drivers/sensor/wsen/wsen_itds_2533020201601/CMakeLists.txt
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)
80 changes: 80 additions & 0 deletions drivers/sensor/wsen/wsen_itds_2533020201601/Kconfig
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
Loading

0 comments on commit 9b847bb

Please sign in to comment.