Skip to content

Commit 2c85b3a

Browse files
committed
drivers: sensor: wsen_isds_2536030320001: add sensor driver
Add wsen_isds_2536030320001 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>
1 parent 4bd1d39 commit 2c85b3a

14 files changed

+1959
-0
lines changed

drivers/sensor/wsen/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
# zephyr-keep-sorted-start
66
add_subdirectory_ifdef(CONFIG_WSEN_HIDS_2525020210002 wsen_hids_2525020210002)
7+
add_subdirectory_ifdef(CONFIG_WSEN_ISDS_2536030320001 wsen_isds_2536030320001)
78
add_subdirectory_ifdef(CONFIG_WSEN_ITDS_2533020201601 wsen_itds_2533020201601)
89
add_subdirectory_ifdef(CONFIG_WSEN_PADS_2511020213301 wsen_pads_2511020213301)
910
add_subdirectory_ifdef(CONFIG_WSEN_PDUS_25131308XXXXX wsen_pdus_25131308XXXXX)

drivers/sensor/wsen/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
# zephyr-keep-sorted-start
66
source "drivers/sensor/wsen/wsen_hids_2525020210002/Kconfig"
7+
source "drivers/sensor/wsen/wsen_isds_2536030320001/Kconfig"
78
source "drivers/sensor/wsen/wsen_itds_2533020201601/Kconfig"
89
source "drivers/sensor/wsen/wsen_pads_2511020213301/Kconfig"
910
source "drivers/sensor/wsen/wsen_pdus_25131308XXXXX/Kconfig"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copyright (c) 2025 Würth Elektronik eiSos GmbH & Co. KG
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
zephyr_library()
5+
6+
zephyr_library_sources(wsen_isds_2536030320001.c)
7+
zephyr_library_sources_ifdef(CONFIG_WSEN_ISDS_2536030320001_TRIGGER wsen_isds_2536030320001_trigger.c)
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Copyright (c) 2025 Würth Elektronik eiSos GmbH & Co. KG
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
menuconfig WSEN_ISDS_2536030320001
5+
bool "WSEN-ISDS 3D accelerometer and 3D gyroscope sensor"
6+
default y
7+
depends on DT_HAS_WE_WSEN_ISDS_2536030320001_ENABLED
8+
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_WE_WSEN_ISDS_2536030320001),i2c)
9+
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_WE_WSEN_ISDS_2536030320001),spi)
10+
select HAS_WESENSORS
11+
help
12+
Enable driver for the WSEN-ISDS I2C/SPI-based 3D accelerometer and 3D gyroscope sensor
13+
with integrated temperature sensor.
14+
15+
if WSEN_ISDS_2536030320001
16+
17+
config WSEN_ISDS_2536030320001_DISABLE_ACCEL_HIGH_PERFORMANCE_MODE
18+
bool "Disable accelerometer high performance mode"
19+
help
20+
Disables accelerometer high performance mode. If high performance mode is disabled,
21+
the ODR is used to switch between power modes as follows:
22+
- 1.6 Hz - 52 Hz Low power mode
23+
- 104 Hz - 208 Hz Normal power mode
24+
- 416 Hz - 6.66 kHz High performance mode
25+
26+
config WSEN_ISDS_2536030320001_DISABLE_GYRO_HIGH_PERFORMANCE_MODE
27+
bool "Disable gyroscope high performance mode"
28+
help
29+
Disables gyroscope high performance mode. If high performance mode is disabled,
30+
the ODR is used to switch between power modes as follows:
31+
- 12.5 Hz - 52 Hz Low power mode
32+
- 104 Hz - 208 Hz Normal power mode
33+
- 416 Hz - 6.66 kHz High performance mode
34+
35+
choice WSEN_ISDS_2536030320001_TRIGGER_MODE
36+
prompt "Trigger mode"
37+
default WSEN_ISDS_2536030320001_TRIGGER_NONE
38+
help
39+
Specify the type of triggering to be used by the driver.
40+
41+
config WSEN_ISDS_2536030320001_TRIGGER_NONE
42+
bool "No trigger"
43+
44+
config WSEN_ISDS_2536030320001_TRIGGER_GLOBAL_THREAD
45+
bool "Use global thread"
46+
depends on GPIO
47+
select WSEN_ISDS_2536030320001_TRIGGER
48+
49+
config WSEN_ISDS_2536030320001_TRIGGER_OWN_THREAD
50+
bool "Use own thread"
51+
depends on GPIO
52+
select WSEN_ISDS_2536030320001_TRIGGER
53+
54+
endchoice # WSEN_ISDS_2536030320001_TRIGGER_MODE
55+
56+
config WSEN_ISDS_2536030320001_TRIGGER
57+
bool
58+
59+
config WSEN_ISDS_2536030320001_EVENTS
60+
bool
61+
62+
config WSEN_ISDS_2536030320001_THREAD_PRIORITY
63+
int "Thread priority"
64+
depends on WSEN_ISDS_2536030320001_TRIGGER_OWN_THREAD
65+
default 10
66+
help
67+
Priority of thread used by the driver to handle interrupts.
68+
69+
config WSEN_ISDS_2536030320001_THREAD_STACK_SIZE
70+
int "Thread stack size"
71+
depends on WSEN_ISDS_2536030320001_TRIGGER_OWN_THREAD
72+
default 1024
73+
help
74+
Stack size of thread used by the driver to handle interrupts.
75+
76+
config WSEN_ISDS_2536030320001_TAP
77+
bool "Tap and double tap detection"
78+
depends on WSEN_ISDS_2536030320001_TRIGGER
79+
select WSEN_ISDS_2536030320001_EVENTS
80+
help
81+
Enable tap (single/double) detection
82+
Note that the recommended ODRs for tap recognition are 416 Hz and 833 Hz.
83+
84+
config WSEN_ISDS_2536030320001_FREEFALL
85+
bool "Free-fall detection"
86+
depends on WSEN_ISDS_2536030320001_TRIGGER
87+
select WSEN_ISDS_2536030320001_EVENTS
88+
help
89+
Enable free-fall detection
90+
91+
config WSEN_ISDS_2536030320001_DELTA
92+
bool "Wake-up detection (SENSOR_TRIG_DELTA)"
93+
depends on WSEN_ISDS_2536030320001_TRIGGER
94+
select WSEN_ISDS_2536030320001_EVENTS
95+
help
96+
Enable wake-up detection (SENSOR_TRIG_DELTA)
97+
98+
endif # WSEN_ISDS_2536030320001

0 commit comments

Comments
 (0)