Library for the MAX44000 Ambient Light Sensor / Proximity Detector

Dependents:   LED_Demo LED_Demo2 LED_Demo

Fork of BMP180 by Kevin Gillepsie

MAX44000 Device Driver

Files at this revision

API Documentation at this revision

Comitter:
switches
Date:
Wed Sep 21 12:00:34 2016 +0000
Parent:
3:1d508b290354
Commit message:
Set TRIM bit in init function to use factory calibration data.

Changed in this revision

MAX44000.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 1d508b290354 -r a9f09252653a MAX44000.cpp
--- a/MAX44000.cpp	Tue Sep 20 22:02:02 2016 +0000
+++ b/MAX44000.cpp	Wed Sep 21 12:00:34 2016 +0000
@@ -78,7 +78,7 @@
     }
 
     data[0] = REG_MAIN_CONFIG;
-    data[1] = ((mode & 0x07)<<2) | 0x20;  // Set bit 5 to use factory trim data
+    data[1] = ((mode & 0x07)<<2) | (1<<5);  // Set bit 5 to use factory trim data
     if (i2c_->write(I2C_ADDR, data, 2) != 0) {
         return -1;
     }