Class for I2C displays using Wire.
More...
#include <SSD1306AsciiWire.h>
Class for I2C displays using Wire.
void SSD1306AsciiWire::begin |
( |
const DevType * |
dev, |
|
|
uint8_t |
i2cAddr |
|
) |
| |
|
inline |
Initialize the display controller.
- Parameters
-
[in] | dev | A device initialization structure. |
[in] | i2cAddr | The I2C address of the display controller. |
void SSD1306AsciiWire::begin |
( |
const DevType * |
dev, |
|
|
uint8_t |
i2cAddr, |
|
|
uint8_t |
rst |
|
) |
| |
|
inline |
Initialize the display controller.
- Parameters
-
[in] | dev | A device initialization structure. |
[in] | i2cAddr | The I2C address of the display controller. |
[in] | rst | The display controller reset pin. |
uint8_t SSD1306Ascii::charWidth |
( |
uint8_t |
c | ) |
|
|
inherited |
Determine the width of a character.
- Parameters
-
- Returns
- Width of the character in pixels.
void SSD1306Ascii::clear |
( |
uint8_t |
c0, |
|
|
uint8_t |
c1, |
|
|
uint8_t |
r0, |
|
|
uint8_t |
r1 |
|
) |
| |
|
inherited |
Clear a region of the display.
- Parameters
-
[in] | c0 | Starting column. |
[in] | c1 | Ending column. |
[in] | r0 | Starting row; |
[in] | r1 | Ending row; |
- Note
- The final cursor position will be (c0, r0).
void SSD1306Ascii::clearToEOL |
( |
| ) |
|
|
inherited |
Clear the display to the end of the current line.
- Note
- The number of rows cleared will be determined by the height of the current font.
-
The cursor will be returned to the original position.
uint8_t SSD1306Ascii::col |
( |
| ) |
|
|
inlineinherited |
- Returns
- The current column in pixels.
uint8_t SSD1306Ascii::displayHeight |
( |
| ) |
|
|
inlineinherited |
- Returns
- The display hight in pixels.
uint8_t SSD1306Ascii::displayRows |
( |
| ) |
|
|
inlineinherited |
- Returns
- The display height in rows with eight pixels to a row.
uint8_t SSD1306Ascii::displayWidth |
( |
| ) |
|
|
inlineinherited |
- Returns
- The display width in pixels.
uint8_t SSD1306Ascii::fontHeight |
( |
| ) |
|
|
inherited |
- Returns
- The current font height in pixels.
uint8_t SSD1306Ascii::fontRows |
( |
| ) |
|
|
inlineinherited |
- Returns
- The number of eight pixel rows required to display a character in the current font.
uint8_t SSD1306Ascii::fontWidth |
( |
| ) |
|
|
inherited |
- Returns
- The maximum width of characters in the current font.
void SSD1306Ascii::init |
( |
const DevType * |
dev | ) |
|
|
inherited |
Initialize the display controller.
- Parameters
-
[in] | dev | A display initialization structure. |
uint8_t SSD1306Ascii::magFactor |
( |
| ) |
|
|
inlineinherited |
- Returns
- The character magnification factor.
uint8_t SSD1306Ascii::row |
( |
| ) |
|
|
inlineinherited |
- Returns
- the current row number with eight pixels to a row.
void SSD1306Ascii::setCol |
( |
uint8_t |
col | ) |
|
|
inherited |
Set the current column number.
- Parameters
-
[in] | col | The desired column number in pixels. |
void SSD1306Ascii::setContrast |
( |
uint8_t |
value | ) |
|
|
inherited |
Set the display contrast.
- Parameters
-
[in] | value | The contrast level in th range 0 to 255. |
void SSD1306Ascii::setCursor |
( |
uint8_t |
col, |
|
|
uint8_t |
row |
|
) |
| |
|
inherited |
Set the cursor position.
- Parameters
-
[in] | col | The column number in pixels. |
[in] | row | the row number in eight pixel rows. |
void SSD1306Ascii::setFont |
( |
const uint8_t * |
font | ) |
|
|
inlineinherited |
Set the current font.
- Parameters
-
[in] | font | Pointer to a font table. |
void SSD1306Ascii::setRow |
( |
uint8_t |
row | ) |
|
|
inherited |
Set the current row number.
- Parameters
-
[in] | row | the row number in eight pixel rows. |
void SSD1306Ascii::setScroll |
( |
bool |
enable | ) |
|
|
inherited |
Enable or disable scroll mode.
- Parameters
-
[in] | enable | true enable scroll on new line false disable scroll. |
- Note
- Scroll mode is only supported on 64 pixel high displays. Using setRow() or setCursor() will be unpredictable in scroll mode. You must use a font with an integral number of line on the display.
void SSD1306Ascii::ssd1306WriteCmd |
( |
uint8_t |
c | ) |
|
|
inlineinherited |
Write a command byte to the display controller.
- Parameters
-
- Note
- The byte will immediately be sent to the controller.
void SSD1306Ascii::ssd1306WriteRam |
( |
uint8_t |
c | ) |
|
|
inherited |
Write a byte to RAM in the display controller.
- Parameters
-
- Note
- The byte will immediately be sent to the controller.
void SSD1306Ascii::ssd1306WriteRamBuf |
( |
uint8_t |
c | ) |
|
|
inherited |
Write a byte to RAM in the display controller.
- Parameters
-
- Note
- The byte may be buffered until a call to ssd1306WriteCmd or ssd1306WriteRam.
size_t SSD1306Ascii::write |
( |
uint8_t |
c | ) |
|
|
inherited |
Display a character.
- Parameters
-
[in] | c | The character to display. |
- Returns
- the value one.
size_t SSD1306Ascii::write |
( |
const char * |
s | ) |
|
|
inherited |
Display a string.
- Parameters
-
[in] | s | The string to display. |
- Returns
- The length of the string.
The documentation for this class was generated from the following file: