summaryrefslogtreecommitdiff
path: root/src/drivers/ao_hmc5883.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/ao_hmc5883.h')
-rw-r--r--src/drivers/ao_hmc5883.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/drivers/ao_hmc5883.h b/src/drivers/ao_hmc5883.h
index 399ddcdd..2ec27dd9 100644
--- a/src/drivers/ao_hmc5883.h
+++ b/src/drivers/ao_hmc5883.h
@@ -24,6 +24,9 @@
#define HMC5883_CONFIG_A 0
#define HMC5883_CONFIG_B 1
#define HMC5883_MODE 2
+#define HMC5883_MODE_CONTINUOUS 0
+#define HMC5883_MODE_SINGLE 1
+#define HMC5883_MODE_IDLE 2
#define HMC5883_X_MSB 3
#define HMC5883_X_LSB 4
#define HMC5883_Y_MSB 5
@@ -35,6 +38,10 @@
#define HMC5883_ID_B 11
#define HMC5883_ID_C 12
+struct ao_hmc5883_sample {
+ int16_t x, y, z;
+};
+
void
ao_hmc5883_init(void);