|
|
|
@ -521,7 +521,9 @@ bool AP_HMC5843_BusDriver_Auxiliary::block_read(uint8_t reg, uint8_t *buf, uint3
@@ -521,7 +521,9 @@ bool AP_HMC5843_BusDriver_Auxiliary::block_read(uint8_t reg, uint8_t *buf, uint3
|
|
|
|
|
* We can only read a block when reading the block of sample values - |
|
|
|
|
* calling with any other value is a mistake |
|
|
|
|
*/ |
|
|
|
|
assert(reg == HMC5843_REG_DATA_OUTPUT_X_MSB); |
|
|
|
|
if (reg != HMC5843_REG_DATA_OUTPUT_X_MSB) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int n = _slave->read(buf); |
|
|
|
|
return n == static_cast<int>(size); |
|
|
|
|