ok

Fork of HMC5843 by Jose R Padron

Revision:
2:fdab96fc6fff
Parent:
0:ae7d06398888
--- a/HMC5843.h	Sat Oct 23 23:39:03 2010 +0000
+++ b/HMC5843.h	Tue Nov 09 23:18:46 2010 +0000
@@ -1,6 +1,6 @@
 /**
  * @author Jose R. Padron
- *@author Used HMC5843 library  developed by Aaron Berk as template
+ * @author Used HMC5843 library  developed by Aaron Berk as template
  * @section LICENSE
  *
  * Copyright (c) 2010 ARM Limited
@@ -139,15 +139,7 @@
      */
     void setDefault();
     
-    
-    
-    /**
-     * Perform Self Test.
-     *
-     */
-   // void SelfTest();
-
-    
+       
     /**
      * Read the memory location on the device which contains the address.
      *
@@ -172,21 +164,46 @@
      /**
      * Write to  on the device.
      *
-       * @param address Address to write to.
+     * @param address Address to write to.
      * @param data Data to write.
      */
+    
     void write(int address, int data);
 
-     /* Get the output of all three axes.
+     /**
+     * Get the output of all three axes.
      *
      * @param Pointer to a buffer to hold the magnetics value for the
      *        x-axis, y-axis and z-axis [in that order].
      */
     void readData(int* readings);
     
-  /* Get the current operation mode.
+    /**
+     * Get the output of X axis.
+     *
+     * @return x-axis magnetic value
+     */
+    int getMx();
+    
+    /**
+     * Get the output of Y axis.
      *
-     * @return Staus register values
+     * @return y-axis magnetic value
+     */
+    int getMy();
+    
+    /**
+     * Get the output of Z axis.
+     *
+     * @return z-axis magnetic value
+     */
+    int getMz();
+   
+    
+    /**
+     * Get the current operation mode.
+     *
+     * @return Status register values
      */
     int getStatus(void);