Skip to content

Commit

Permalink
bug in I2Cdev::writeWords jrowberg#726
Browse files Browse the repository at this point in the history
I2Cdev::writeWords work incorrectly if len is greater than 1.
  • Loading branch information
alphatech56 committed Dec 4, 2022
1 parent 98a3b4e commit 19801c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion RP2040/I2Cdev/I2Cdev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ bool I2Cdev::writeWords(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint16
for(int i=0; i<length; i++){
data_buf[j] = data[i] >> 8;
data_buf[j+1] = data[i];
j++;
j += 2;
}
status = i2c_write_blocking(i2c_default, devAddr, data_buf, new_len, false);

Expand Down

0 comments on commit 19801c2

Please sign in to comment.