CheeseBoard
A library for use with the CheeseBoard Cheddar platform
Public Member Functions | List of all members
CbOledDisplayClass Class Reference

#include <CbOledDisplay.h>

Inheritance diagram for CbOledDisplayClass:
Inheritance graph

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 ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CbOledDisplayClass()

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!).

Parameters
rotation
clock
data
reset

Definition at line 8 of file CbOledDisplay.cpp.

Member Function Documentation

◆ begin()

void CbOledDisplayClass::begin ( )

Initialization.

Definition at line 13 of file CbOledDisplay.cpp.

◆ clear()

void CbOledDisplayClass::clear ( )
inline

Alias for clearBuffer() to make interface more consistent with CbLeds.

Definition at line 61 of file CbOledDisplay.h.

◆ drawStrR()

u8g2_uint_t CbOledDisplayClass::drawStrR ( u8g2_uint_t  x,
u8g2_uint_t  y,
const char *  s 
)

Draw a string, right justified.

Parameters
xthe x position of the right-most pixel of the text.
ythe bottom most pixel of the text.
sthe string to draw.

Definition at line 27 of file CbOledDisplay.cpp.

◆ drawText()

void CbOledDisplayClass::drawText ( const char *  text,
char  hAlign = 'L',
char  vAlign = 'M' 
)

Display text, wrapped, with horizontal and vertical justification

Parameters
textthe text to display.
hAlignhorizontal alignment: 'L' (left) 'C' (center) 'R' (right.
vAlignvertical aignment: 'T' (top) 'M' (middle) 'B' (bottom).

Definition at line 32 of file CbOledDisplay.cpp.

Here is the call graph for this function:

◆ getCharWidth()

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.

Here is the caller graph for this function:

◆ show()

void CbOledDisplayClass::show ( void  )
inline

Alias for sendBuffer() to make interface more consistent with CbLeds.

Definition at line 64 of file CbOledDisplay.h.


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