totally useless

Dependents:   Final_Homework1 ee202Homework1 EE202A_Homework1

Fork of MAG3110 by Andrew Lindsay

Revision:
5:34cf17e4dbf5
Parent:
4:cf40601402b7
--- a/MAG3110.h	Fri May 24 20:16:24 2013 +0000
+++ b/MAG3110.h	Sat Feb 08 22:18:07 2014 +0000
@@ -50,10 +50,10 @@
 #define MAG_3110_SAMPLE0_625 0xE0
 
 // How many samples to average (lowers data rate)
-#define MAG_3110_OVERSAMPLE1 0
-#define MAG_3110_OVERSAMPLE2 0x08
-#define MAG_3110_OVERSAMPLE3 0x10
-#define MAG_3110_OVERSAMPLE4 0x18
+#define MAG_3110_OVERSAMPLE1 0         //16
+#define MAG_3110_OVERSAMPLE2 0x08      //32, sample rate decrease to half
+#define MAG_3110_OVERSAMPLE3 0x10      //64, sample rate decrease to 1/4
+#define MAG_3110_OVERSAMPLE4 0x18      //128 sample rate decrease to 1/8
 
 // read only 1 byte per axis
 #define MAG_3110_FASTREAD 0x04
@@ -99,6 +99,11 @@
      * Setup the Magnetometer
      *
      */
+    MAG3110(PinName sda, PinName scl,float dateRate, int overSample);
+    void Overwrite_dr_osr(float dateRate,int overSample);
+    void Setdr(float dateRate);
+    void Setosr(int overSample);
+    
     void begin();
     /**
      * Read a register, return its value as int
@@ -139,6 +144,8 @@
     Serial *_pc;
     bool _debug;
     int _avgX, _avgY;
+    char dr;       //date rate
+    char osr;      //over sample rate
 
 };
 #endif