diff options
author | Atle H. Havsø <atle@havso.net> | 2014-07-29 20:41:42 +0200 |
---|---|---|
committer | Atle H. Havsø <atle@havso.net> | 2014-07-29 20:41:42 +0200 |
commit | 5b0cb66688d5621171abc9ceb7c1747736d1d6a1 (patch) | |
tree | 9656cf86be10790335f9bc4512e876d73a9d62c3 /drivers | |
parent | ff300829ce9c4ece797f6d11b97b1100d7125d00 (diff) |
Working sensor data pull from hmc5983
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hmc5983.h | 4 |
1 files changed, 2 insertions, 2 deletions
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(); |