Skip to content

Commit 73eb3f9

Browse files
committed
Wire: limit I2C_BUFFER_LENGTH to 255
The fsp i2c implementation cannot send 256 bytes in a single shot, so avoid the corner case Fixes bug on Adafruit_SSD1306 Former-commit-id: 32282cf
1 parent b4e7a21 commit 73eb3f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/Wire/Wire.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ using I2C_onRxCallback_f = void (*)(int);
5656
using I2C_onTxCallback_f = void (*)(void);
5757

5858

59-
#define I2C_BUFFER_LENGTH 256
59+
#define I2C_BUFFER_LENGTH 255
6060

6161
#define TWOWIRE_MAX_I2C_CHANNELS (3) // IIC0 to IIC2
6262
#define TWOWIRE_MAX_SCI_CHANNELS (10) // SCI0 to SCI9

0 commit comments

Comments
 (0)