|
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 AVR USI spi support via hardware module. More...
#include <spi_usi.h>
Public Member Functions | |
| UsiSpi (int8_t csPin, int8_t dcPin) | |
| Creates AVR USI spi instance. More... | |
| void | begin () |
| Initializes spi interface. | |
| void | end () |
| Closes spi 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... | |
|
explicit |
Creates AVR USI spi instance.
This interface can be used from command line avrgcc toolchain. It uses standard USI CLK, USI DO, USI DI pins to send data to LCD.
| csPin | pin to enable chip select signal, or -1 if cs pin is not required. |
| dcPin | pin to control data/command mode. |
| void UsiSpi::send | ( | uint8_t | data | ) |
Sends byte to SSD1306 device.
| data | - byte to send |
| void UsiSpi::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 |