Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Adafruit_SSD1306.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,19 @@ void Adafruit_SSD1306::ssd1306_command(uint8_t c) {
TRANSACTION_END
}

// Send one data byte directly to the display, bypassing the library.
// This allows for quick localized updates to the screen.
/*
@brief Write a single byte directly onto the SSD1306
display, bypassing the library.
@return None (void).
*/
void Adafruit_SSD1306::ssd1306_sendData(uint8_t d) {
wire->beginTransmission(i2caddr); // begin I2C transmission
WIRE_WRITE(0x40); // data mode
WIRE_WRITE(d); // send data
wire->endTransmission(); // stop I2C transmission
}
// ALLOCATE & INIT DISPLAY -------------------------------------------------

/*!
Expand Down
1 change: 1 addition & 0 deletions Adafruit_SSD1306.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ class Adafruit_SSD1306 : public Adafruit_GFX {
void startscrolldiagleft(uint8_t start, uint8_t stop);
void stopscroll(void);
void ssd1306_command(uint8_t c);
void ssd1306_sendData(uint8_t d);
bool getPixel(int16_t x, int16_t y);
uint8_t *getBuffer(void);

Expand Down