AceSegment
0.7.0
A framework for rendering seven segment LED displays using the TM1637, MAX7219, HT16K33, or 74HC595 controller chips
|
The CharWriter supports mapping of an 8-bit character set to segment patterns supported by LedModule. More...
#include <CharWriter.h>
Public Member Functions | |
CharWriter (LedModule &ledModule, const uint8_t charPatterns[]=kCharPatterns, uint8_t numChars=kNumChars) | |
Constructor. More... | |
LedModule & | ledModule () const |
Get the underlying LedModule. | |
uint8_t | getNumDigits () const |
Return the number of digits supported by this display instance. | |
uint8_t | getNumChars () const |
Get number of characters in current character set. | |
void | writeCharAt (uint8_t pos, char c) |
Write the character at the specified position. | |
uint8_t | getPattern (char c) const |
Get segment pattern for character 'c'. | |
void | writeDecimalPointAt (uint8_t pos, bool state=true) |
Write the decimal point for the pos. | |
void | clear () |
Clear the entire display. | |
void | clearToEnd (uint8_t pos) |
Clear the display from pos to the end. | |
Static Public Attributes | |
static const uint8_t | kCharPatterns [] |
static const uint8_t | kNumChars = 128 |
The CharWriter supports mapping of an 8-bit character set to segment patterns supported by LedModule.
By default, the ASCII characters (0-127) is provided, but can be overridden with a user-defined character set.
Definition at line 38 of file CharWriter.h.
|
inlineexplicit |
Constructor.
ledModule | reference to LedModule |
charPatterns | (optional) array of 7-segment character patterns in PROGMEM (default: an ASCII character set) |
numChars | (optional) number of characters in charPatterns, 0 means 256 (default: 128) |
Definition at line 54 of file CharWriter.h.