Skip to content

drivers: sensor: wsen_isds_2536030320001: add sensor driver #92517

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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/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_2525020210002 wsen_hids_2525020210002)
add_subdirectory_ifdef(CONFIG_WSEN_ISDS_2536030320001 wsen_isds_2536030320001)
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)
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_2525020210002/Kconfig"
source "drivers/sensor/wsen/wsen_isds_2536030320001/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"
Expand Down
7 changes: 7 additions & 0 deletions drivers/sensor/wsen/wsen_isds_2536030320001/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright (c) 2025 Würth Elektronik eiSos GmbH & Co. KG
# SPDX-License-Identifier: Apache-2.0

zephyr_library()

zephyr_library_sources(wsen_isds_2536030320001.c)
zephyr_library_sources_ifdef(CONFIG_WSEN_ISDS_2536030320001_TRIGGER wsen_isds_2536030320001_trigger.c)
98 changes: 98 additions & 0 deletions drivers/sensor/wsen/wsen_isds_2536030320001/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Copyright (c) 2025 Würth Elektronik eiSos GmbH & Co. KG
# SPDX-License-Identifier: Apache-2.0

menuconfig WSEN_ISDS_2536030320001
bool "WSEN-ISDS 3D accelerometer and 3D gyroscope sensor"
default y
depends on DT_HAS_WE_WSEN_ISDS_2536030320001_ENABLED
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_WE_WSEN_ISDS_2536030320001),i2c)
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_WE_WSEN_ISDS_2536030320001),spi)
select HAS_WESENSORS
help
Enable driver for the WSEN-ISDS I2C/SPI-based 3D accelerometer and 3D gyroscope sensor
with integrated temperature sensor.

if WSEN_ISDS_2536030320001

config WSEN_ISDS_2536030320001_DISABLE_ACCEL_HIGH_PERFORMANCE_MODE
bool "Disable accelerometer high performance mode"
help
Disables accelerometer high performance mode. If high performance mode is disabled,
the ODR is used to switch between power modes as follows:
- 1.6 Hz - 52 Hz Low power mode
- 104 Hz - 208 Hz Normal power mode
- 416 Hz - 6.66 kHz High performance mode

config WSEN_ISDS_2536030320001_DISABLE_GYRO_HIGH_PERFORMANCE_MODE
bool "Disable gyroscope high performance mode"
help
Disables gyroscope high performance mode. If high performance mode is disabled,
the ODR is used to switch between power modes as follows:
- 12.5 Hz - 52 Hz Low power mode
- 104 Hz - 208 Hz Normal power mode
- 416 Hz - 6.66 kHz High performance mode

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

config WSEN_ISDS_2536030320001_TRIGGER_NONE
bool "No trigger"

config WSEN_ISDS_2536030320001_TRIGGER_GLOBAL_THREAD
bool "Use global thread"
depends on GPIO
select WSEN_ISDS_2536030320001_TRIGGER

config WSEN_ISDS_2536030320001_TRIGGER_OWN_THREAD
bool "Use own thread"
depends on GPIO
select WSEN_ISDS_2536030320001_TRIGGER

endchoice # WSEN_ISDS_2536030320001_TRIGGER_MODE

config WSEN_ISDS_2536030320001_TRIGGER
bool

config WSEN_ISDS_2536030320001_EVENTS
bool

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

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

config WSEN_ISDS_2536030320001_TAP
bool "Tap and double tap detection"
depends on WSEN_ISDS_2536030320001_TRIGGER
select WSEN_ISDS_2536030320001_EVENTS
help
Enable tap (single/double) detection
Note that the recommended ODRs for tap recognition are 416 Hz and 833 Hz.

config WSEN_ISDS_2536030320001_FREEFALL
bool "Free-fall detection"
depends on WSEN_ISDS_2536030320001_TRIGGER
select WSEN_ISDS_2536030320001_EVENTS
help
Enable free-fall detection

config WSEN_ISDS_2536030320001_DELTA
bool "Wake-up detection (SENSOR_TRIG_DELTA)"
depends on WSEN_ISDS_2536030320001_TRIGGER
select WSEN_ISDS_2536030320001_EVENTS
help
Enable wake-up detection (SENSOR_TRIG_DELTA)

endif # WSEN_ISDS_2536030320001
Loading