A quick adaptation of a library made for Arduino by Fabio Varesano Interface a Honeywell HMC58X3 magnetometer to a mbed via i2c.

Dependents:   FreeIMU FreeIMU

Fork of HMC58X3 by Aloïs Wolff

Files at this revision

API Documentation at this revision

Comitter:
tyftyftyf
Date:
Wed Mar 28 20:25:51 2018 +0000
Parent:
6:02c679492d35
Child:
8:ca00fa66673a
Commit message:
wip

Changed in this revision

HMC58X3.cpp Show annotated file Show diff for this revision Revisions of this file
HMC58X3.h Show annotated file Show diff for this revision Revisions of this file
--- a/HMC58X3.cpp	Wed Mar 07 04:12:45 2018 +0000
+++ b/HMC58X3.cpp	Wed Mar 28 20:25:51 2018 +0000
@@ -30,9 +30,9 @@
 
 //#define DEBUG (1)
 
+#include "HMC58X3.h"
 #include "mbed.h"
 #include "MODI2C.h"
-#include "HMC58X3.h"
 #include "rtos.h"
 #include <new>
 //#include <DebugUtils.h>
--- a/HMC58X3.h	Wed Mar 07 04:12:45 2018 +0000
+++ b/HMC58X3.h	Wed Mar 28 20:25:51 2018 +0000
@@ -34,6 +34,9 @@
 #ifndef HMC58X3_h
 #define HMC58X3_h
 
+#include "mbed.h"
+#include "MODI2C.h"
+
 #ifndef I2C_SDA
     #define I2C_SDA p28
     #define I2C_SCL p27