CheeseBoard
A library for use with the CheeseBoard Cheddar platform
|
#include <CbOledDisplay.h>
Public Member Functions | |
CbOledDisplayClass (const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t reset=U8X8_PIN_NONE) | |
void | begin () |
u8g2_uint_t | getCharWidth (char c) |
u8g2_uint_t | drawStrR (u8g2_uint_t x, u8g2_uint_t y, const char *s) |
void | drawText (const char *text, char hAlign='L', char vAlign='M') |
void | clear () |
void | show () |
Enhanced OLED class.
This class is derived from a U8G2lib display class, adding a few extra features like wrapped text display.
Definition at line 17 of file CbOledDisplay.h.
CbOledDisplayClass::CbOledDisplayClass | ( | const u8g2_cb_t * | rotation, |
uint8_t | clock, | ||
uint8_t | data, | ||
uint8_t | reset = U8X8_PIN_NONE |
||
) |
Constructor.
Parameters are the same as U8G2lib class parameters - see the U8G2lib documentation for details (yeah right!).
rotation | |
clock | |
data | |
reset |
Definition at line 8 of file CbOledDisplay.cpp.
void CbOledDisplayClass::begin | ( | ) |
Initialization.
Definition at line 13 of file CbOledDisplay.cpp.
|
inline |
Alias for clearBuffer() to make interface more consistent with CbLeds.
Definition at line 61 of file CbOledDisplay.h.
u8g2_uint_t CbOledDisplayClass::drawStrR | ( | u8g2_uint_t | x, |
u8g2_uint_t | y, | ||
const char * | s | ||
) |
Draw a string, right justified.
x | the x position of the right-most pixel of the text. |
y | the bottom most pixel of the text. |
s | the string to draw. |
Definition at line 27 of file CbOledDisplay.cpp.
void CbOledDisplayClass::drawText | ( | const char * | text, |
char | hAlign = 'L' , |
||
char | vAlign = 'M' |
||
) |
Display text, wrapped, with horizontal and vertical justification
text | the text to display. |
hAlign | horizontal alignment: 'L' (left) 'C' (center) 'R' (right. |
vAlign | vertical aignment: 'T' (top) 'M' (middle) 'B' (bottom). |
Definition at line 32 of file CbOledDisplay.cpp.
u8g2_uint_t CbOledDisplayClass::getCharWidth | ( | char | c | ) |
Get the width of a specific character.
For some reason this didn't seem possible in the base class. Please tell me how if I'm missing something.
Definition at line 19 of file CbOledDisplay.cpp.
|
inline |
Alias for sendBuffer() to make interface more consistent with CbLeds.
Definition at line 64 of file CbOledDisplay.h.