We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87b8d9e commit 2aeb0f0Copy full SHA for 2aeb0f0
src/encoders/as5047u/AS5047U.cpp
@@ -317,7 +317,10 @@ uint8_t AS5047U::calcCRC(uint16_t data){
317
}
318
319
uint16_t AS5047U::writeRegister24(uint16_t reg, uint16_t data) {
320
- uint8_t buff[3] = { (reg>>8)&0x3F, reg&0xFF, calcCRC(reg) };
+ uint8_t buff[3];
321
+ buff[0] = (reg>>8)&0x3F;
322
+ buff[1] = reg&0xFF;
323
+ buff[2] = calcCRC(reg);
324
if (nCS>=0)
325
digitalWrite(nCS, 0);
326
spi->beginTransaction(settings);
0 commit comments