We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5fd04d4 commit 08885fcCopy full SHA for 08885fc
1 file changed
src/SSD1306I2C.h
@@ -130,8 +130,10 @@ class SSD1306I2C : public OLEDDisplay {
130
}
131
132
private:
133
+ // Reserve 1 byte before the framebuffer so display() can safely write the
134
+ // I2C control byte (0x40) to buffer[-1] without accessing unallocated memory.
135
int getBufferOffset(void) {
- return 0;
136
+ return 1;
137
138
139
inline void sendCommand(uint8_t command) __attribute__((always_inline)) {
0 commit comments