simple CCS811 driver

Dependencies:   AMS_ENS210_temp_humid_sensor

Dependents:   TBSense2_Sensor_Demo

Fork of AMS_CCS811_gas_sensor by Marcus Lee

Revision:
14:0e8f5bf68b50
Parent:
13:a74306788df7
Child:
15:cf658680c53f
--- a/AMS_CCS811.cpp	Tue Jan 24 15:09:29 2017 +0000
+++ b/AMS_CCS811.cpp	Thu May 04 13:08:54 2017 +0000
@@ -423,7 +423,7 @@
 }
 
 bool AMS_CCS811::write_config() {
-    char cmd[1] = {0 | (_int_data_enabled << 3) | (_mode << 4)};
+    char cmd[1] = {0 | (_int_data_enabled ? 1 << 3 : 0) | (_mode << 4)};
     return i2c_write(MEAS_MODE, cmd, 1) == 1;
 }