Skip to content

Commit

Permalink
drivers: sensor: SCD4x Add driver
Browse files Browse the repository at this point in the history
This adds support for Sensirion's SCD4x co2 sensor.

Signed-off-by: Jan Faeh <[email protected]>
  • Loading branch information
jfaeh authored and nashif committed Nov 19, 2024
1 parent 428db04 commit 2efc859
Show file tree
Hide file tree
Showing 10 changed files with 1,143 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/sensor/sensirion/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

# zephyr-keep-sorted-start
add_subdirectory_ifdef(CONFIG_SCD4X scd4x)
add_subdirectory_ifdef(CONFIG_SGP40 sgp40)
add_subdirectory_ifdef(CONFIG_SHT3XD sht3xd)
add_subdirectory_ifdef(CONFIG_SHT4X sht4x)
Expand Down
1 change: 1 addition & 0 deletions drivers/sensor/sensirion/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

# zephyr-keep-sorted-start
source "drivers/sensor/sensirion/scd4x/Kconfig"
source "drivers/sensor/sensirion/sgp40/Kconfig"
source "drivers/sensor/sensirion/sht3xd/Kconfig"
source "drivers/sensor/sensirion/sht4x/Kconfig"
Expand Down
5 changes: 5 additions & 0 deletions drivers/sensor/sensirion/scd4x/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SPDX-License-Identifier: Apache-2.0

zephyr_library()

zephyr_library_sources(scd4x.c)
13 changes: 13 additions & 0 deletions drivers/sensor/sensirion/scd4x/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Drivers configuration options for Sensirion SCD4x

# Copyright (c) 2024 Jan Fäh
# SPDX-License-Identifier: Apache-2.0

config SCD4X
bool "SCD4x Carbon Dioxide Sensor"
default y
depends on DT_HAS_SENSIRION_SCD41_ENABLED || DT_HAS_SENSIRION_SCD40_ENABLED
select I2C
select CRC
help
Enable driver for the Sensirion SCD4x carbon dioxide sensors.
Loading

0 comments on commit 2efc859

Please sign in to comment.