Setup structure for scd30 driver
This commit is contained in:
parent
2caa6d6baa
commit
6ea2ead13e
|
@ -6,5 +6,6 @@ set(BOARD minico2)
|
||||||
|
|
||||||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
||||||
|
|
||||||
|
add_subdirectory(drivers)
|
||||||
project(minico2)
|
project(minico2)
|
||||||
target_sources(app PRIVATE src/main.c)
|
target_sources(app PRIVATE src/main.c)
|
||||||
|
|
|
@ -45,6 +45,15 @@
|
||||||
scl-gpios = <&gpio0 33 GPIO_OPEN_DRAIN>;
|
scl-gpios = <&gpio0 33 GPIO_OPEN_DRAIN>;
|
||||||
pinctrl-0 = <&i2c0_default>;
|
pinctrl-0 = <&i2c0_default>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
|
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
scd30: scd30@61 {
|
||||||
|
status = "okay";
|
||||||
|
compatible = "sensirion,scd30";
|
||||||
|
reg = <0x61>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&spi2 {
|
&spi2 {
|
||||||
|
@ -56,6 +65,7 @@
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
|
|
||||||
epd: sd16xxfb@0 {
|
epd: sd16xxfb@0 {
|
||||||
|
status = "okay";
|
||||||
compatible = "gooddisplay,gdey0213b74", "solomon,ssd1680";
|
compatible = "gooddisplay,gdey0213b74", "solomon,ssd1680";
|
||||||
spi-max-frequency = <4000000>;
|
spi-max-frequency = <4000000>;
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
|
|
1
drivers/CMakeLists.txt
Normal file
1
drivers/CMakeLists.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
add_subdirectory_ifdef(CONFIG_SENSOR sensor)
|
3
drivers/Kconfig
Normal file
3
drivers/Kconfig
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
menu "Drivers"
|
||||||
|
rsource "sensor/Kconfig"
|
||||||
|
endmenu
|
1
drivers/sensor/CMakeLists.txt
Normal file
1
drivers/sensor/CMakeLists.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
add_subdirectory_ifdef(CONFIG_SCD30 scd30)
|
3
drivers/sensor/Kconfig
Normal file
3
drivers/sensor/Kconfig
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
if SENSOR
|
||||||
|
rsource "scd30/Kconfig"
|
||||||
|
endif
|
3
drivers/sensor/scd30/CMakeLists.txt
Normal file
3
drivers/sensor/scd30/CMakeLists.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
zephyr_library()
|
||||||
|
|
||||||
|
zephyr_library_sources(scd30.c)
|
8
drivers/sensor/scd30/Kconfig
Normal file
8
drivers/sensor/scd30/Kconfig
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
config SCD30
|
||||||
|
bool "SCD30 CO2, Temperature, and Humidity Sensor"
|
||||||
|
default y
|
||||||
|
depends on DT_HAS_SENSIRION_SCD30_ENABLED
|
||||||
|
select I2C
|
||||||
|
select CRC
|
||||||
|
help
|
||||||
|
Enable driver for the SCD30 CO2, temperature, and humidity sensors.
|
0
drivers/sensor/scd30/scd30.c
Normal file
0
drivers/sensor/scd30/scd30.c
Normal file
3
dts/bindings/sensirion,scd30.yaml
Normal file
3
dts/bindings/sensirion,scd30.yaml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
description: Sensirion SCD30 CO2, humidity, and temperature sensor
|
||||||
|
compatible: "sensirion,scd30"
|
||||||
|
include: [sensor-device.yaml, i2c-device.yaml]
|
Loading…
Reference in a new issue