Add functions to get Mx, My and Mz.
Dependents: 9DOF-Stick aigamozu_program_ver2 aigamozu_program_ver2_yokokawa aigamozu_auto_ver1 ... more
Diff: HMC5843.h
- Revision:
- 2:fdab96fc6fff
- Parent:
- 0:ae7d06398888
diff -r 65e41eb3c291 -r fdab96fc6fff HMC5843.h --- 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);