Library for using the AMS TSL45315 Ambient Light Sensor

Files at this revision

API Documentation at this revision

Comitter:
ajenal
Date:
Wed Mar 26 16:20:25 2014 +0000
Parent:
2:2946a5d334a0
Commit message:
some minor docu changes

Changed in this revision

tsl45315.cpp Show annotated file Show diff for this revision Revisions of this file
tsl45315.hpp Show annotated file Show diff for this revision Revisions of this file
--- a/tsl45315.cpp	Tue Mar 25 10:56:45 2014 +0000
+++ b/tsl45315.cpp	Wed Mar 26 16:20:25 2014 +0000
@@ -79,7 +79,7 @@
     _i2c.write(I2C_ADDR, cmd, 1);
     _i2c.read(I2C_ADDR, id, 1);
 
-    devID = ( id[0]&0xF0 );
+    devID = ( id[0]&0xF0 );   
 }
 
 void TSL45315::getLuxData( )
--- a/tsl45315.hpp	Tue Mar 25 10:56:45 2014 +0000
+++ b/tsl45315.hpp	Wed Mar 26 16:20:25 2014 +0000
@@ -34,11 +34,12 @@
  * @code
  * #include "mbed.h"
  * #include "tsl45315.hpp"
+ 
  * Serial pc(USBTX, USBRX);
  * //TSL45x::TSL45315 sensor(p9, p10);
  * //TSL45x::TSL45315 sensor(p9, p10, M1);
  * TSL45x::TSL45315 sensor(p9, p10, I2C_FREQ, 0.5);
- * //TSL45x::TSL45315 sensor(p9, p10, I2C_FREQ, 1.0, M1);
+ * //TSL45x::TSL45315 sensor(p9, p10, I2C_FREQ, 0.5, M1);
  *
  * int main( void )
  * {
@@ -67,7 +68,7 @@
     uint32_t lux;
     uint8_t devID;
     uint8_t multiplier;
-
+    
 public:
     /** Create a TSL45315 instance without variable integration time ( set to M1)
     *   with integrated ticker to repeatedly update the illumination value. 
@@ -130,7 +131,7 @@
 
     /** reads out the ID register and saves the id in the variable devID
     */
-    void getIDdata();
+    void getIDdata( );
     
     /** @returns the ID of the device
     */
@@ -150,6 +151,7 @@
     int getMultiplier( ) {
         return multiplier;
     };
+    
 };
 }