LAURUS / Mbed 2 deprecated LAURUS_program

Dependencies:   mbed SDFileSystem ConfigFile

Revision:
0:bc6f14fc60c7
Child:
1:6cd6d2760856
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HMC5883L/HMC5883L.h	Fri May 15 17:24:32 2015 +0000
@@ -0,0 +1,32 @@
+#pragma once
+
+const static int hmc_addr = 0x3c;
+
+typedef union {
+    char reg[6];
+    struct {
+        uint8_t mag_x_L;
+        uint8_t mag_x_H;
+        uint8_t mag_y_L;
+        uint8_t mag_y_H;
+        uint8_t mag_z_L;
+        uint8_t mag_z_H;
+    } byte;
+    
+    int16_t value[3];
+    
+} HMC_DATA;
+
+class HMC5883L {
+public:
+    HMC5883L(I2C* i2c);
+    ~HMC5883L();
+    
+    int init();
+    int read();
+    
+    HMC_DATA data;
+    
+private:
+    I2C* i2c;
+};
\ No newline at end of file