diff options
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(); |