Library to communicate with a ST LIS331DLH

Revision:
5:3443fb9646bd
Parent:
4:c3df518a938e
Child:
6:53e92e7fc073
--- 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);
     
 }