From 5b0cb66688d5621171abc9ceb7c1747736d1d6a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atle=20H=2E=20Havs=C3=B8?= Date: Tue, 29 Jul 2014 20:41:42 +0200 Subject: Working sensor data pull from hmc5983 --- drivers/hmc5983.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/hmc5983.h b/drivers/hmc5983.h index 3d05e9c..9398f23 100644 --- a/drivers/hmc5983.h +++ b/drivers/hmc5983.h @@ -14,9 +14,9 @@ class HMC5983 { void read_register(uint8_t reg, uint8_t len, uint8_t *data) { cs.off(); if (len > 1) { - spi.transfer_byte(reg | (1 << 8) | (1 << 7)); + spi.transfer_byte(reg | (1 << 7) | (1 << 6)); } else { - spi.transfer_byte(reg | (1 << 8)); + spi.transfer_byte(reg | (1 << 7)); } while(len--) { *data++ = spi.transfer_byte(); -- cgit v1.2.3