Skip to content

Commit c8d272d

Browse files
committed
Update writeBytes to write buffer instead of byte wise.
1 parent 2eeeba4 commit c8d272d

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Products that use this Library
4343
Version History
4444
---------------
4545

46+
* [V_3.x] - Incorporate PRs including the ability to pass in a wire port in begin().
4647
* [V_2.0.1](https://github.com/sparkfun/SparkFun_SX1509_Arduino_Library/tree/V_2.0.1) - Version 2.0.1. More user-friendly function calls. Increased clock functionality. More examples. Mostly backwards compatible with older versions.
4748
* [V_1.0.0](https://github.com/sparkfun/SparkFun_SX1509_Arduino_Library/tree/V_1.0.0) - Version 1.0.0
4849

src/SparkFunSX1509.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -849,10 +849,7 @@ bool SX1509::writeBytes(uint8_t firstRegisterAddress, uint8_t *writeArray, uint8
849849
_i2cPort->beginTransmission(deviceAddress);
850850
bool result = _i2cPort->write(firstRegisterAddress);
851851
int i = 0;
852-
while (result && i < length)
853-
{
854-
result = _i2cPort->write(writeArray[i++]);
855-
}
852+
result = _i2cPort->write(writeArray, length);
856853
uint8_t endResult = _i2cPort->endTransmission();
857854
return result && (endResult == I2C_ERROR_OK);
858855
}

0 commit comments

Comments
 (0)