Skip to content

Commit 2efc859

Browse files
jfaehnashif
authored andcommitted
drivers: sensor: SCD4x Add driver
This adds support for Sensirion's SCD4x co2 sensor. Signed-off-by: Jan Faeh <[email protected]>
1 parent 428db04 commit 2efc859

File tree

10 files changed

+1143
-0
lines changed

10 files changed

+1143
-0
lines changed

drivers/sensor/sensirion/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
# zephyr-keep-sorted-start
5+
add_subdirectory_ifdef(CONFIG_SCD4X scd4x)
56
add_subdirectory_ifdef(CONFIG_SGP40 sgp40)
67
add_subdirectory_ifdef(CONFIG_SHT3XD sht3xd)
78
add_subdirectory_ifdef(CONFIG_SHT4X sht4x)

drivers/sensor/sensirion/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
# zephyr-keep-sorted-start
5+
source "drivers/sensor/sensirion/scd4x/Kconfig"
56
source "drivers/sensor/sensirion/sgp40/Kconfig"
67
source "drivers/sensor/sensirion/sht3xd/Kconfig"
78
source "drivers/sensor/sensirion/sht4x/Kconfig"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
zephyr_library()
4+
5+
zephyr_library_sources(scd4x.c)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Drivers configuration options for Sensirion SCD4x
2+
3+
# Copyright (c) 2024 Jan Fäh
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
config SCD4X
7+
bool "SCD4x Carbon Dioxide Sensor"
8+
default y
9+
depends on DT_HAS_SENSIRION_SCD41_ENABLED || DT_HAS_SENSIRION_SCD40_ENABLED
10+
select I2C
11+
select CRC
12+
help
13+
Enable driver for the Sensirion SCD4x carbon dioxide sensors.

0 commit comments

Comments
 (0)