drivers: sensor: SGP40 Added support

This adds support for Sensirion's SGP40 multipixel gas sensor.

Signed-off-by: Leonard Pollak <leonardp@tr-host.de>
This commit is contained in:
Leonard Pollak 2021-04-28 16:11:50 +02:00 committed by Christopher Friedt
commit 0d7cb32c58
10 changed files with 438 additions and 0 deletions

View file

@ -0,0 +1,33 @@
/*
* Copyright (c) 2021, Leonard Pollak
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief Extended public API for Sensirion's SGP40 gas sensor
*
* This exposes two attributes for the SGP40 which can be used for
* setting the on-chip Temperature and Humidity compensation parameters.
*/
#ifndef ZEPHYR_INCLUDE_DRIVERS_SENSOR_SGP40_H_
#define ZEPHYR_INCLUDE_DRIVERS_SENSOR_SGP40_H_
#ifdef __cplusplus
extern "C" {
#endif
enum sensor_attribute_sgp40 {
/* Temperature in degC; only the integer part is used */
SENSOR_ATTR_SGP40_TEMPERATURE = SENSOR_ATTR_PRIV_START,
/* Relative Humidity in %; only the integer part is used */
SENSOR_ATTR_SGP40_HUMIDITY
};
#ifdef __cplusplus
}
#endif
#endif /* ZEPHYR_INCLUDE_DRIVERS_SENSOR_SGP40_H_ */