Q: How to Read Data from HMC6352?
A: In Standby Mode - Use “A” command.
In Query Mode - Send 43(hex) slave address to read data and clock out the two register data bytes for heading.
An initial “A” command is needed to update the heading after each read.
In Continuous Mode - Send 43(hex) slave address to read data and clock out the register data bytes for heading.
The “A” command is not allowed or required.
My interpretation is (why is the language is datasheets always that awkward?) that you need to perform a 2 byte read immediately after sending the I2C address byte. You are not allowed to read 3,4 or more bytes in one go. Just two of them. I think that the posted code is actually correct.
I believe that advantage of continuous mode is less I2C overhead. (you don't need to initiate measuring with a separate I2C command).
Well, since a I2C read with zero-length data is certainly a special case. Maybe the leJOS I2C implementation doesn't handle it as it should? (even though I trust Andy that he tested it pretty much)