AceSegment
0.8.0
A framework for rendering seven segment LED displays using the TM1637, MAX7219, HT16K33, or 74HC595 controller chips
|
25 #ifndef ACE_SEGMENT_CHAR_WRITER_H
26 #define ACE_SEGMENT_CHAR_WRITER_H
29 #include "PatternWriter.h"
31 namespace ace_segment {
41 static const uint8_t kCharPatterns[];
44 static const uint8_t kNumChars = 128;
56 const uint8_t charPatterns[] = kCharPatterns,
57 uint8_t numChars = kNumChars
60 mCharPatterns(charPatterns),
97 const uint8_t*
const mCharPatterns;
98 uint8_t
const mNumChars;
LedModule & ledModule() const
Return the underlying LedModule.
void writeDecimalPointAt(uint8_t pos, bool state=true)
Write the decimal point for the pos.
void clear()
Clear the entire display.
General interface that represents a generic seven-segment LED module with multiple digits.
uint8_t getNumChars() const
Get number of characters in current character set.
The CharWriter supports mapping of an 8-bit character set to segment patterns supported by LedModule.
LedModule & ledModule() const
Get the underlying LedModule.
void clearToEnd(uint8_t pos)
Clear the display from pos to the end.
void writeCharAt(uint8_t pos, char c)
Write the character at the specified position.
void clearToEnd(uint8_t pos)
Clear the display from pos to the end.
uint8_t getPattern(char c) const
Get segment pattern for character 'c'.
uint8_t getNumDigits() const
Return the number of digits supported by this display instance.
CharWriter(LedModule &ledModule, const uint8_t charPatterns[]=kCharPatterns, uint8_t numChars=kNumChars)
Constructor.
uint8_t getNumDigits() const
Return the number of digits supported by this display instance.
void writeDecimalPointAt(uint8_t pos, bool state=true)
Write the decimal point for the pos.
Write LED segment patterns to the underlying LedModule.