Minor modifications to adapt syntax to FreeIMU

Fork of L3G4200D by Michael Shimniok

Revision:
4:d9e8ea9b4e20
Parent:
3:14914cd8fdf3
diff -r 14914cd8fdf3 -r d9e8ea9b4e20 L3G4200D.cpp
--- a/L3G4200D.cpp	Tue Jan 24 16:58:52 2012 +0000
+++ b/L3G4200D.cpp	Mon Jun 24 19:44:01 2013 +0000
@@ -41,9 +41,11 @@
 // Public Methods //////////////////////////////////////////////////////////////
 
 // Constructor
-L3G4200D::L3G4200D(PinName sda, PinName scl):
-    _device(sda, scl)
+//L3G4200D::L3G4200D(PinName sda, PinName scl):
+//    _device(sda, scl)
+L3G4200D::L3G4200D(I2C i2c_):_device(i2c_)
 {
+    //this->_device = i2c_;
     _device.frequency(400000);
     // Turns on the L3G4200D's gyro and places it in normal mode.
     // 0x0F = 0b00001111
@@ -96,4 +98,16 @@
     g[0] = (short) (xha << 8 | xla);
     g[1] = (short) (yha << 8 | yla);
     g[2] = (short) (zha << 8 | zla);
+}
+
+void L3G4200D::read(int *x,int *y,int *z)
+{
+
+int g[3];
+read(g);
+
+*x=g[0];
+*y=g[0];
+*z=g[0];
+
 }
\ No newline at end of file