|
LCDGFX LCD display driver
1.2.0
Lightweight graphics library for SSD1306, SSD1325, SSD1327, SSD1331, SSD1351, SH1106, SH1107, IL9163, ST7735, ST7789, ILI9341, PCD8544 displays over I2C/SPI
|
Class implements I2c interface for ESP32 controllers. More...
#include <esp32_i2c.h>
Public Member Functions | |
| EspI2c (int8_t busId=-1, uint8_t sa=0x00, int8_t scl=-1, int8_t sda=-1, uint32_t frequency=400000) | |
| Creates instance of I2C interface for ESP32 controllers. More... | |
| void | begin () |
| Initializes i2c interface. | |
| void | end () |
| Closes i2c interface. | |
| void | start () |
| Starts communication with SSD1306 display. | |
| void | stop () |
| Ends communication with SSD1306 display. | |
| void | send (uint8_t data) |
| Sends byte to SSD1306 device. More... | |
| void | sendBuffer (const uint8_t *buffer, uint16_t size) |
| Sends bytes to SSD1306 device. More... | |
| void | setAddr (uint8_t addr) |
| Sets i2c address for communication This API is required for some led displays having multiple i2c addresses for different types of data. More... | |
Class implements I2c interface for ESP32 controllers.
Definition at line 39 of file esp32_i2c.h.
|
explicit |
Creates instance of I2C interface for ESP32 controllers.
| busId | bus number to use, -1 defaults to I2C_NUM_1 |
| sa | address to use for oled device (7-bits, highest bit should be 0) |
| scl | pin number to use as SCL pin, or -1 if default is used |
| sda | pin number to use as SDA pin, or -1 if default is used |
| frequency | frequency in HZ to run i2c bus on, defaults to 400kHz |
| void EspI2c::send | ( | uint8_t | data | ) |
Sends byte to SSD1306 device.
| data | - byte to send |
| void EspI2c::sendBuffer | ( | const uint8_t * | buffer, |
| uint16_t | size | ||
| ) |
Sends bytes to SSD1306 device.
Sends bytes to SSD1306 device. This functions gives ~ 30% performance increase than ssd1306_intf.send.
| buffer | - bytes to send |
| size | - number of bytes to send |
|
inline |
Sets i2c address for communication This API is required for some led displays having multiple i2c addresses for different types of data.
| addr | i2c address to set (7 bits) |
Definition at line 98 of file esp32_i2c.h.