#include <i2c_twi.h>
Class implements AVR i2c support via TWI hardware block.
Definition at line 36 of file i2c_twi.h.
◆ TwiI2c()
TwiI2c::TwiI2c |
( |
uint8_t |
sa = 0x00 | ) |
|
|
explicit |
Creates I2C instance for AVR controllers. Can be used for command compilation with plain avrgcc
- Parameters
-
sa | i2c address of device to control |
◆ begin()
Initializes i2c interface
◆ end()
◆ send()
void TwiI2c::send |
( |
uint8_t |
data | ) |
|
Sends byte to SSD1306 device
- Parameters
-
◆ 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
-
addr | i2c address to set (7 bits) |
Definition at line 93 of file i2c_twi.h.
◆ start()
Starts communication with SSD1306 display.
◆ stop()
Ends communication with SSD1306 display.
The documentation for this class was generated from the following file: