forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers: sensor: Add icm40627 6-axis accelerometer driver
Initial driver for the icm40627 from Invensense/TDK, a 6-axis accelerometer with gyroscope and temperature sensing capabilities. Signed-off-by: Florijan Plohl <florijan.plohl@norik.com>
- Loading branch information
Showing
12 changed files
with
1,487 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,10 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
zephyr_library() | ||
|
||
zephyr_library_sources( | ||
icm40627.c | ||
icm40627_i2c.c | ||
) | ||
|
||
zephyr_library_sources_ifdef(CONFIG_ICM40627_TRIGGER icm40627_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,58 @@ | ||
# ICM40627 Six-Axis Motion Tracking device configuration options | ||
# | ||
# Copyright 2024 PHYTEC America, LLC | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
menuconfig ICM40627 | ||
bool "ICM40627 Six-Axis Motion Tracking Device" | ||
default y | ||
depends on DT_HAS_INVENSENSE_ICM40627_ENABLED | ||
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_INVENSENSE_ICM40627),spi) | ||
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_INVENSENSE_ICM40627),i2c) | ||
help | ||
Enable driver for ICM40627 SPI-based six-axis motion tracking device. | ||
|
||
if ICM40627 | ||
|
||
choice ICM40627_TRIGGER_MODE | ||
prompt "Trigger mode" | ||
default ICM40627_TRIGGER_NONE | ||
help | ||
Specify the type of triggering to be used by the driver. | ||
|
||
config ICM40627_TRIGGER_NONE | ||
bool "No trigger" | ||
|
||
config ICM40627_TRIGGER_GLOBAL_THREAD | ||
bool "Use global thread" | ||
depends on GPIO | ||
depends on $(dt_compat_any_has_prop,$(DT_COMPAT_INVENSENSE_ICM40627),int-gpios) | ||
select ICM40627_TRIGGER | ||
|
||
config ICM40627_TRIGGER_OWN_THREAD | ||
bool "Use own thread" | ||
depends on GPIO | ||
depends on $(dt_compat_any_has_prop,$(DT_COMPAT_INVENSENSE_ICM40627),int-gpios) | ||
select ICM40627_TRIGGER | ||
|
||
endchoice | ||
|
||
config ICM40627_TRIGGER | ||
bool | ||
|
||
config ICM40627_THREAD_PRIORITY | ||
int "Thread priority" | ||
depends on ICM40627_TRIGGER_OWN_THREAD | ||
default 10 | ||
help | ||
Priority of thread used by the driver to handle interrupts. | ||
|
||
config ICM40627_THREAD_STACK_SIZE | ||
int "Thread stack size" | ||
depends on ICM40627_TRIGGER_OWN_THREAD | ||
default 1024 | ||
help | ||
Stack size of thread used by the driver to handle interrupts. | ||
|
||
endif # ICM40627 |
Oops, something went wrong.