drivers: sensor: Add MH-Z19B CO2 sensor driver

Add MH-Z19B CO2 sensor driver.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Co-Authored-By: Azamlukman <azamlukmanabdullah@gmail.com>
This commit is contained in:
Yong Cong Sin 2021-10-30 01:15:56 +08:00 committed by Carles Cufí
commit 26f7b9c1ea
9 changed files with 511 additions and 0 deletions

View file

@ -0,0 +1,33 @@
/*
* Copyright (c) 2021 G-Technologies Sdn. Bhd.
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief Extended public API for MH-Z19B CO2 Sensor
*
* Some capabilities and operational requirements for this sensor
* cannot be expressed within the sensor driver abstraction.
*/
#ifndef ZEPHYR_INCLUDE_DRIVERS_SENSOR_MHZ19B_H_
#define ZEPHYR_INCLUDE_DRIVERS_SENSOR_MHZ19B_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <drivers/sensor.h>
enum sensor_attribute_mhz19b {
/** Automatic Baseline Correction Self Calibration Function. */
SENSOR_ATTR_MHZ19B_ABC = SENSOR_ATTR_PRIV_START,
};
#ifdef __cplusplus
}
#endif
#endif /* ZEPHYR_INCLUDE_DRIVERS_SENSOR_MHZ19B_H_ */