Modified MAG3110 with individual X, Y, and Z sampling

Dependents:   test

Fork of MAG3110 by Andrew Lindsay

Revision:
4:cf40601402b7
Parent:
3:bc784c24f3b2
Child:
5:b81ec73cd601
--- a/MAG3110.h	Fri May 24 20:11:50 2013 +0000
+++ b/MAG3110.h	Fri May 24 20:16:24 2013 +0000
@@ -81,18 +81,18 @@
 {
 public:
     /**
-     * MAG3110 constructor
+     * Main constructor
      * @param sda SDA pin
      * @param sdl SCL pin
      * @param addr addr of the I2C peripheral
      */
     MAG3110(PinName sda, PinName scl);
     /**
-     * MAG3110 constructor
+     * Debug version of constructor
      * @param sda SDA pin
      * @param sdl SCL pin
-     * @param addr addr of the I2C peripheral
-     * @param pc serial port object to output debug messages
+     * @param addr Address of the I2C peripheral
+     * @param pc Serial object to output debug messages
      */
     MAG3110(PinName sda, PinName scl, Serial *pc); //pass serial for debug
     /**
@@ -134,8 +134,8 @@
     void setCalibration(int minX, int maxX, int minY, int maxY);
 
 private:
+    I2C _i2c;
     int _i2c_address;
-    I2C _i2c;
     Serial *_pc;
     bool _debug;
     int _avgX, _avgY;