Vishay VEML6040 Color RGB sensor I2C driver library

Dependents:   test_VEML6040 testSensor

Revision:
2:239c3561d21a
Parent:
1:5540b216acfc
Child:
4:f5b142e3fe79
--- a/VEML6040.cpp	Wed Mar 08 04:45:35 2017 +0000
+++ b/VEML6040.cpp	Fri May 19 02:50:57 2017 +0000
@@ -63,7 +63,7 @@
     buf[0] = cmd ;
     buf[1] = data[0] ;
     buf[2] = data[1] ;
-    writeRegs(data, 3) ;
+    writeRegs(buf, 3) ;
 }
 
 //
@@ -83,7 +83,7 @@
 {
     uint8_t data[2] ;
     readRegs(REG_COLOR_CONF, data, 2) ;
-    *colorconf = data[1] ;
+    *colorconf = data[0] ;
 }
 
 void VEML6040::setCOLORConf(uint8_t colorconf)