SSD1306Ascii
|
Class for I2C displays using Wire. More...
#include <SSD1306AsciiWire.h>
Public Member Functions | |
void | begin (const DevType *dev, uint8_t i2cAddr) |
Initialize the display controller. More... | |
void | begin (const DevType *dev, uint8_t i2cAddr, uint8_t rst) |
Initialize the display controller. More... | |
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 | set400kHz () |
Set the I2C clock rate to 400 kHz. Deprecated use Wire.setClock(400000L) | |
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... | |
SSD1306AsciiWire (decltype(Wire) &bus=Wire) | |
Initialize object on specific I2C bus. 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... | |
Class for I2C displays using Wire.
|
inlineexplicit |
Initialize object on specific I2C bus.
[in] | bus | The I2C bus to be used. |
|
inline |
Initialize the display controller.
[in] | dev | A device initialization structure. |
[in] | i2cAddr | The I2C address of the display controller. |
|
inline |
Initialize the display controller.
[in] | dev | A device initialization structure. |
[in] | i2cAddr | The I2C address of the display controller. |
[in] | rst | The display controller reset pin. |
|
inlineinherited |
Determine the spacing of a character. Spacing is width + space.
[in] | c | Character code. |
|
inherited |
Determine the width of a character.
[in] | c | Character code. |
|
inherited |
Clear a region of the display.
[in] | c0 | Starting column. |
[in] | c1 | Ending column. |
[in] | r0 | Starting row; |
[in] | r1 | Ending row; |
|
inherited |
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. |
|
inherited |
Clear the display to the end of the current line.
|
inlineinherited |
|
inlineinherited |
|
inherited |
Set display to normal or 180 degree remap mode.
[in] | mode | true for normal mode, false for remap mode. |
|
inlineinherited |
|
inlineinherited |
|
inherited |
Width of a field in pixels.
[in] | n | Number of characters in the field. |
|
inlineinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Initialize the display controller.
[in] | dev | A display initialization structure. |
|
inherited |
Set pixel mode for for entire display.
[in] | invert | Inverted display if true or normal display if false. |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Scroll the Display window.
[in] | lines | Number of lines to scroll the window. |
|
inlineinherited |
|
inlineinherited |
Scroll the RAM window.
[in] | rows | Number of rows to scroll the window. |
|
inherited |
Set the current column number.
[in] | col | The desired column number in pixels. |
|
inherited |
Set the display contrast.
[in] | value | The contrast level in th range 0 to 255. |
|
inherited |
Set the cursor position.
[in] | col | The column number in pixels. |
[in] | row | the row number in eight pixel rows. |
|
inherited |
Set the current font.
[in] | font | Pointer to a font table. |
|
inlineinherited |
Set invert mode for write/print.
[in] | mode | Invert pixels if true and use normal mode if false. |
|
inlineinherited |
Set letter-spacing. setFont() will restore default letter-spacing.
[in] | pixels | letter-spacing in pixels before magnification. |
|
inherited |
Set page offset.
[in] | page | the RAM page for start of the RAM window |
|
inherited |
Set the current row number.
[in] | row | the row number in eight pixel rows. |
|
inlineinherited |
Enable or disable scroll mode. Deprecated use setScrollMode().
[in] | enable | true enable scroll on newline false disable scroll. |
|
inlineinherited |
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.
|
inherited |
Set the display start line register.
[in] | line | RAM line to be mapped to first display line. |
|
inlineinherited |
Skip leading pixels writing characters to display display RAM.
[in] | n | Number of pixels to skip. |
|
inlineinherited |
Write a command byte to the display controller.
[in] | c | The command byte. |
|
inherited |
Write a byte to RAM in the display controller.
[in] | c | The data byte. |
|
inherited |
Write a byte to RAM in the display controller.
[in] | c | The data byte. |
|
inlineinherited |
|
inherited |
Character width.
[in] | str | The pointer to string. |
|
inherited |
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. |
|
inherited |
Add text pointer to display queue.
[in,out] | state | Ticker state. |
[in] | text | Pointer to C string. Clear queue if nullptr. |
|
inlineinherited |
Add text pointer to display queue.
[in,out] | state | Ticker state. |
[in] | str | Pointer to String object. Clear queue if nullptr. |
|
inherited |
Advance ticker by one pixel.
[in,out] | state | Ticker state. |
|
inherited |
Display a character.
[in] | c | The character to display. |