|
SSD1306Ascii
|
SSD1306 base class. More...
#include <SSD1306Ascii.h>


Public Member Functions | |
| uint8_t | charSpacing (uint8_t c) |
| Determine the spacing of a character. Spacing is width + space. More... | |
| uint8_t | charWidth (uint8_t c) const |
| Determine the width of a character. More... | |
| void | clear () |
| Clear the display and set the cursor to (0, 0). | |
| void | clear (uint8_t c0, uint8_t c1, uint8_t r0, uint8_t r1) |
| Clear a region of the display. More... | |
| void | clearField (uint8_t col, uint8_t row, uint8_t n) |
| Clear a field of n fieldWidth() characters. More... | |
| void | clearToEOL () |
| Clear the display to the end of the current line. More... | |
| uint8_t | col () const |
| uint8_t | displayHeight () const |
| void | displayRemap (bool mode) |
| Set display to normal or 180 degree remap mode. More... | |
| uint8_t | displayRows () const |
| uint8_t | displayWidth () const |
| size_t | fieldWidth (uint8_t n) |
| Width of a field in pixels. More... | |
| const uint8_t * | font () const |
| uint8_t | fontCharCount () const |
| char | fontFirstChar () const |
| uint8_t | fontHeight () const |
| uint8_t | fontRows () const |
| uint8_t | fontWidth () const |
| void | home () |
| Set the cursor position to (0, 0). | |
| void | init (const DevType *dev) |
| Initialize the display controller. More... | |
| void | invertDisplay (bool invert) |
| Set pixel mode for for entire display. More... | |
| bool | invertMode () const |
| uint8_t | letterSpacing () const |
| uint8_t | magFactor () const |
| uint8_t | pageOffset () const |
| uint8_t | pageOffsetLine () const |
| uint8_t | row () const |
| void | scrollDisplay (int8_t lines) |
| Scroll the Display window. More... | |
| bool | scrollIsSynced () const |
| void | scrollMemory (int8_t rows) |
| Scroll the RAM window. More... | |
| void | set1X () |
| Set the character magnification factor to one. | |
| void | set2X () |
| Set the character magnification factor to two. | |
| void | setCol (uint8_t col) |
| Set the current column number. More... | |
| void | setContrast (uint8_t value) |
| Set the display contrast. More... | |
| void | setCursor (uint8_t col, uint8_t row) |
| Set the cursor position. More... | |
| void | setFont (const uint8_t *font) |
| Set the current font. More... | |
| void | setInvertMode (bool mode) |
| Set invert mode for write/print. More... | |
| void | setLetterSpacing (uint8_t pixels) |
| Set letter-spacing. setFont() will restore default letter-spacing. More... | |
| void | setPageOffset (uint8_t page) |
| Set page offset. More... | |
| void | setRow (uint8_t row) |
| Set the current row number. More... | |
| void | setScroll (bool enable) |
| Enable or disable scroll mode. Deprecated use setScrollMode(). More... | |
| void | setScrollMode (uint8_t mode) |
| Set scroll mode. More... | |
| void | setStartLine (uint8_t line) |
| Set the display start line register. More... | |
| void | skipColumns (uint8_t n) |
| Skip leading pixels writing characters to display display RAM. More... | |
| void | ssd1306WriteCmd (uint8_t c) |
| Write a command byte to the display controller. More... | |
| void | ssd1306WriteRam (uint8_t c) |
| Write a byte to RAM in the display controller. More... | |
| void | ssd1306WriteRamBuf (uint8_t c) |
| Write a byte to RAM in the display controller. More... | |
| uint8_t | startLine () const |
| size_t | strWidth (const char *str) const |
| Character width. More... | |
| void | tickerInit (TickerState *state, const uint8_t *font, uint8_t row, bool mag2X=false, uint8_t bgnCol=0, uint8_t endCol=255) |
| Initialize TickerState struct. More... | |
| bool | tickerText (TickerState *state, const char *text) |
| Add text pointer to display queue. More... | |
| bool | tickerText (TickerState *state, const String &str) |
| Add text pointer to display queue. More... | |
| int8_t | tickerTick (TickerState *state) |
| Advance ticker by one pixel. More... | |
| size_t | write (uint8_t c) |
| Display a character. More... | |
SSD1306 base class.
|
inline |
Determine the spacing of a character. Spacing is width + space.
| [in] | c | Character code. |
| uint8_t SSD1306Ascii::charWidth | ( | uint8_t | c | ) | const |
Determine the width of a character.
| [in] | c | Character code. |
| void SSD1306Ascii::clear | ( | uint8_t | c0, |
| uint8_t | c1, | ||
| uint8_t | r0, | ||
| uint8_t | r1 | ||
| ) |
Clear a region of the display.
| [in] | c0 | Starting column. |
| [in] | c1 | Ending column. |
| [in] | r0 | Starting row; |
| [in] | r1 | Ending row; |
| void SSD1306Ascii::clearField | ( | uint8_t | col, |
| uint8_t | row, | ||
| uint8_t | n | ||
| ) |
Clear a field of n fieldWidth() characters.
| [in] | col | Field start column. |
| [in] | row | Field start row. |
| [in] | n | Number of characters in the field. |
| void SSD1306Ascii::clearToEOL | ( | ) |
Clear the display to the end of the current line.
|
inline |
|
inline |
| void SSD1306Ascii::displayRemap | ( | bool | mode | ) |
Set display to normal or 180 degree remap mode.
| [in] | mode | true for normal mode, false for remap mode. |
|
inline |
|
inline |
| size_t SSD1306Ascii::fieldWidth | ( | uint8_t | n | ) |
Width of a field in pixels.
| [in] | n | Number of characters in the field. |
|
inline |
| uint8_t SSD1306Ascii::fontCharCount | ( | ) | const |
| char SSD1306Ascii::fontFirstChar | ( | ) | const |
| uint8_t SSD1306Ascii::fontHeight | ( | ) | const |
| uint8_t SSD1306Ascii::fontRows | ( | ) | const |
| uint8_t SSD1306Ascii::fontWidth | ( | ) | const |
| void SSD1306Ascii::init | ( | const DevType * | dev | ) |
Initialize the display controller.
| [in] | dev | A display initialization structure. |
| void SSD1306Ascii::invertDisplay | ( | bool | invert | ) |
Set pixel mode for for entire display.
| [in] | invert | Inverted display if true or normal display if false. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Scroll the Display window.
| [in] | lines | Number of lines to scroll the window. |
|
inline |
|
inline |
Scroll the RAM window.
| [in] | rows | Number of rows to scroll the window. |
| void SSD1306Ascii::setCol | ( | uint8_t | col | ) |
Set the current column number.
| [in] | col | The desired column number in pixels. |
| void SSD1306Ascii::setContrast | ( | uint8_t | value | ) |
Set the display contrast.
| [in] | value | The contrast level in th range 0 to 255. |
| void SSD1306Ascii::setCursor | ( | uint8_t | col, |
| uint8_t | row | ||
| ) |
Set the cursor position.
| [in] | col | The column number in pixels. |
| [in] | row | the row number in eight pixel rows. |
| void SSD1306Ascii::setFont | ( | const uint8_t * | font | ) |
Set the current font.
| [in] | font | Pointer to a font table. |
|
inline |
Set invert mode for write/print.
| [in] | mode | Invert pixels if true and use normal mode if false. |
|
inline |
Set letter-spacing. setFont() will restore default letter-spacing.
| [in] | pixels | letter-spacing in pixels before magnification. |
| void SSD1306Ascii::setPageOffset | ( | uint8_t | page | ) |
Set page offset.
| [in] | page | the RAM page for start of the RAM window |
| void SSD1306Ascii::setRow | ( | uint8_t | row | ) |
Set the current row number.
| [in] | row | the row number in eight pixel rows. |
|
inline |
Enable or disable scroll mode. Deprecated use setScrollMode().
| [in] | enable | true enable scroll on newline false disable scroll. |
|
inline |
Set scroll mode.
| [in] | mode | One of the following. |
SCROLL_MODE_OFF - newline will not scroll the display or RAM window.
SCROLL_MODE_AUTO - newline will scroll both the display and RAM windows.
SCROLL_MODE_APP - newline scrolls the RAM window. The app scrolls the display window.
| void SSD1306Ascii::setStartLine | ( | uint8_t | line | ) |
Set the display start line register.
| [in] | line | RAM line to be mapped to first display line. |
|
inline |
Skip leading pixels writing characters to display display RAM.
| [in] | n | Number of pixels to skip. |
|
inline |
Write a command byte to the display controller.
| [in] | c | The command byte. |
| void SSD1306Ascii::ssd1306WriteRam | ( | uint8_t | c | ) |
Write a byte to RAM in the display controller.
| [in] | c | The data byte. |
| void SSD1306Ascii::ssd1306WriteRamBuf | ( | uint8_t | c | ) |
Write a byte to RAM in the display controller.
| [in] | c | The data byte. |
|
inline |
| size_t SSD1306Ascii::strWidth | ( | const char * | str | ) | const |
Character width.
| [in] | str | The pointer to string. |
| void SSD1306Ascii::tickerInit | ( | TickerState * | state, |
| const uint8_t * | font, | ||
| uint8_t | row, | ||
| bool | mag2X = false, |
||
| uint8_t | bgnCol = 0, |
||
| uint8_t | endCol = 255 |
||
| ) |
Initialize TickerState struct.
| [in,out] | state | Ticker state. |
| [in] | font | Font to be displayed. |
| [in] | row | Row for ticker. |
| [in] | mag2X | Set magFactor to two if true. |
| [in] | bgnCol | First column of ticker. Default is zero. |
| [in] | endCol | Last column of ticker. Default is last column of display. |
| bool SSD1306Ascii::tickerText | ( | TickerState * | state, |
| const char * | text | ||
| ) |
Add text pointer to display queue.
| [in,out] | state | Ticker state. |
| [in] | text | Pointer to C string. Clear queue if nullptr. |
|
inline |
Add text pointer to display queue.
| [in,out] | state | Ticker state. |
| [in] | str | Pointer to String object. Clear queue if nullptr. |
| int8_t SSD1306Ascii::tickerTick | ( | TickerState * | state | ) |
Advance ticker by one pixel.
| [in,out] | state | Ticker state. |
| size_t SSD1306Ascii::write | ( | uint8_t | c | ) |
Display a character.
| [in] | c | The character to display. |