Viking Skull Lamp
V1.0.1
|
Display driver object. More...
#include <oled.hpp>
Public Member Functions | |
ssd1306 (uint8_t address_p) | |
Constructor. More... | |
bool | begin () |
Init function for the display. More... | |
void | displayOn () |
Turn on the oled panel. More... | |
void | displayOff () |
Turn off the oled panel. More... | |
void | update () |
Update the content of the panel. More... | |
void | setPixel (uint8_t x, uint8_t y) |
Set a pixel by location. More... | |
void | clearPixel (uint8_t x, uint8_t y) |
Clear a pixel by location. More... | |
void | fillRect (uint8_t x, uint8_t y, uint8_t w, uint8_t h) |
Create a filled rectangle. More... | |
void | clearRect (uint8_t x, uint8_t y, uint8_t w, uint8_t h) |
Create a cleared rectangle. More... | |
void | writeCharacter (uint8_t c) |
Write a character to the display. More... | |
void | clear () |
Clear the display. More... | |
void | print (char *str) |
Print a c-string tho the display. More... | |
void | print (int d) |
Print number to the display. More... | |
void | line (uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2) |
Print line to the display. More... | |
Public Attributes | |
bool | inverted = false |
If this flag is set, the draw logic will be inverted. More... | |
uint8_t | cursorX = 0 |
X-coordinate of the cursor. More... | |
uint8_t | cursorY = 0 |
Y-coordinate of the cursor. More... | |
Private Member Functions | |
void | writeData (uint8_t *data, uint16_t dataSize) |
Write data to the display. More... | |
void | writeCommand (uint8_t c) |
Write command to the display. More... | |
Private Attributes | |
uint8_t | buffer [SSD1306_WIDTH *SSD1306_HEIGHT/8] = { 0 } |
Pixel buffer. More... | |
uint8_t | address = 0 |
Address of the display. More... | |
Display driver object.
This is a very optimized driver for the SSD1306 oled display driver. It uses ideas from lot other libraries, but it has been optimized to fit in this project.
ssd1306::ssd1306 | ( | uint8_t | address_p | ) |
bool ssd1306::begin | ( | ) |
void ssd1306::clear | ( | ) |
void ssd1306::clearPixel | ( | uint8_t | x, |
uint8_t | y | ||
) |
void ssd1306::clearRect | ( | uint8_t | x, |
uint8_t | y, | ||
uint8_t | w, | ||
uint8_t | h | ||
) |
void ssd1306::displayOff | ( | ) |
void ssd1306::displayOn | ( | ) |
void ssd1306::fillRect | ( | uint8_t | x, |
uint8_t | y, | ||
uint8_t | w, | ||
uint8_t | h | ||
) |
void ssd1306::line | ( | uint8_t | x1, |
uint8_t | y1, | ||
uint8_t | x2, | ||
uint8_t | y2 | ||
) |
void ssd1306::print | ( | char * | str | ) |
void ssd1306::print | ( | int | d | ) |
void ssd1306::setPixel | ( | uint8_t | x, |
uint8_t | y | ||
) |
void ssd1306::update | ( | ) |
void ssd1306::writeCharacter | ( | uint8_t | c | ) |
|
private |
|
private |
|
private |
|
private |