Driver for Sensirion SCD30, CO2 sensor module using I2C. The device also senses Temperature and Humidity.

Dependents:   scd30_HelloWorld scd30_HelloWorld

Revision:
1:24bb922e179c
Parent:
0:2a16832400d0
--- a/scd30.h	Mon Sep 10 17:51:13 2018 +0000
+++ b/scd30.h	Thu Sep 13 17:38:26 2018 +0000
@@ -49,7 +49,7 @@
      * Structure to access SCD30's raw and finished data
      *
      */    
-    typedef struct {
+    struct scdSTRuct {
         uint16_t co2m;          /**< High order 16 bit word of CO2 */
         uint16_t co2l;          /**< Low  order 16 bit word of CO2 */
         uint16_t tempm;         /**< High order 16 bit word of Temp */
@@ -69,7 +69,7 @@
         
         uint16_t acode;         /**< Article code number?? */
         uint8_t sn[24];         /**< ASCII Serial Number */
-    } SCD30_str;
+    } scdSTR;
     
     
     /** Create a SCD30 object using the specified I2C object
@@ -115,21 +115,21 @@
     
     /** Get Ready Status register 
      *
-     * @param Pointer to SCD30_str structure
-     * @see Ready Status result in SCD30_str structure
+     * @param --none--
+     * @see Ready Status result in scdSTR structure
      *
      * @return enum SCDerror
      */
-    uint8_t getReadyStatus(SCD30_str& sSTR);
+    uint8_t getReadyStatus();
     
     /** Get all environmental parameters (CO2, Temp and Hum) 
      *
-     * @param Pointer to SCD30_str structure
-     * @see Results in SCD30_str structure
+     * @param --none-
+     * @see Results in scdSTR structure
      *
      * @return enum SCDerror
      */
-    uint8_t readMeasurement(SCD30_str& sSTR);
+    uint8_t readMeasurement();
     
     /** Set Temperature offset
      *
@@ -182,21 +182,21 @@
     
     /** Get Article Code
      *
-     * @param Pointer to SCD30_str structure
+     * @param --none--
      * 
      *
      * @return enum SCDerror
      */
-    uint8_t getArticleCode(SCD30_str& sSTR);
+    uint8_t getArticleCode();
     
     /** Get Serial Number
      *
-     * @param Pointer to SCD30_str structure
-     * @see ASCII Serial Number in SCD30_str structure
+     * @param --none--
+     * @see ASCII Serial Number in scdSTR structure
      *
      * @return enum SCDerror
      */
-    uint8_t getSerialNumber(SCD30_str& sSTR);
+    uint8_t getSerialNumber();
  
 private:
     char i2cBuff[34];