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
TwiI2c Class Reference

Class implements AVR i2c support via TWI hardware block. More...

#include <i2c_twi.h>

Public Member Functions

 TwiI2c (uint8_t sa=0x00)
 Creates I2C instance for AVR 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...
 

Detailed Description

Class implements AVR i2c support via TWI hardware block.

Definition at line 36 of file i2c_twi.h.

Constructor & Destructor Documentation

◆ TwiI2c()

TwiI2c::TwiI2c ( uint8_t  sa = 0x00)
explicit

Creates I2C instance for AVR controllers.

Can be used for command compilation with plain avrgcc

Parameters
sai2c address of device to control

Member Function Documentation

◆ send()

void TwiI2c::send ( uint8_t  data)

Sends byte to SSD1306 device.

Parameters
data- byte to send

◆ sendBuffer()

void TwiI2c::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.

Parameters
buffer- bytes to send
size- number of bytes to send

◆ setAddr()

void TwiI2c::setAddr ( uint8_t  addr)
inline

Sets i2c address for communication This API is required for some led displays having multiple i2c addresses for different types of data.

Parameters
addri2c address to set (7 bits)

Definition at line 93 of file i2c_twi.h.


The documentation for this class was generated from the following file: