Skip to content

Commit baf36c7

Browse files
committed
Removing unnecessary 'memcpy'
1 parent edfa05f commit baf36c7

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/SFE_MicroOLED.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -458,12 +458,7 @@ void MicroOLED::display(void)
458458
setColumnAddress(0);
459459
if (interface == MODE_I2C)
460460
{
461-
uint8_t store[0x40];
462-
for (j = 0; j < 0x40; j++)
463-
{
464-
store[j] = screenmemory[i * 0x40 + j];
465-
}
466-
i2cWriteMultiple(i2c_address, (uint8_t *)&store, 0x40);
461+
i2cWriteMultiple(i2c_address, (uint8_t *)&screenmemory[i * 0x40], 0x40);
467462
}
468463
else
469464
{

src/hardware.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ void MicroOLED::i2cWrite(byte address, byte dc, byte data)
100100
/** \brief Write multiple data bytes over I2C
101101
102102
Write multiple bytes to I2C device _address_.
103-
Returns true if all numDataBytes were pushed successfully
103+
Returns true if all numDataBytes were written successfully
104104
**/
105105
boolean MicroOLED::i2cWriteMultiple(uint8_t address, uint8_t *dataBytes, size_t numDataBytes)
106106
{

0 commit comments

Comments
 (0)