Library to communicate with a ST LIS331DLH

Files at this revision

API Documentation at this revision

Comitter:
atommota
Date:
Fri Jan 07 16:37:00 2011 +0000
Parent:
4:c3df518a938e
Child:
6:53e92e7fc073
Commit message:
Fixed declaration bug

Changed in this revision

LIS331.cpp Show annotated file Show diff for this revision Revisions of this file
LIS331.h Show annotated file Show diff for this revision Revisions of this file
--- a/LIS331.cpp	Fri Jan 07 16:31:35 2011 +0000
+++ b/LIS331.cpp	Fri Jan 07 16:37:00 2011 +0000
@@ -93,34 +93,34 @@
 }
 
 
-void LIS331:setFullScaleRange8g(void){  // Does not preserve rest of CTRL_REG_4!
+void LIS331::setFullScaleRange8g(void){  // Does not preserve rest of CTRL_REG_4!
 
     char tx[2];
     tx[0] = CTRL_REG_4;
     tx[1] = 0x30;
         
-    i2c_.write((LIS331_I2C_ADDRESS << 1) & 0xFE, &tx, 2);
+    i2c_.write((LIS331_I2C_ADDRESS << 1) & 0xFE, tx, 2);
     
 }
 
-void LIS331:setFullScaleRange4g(void){  // Does not preserve rest of CTRL_REG_4!
+void LIS331::setFullScaleRange4g(void){  // Does not preserve rest of CTRL_REG_4!
 
     char tx[2];
     tx[0] = CTRL_REG_4;
     tx[1] = 0x10;
         
-    i2c_.write((LIS331_I2C_ADDRESS << 1) & 0xFE, &tx, 2);
+    i2c_.write((LIS331_I2C_ADDRESS << 1) & 0xFE, tx, 2);
     
 }
     
 
-void LIS331:setFullScaleRange2g(void){  // Does not preserve rest of CTRL_REG_4!
+void LIS331::setFullScaleRange2g(void){  // Does not preserve rest of CTRL_REG_4!
 
     char tx[2];
     tx[0] = CTRL_REG_4;
     tx[1] = 0x00;
         
-    i2c_.write((LIS331_I2C_ADDRESS << 1) & 0xFE, &tx, 2);
+    i2c_.write((LIS331_I2C_ADDRESS << 1) & 0xFE, tx, 2);
     
 }
 
--- a/LIS331.h	Fri Jan 07 16:31:35 2011 +0000
+++ b/LIS331.h	Fri Jan 07 16:37:00 2011 +0000
@@ -164,6 +164,13 @@
      * @return 
      *
      */
+     
+     
+     
+    void setFullScaleRange8g(void);
+    void setFullScaleRange4g(void);
+    void setFullScaleRange2g(void);
+     
             
     char getAccelStatus(void);