Skip to content
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

sensor: add TI FDC2X1X sensor driver and sample application #31056

Merged
merged 2 commits into from
Mar 17, 2021
Merged
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/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ add_subdirectory_ifdef(CONFIG_CCS811 ccs811)
add_subdirectory_ifdef(CONFIG_DHT dht)
add_subdirectory_ifdef(CONFIG_DPS310 dps310)
add_subdirectory_ifdef(CONFIG_ENS210 ens210)
add_subdirectory_ifdef(CONFIG_FDC2X1X fdc2x1x)
add_subdirectory_ifdef(CONFIG_FXAS21002 fxas21002)
add_subdirectory_ifdef(CONFIG_FXOS8700 fxos8700)
add_subdirectory(grove)
Expand Down
2 changes: 2 additions & 0 deletions drivers/sensor/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ source "drivers/sensor/dps310/Kconfig"

source "drivers/sensor/ens210/Kconfig"

source "drivers/sensor/fdc2x1x/Kconfig"

source "drivers/sensor/fxas21002/Kconfig"

source "drivers/sensor/fxos8700/Kconfig"
Expand Down
9 changes: 9 additions & 0 deletions drivers/sensor/fdc2x1x/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# Copyright (c) 2020 arithmetics.io
#
# SPDX-License-Identifier: Apache-2.0
#
zephyr_library()

zephyr_library_sources_ifdef(CONFIG_FDC2X1X fdc2x1x.c)
zephyr_library_sources_ifdef(CONFIG_FDC2X1X_TRIGGER fdc2x1x_trigger.c)
52 changes: 52 additions & 0 deletions drivers/sensor/fdc2x1x/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# FDC2X1X Capacitance-to-Digital Converter configuration options

# Copyright (c) 2020 arithmetics.io
# SPDX-License-Identifier: Apache-2.0

menuconfig FDC2X1X
bool "FDC2X1X Capacitance-to-Digital Converter"
depends on I2C && NEWLIB_LIBC
help
Enable driver for FDC2X1X Capacitance-to-Digital Converter.

if FDC2X1X

choice
prompt "Trigger mode"
default FDC2X1X_TRIGGER_NONE
help
Specify the type of triggering used by the driver.

config FDC2X1X_TRIGGER_NONE
bool "No trigger"

config FDC2X1X_TRIGGER_GLOBAL_THREAD
bool "Use global thread"
depends on GPIO
select FDC2X1X_TRIGGER

config FDC2X1X_TRIGGER_OWN_THREAD
bool "Use own thread"
depends on GPIO
select FDC2X1X_TRIGGER

endchoice

config FDC2X1X_TRIGGER
bool

config FDC2X1X_THREAD_PRIORITY
int "Thread priority"
depends on FDC2X1X_TRIGGER_OWN_THREAD && FDC2X1X_TRIGGER
default 10
help
Priority of thread used by the driver to handle interrupts.

config FDC2X1X_THREAD_STACK_SIZE
int "Thread stack size"
depends on FDC2X1X_TRIGGER_OWN_THREAD && FDC2X1X_TRIGGER
default 1024
help
Stack size of thread used by the driver to handle interrupts.

endif # FDC2X1X
Loading