AceSegment
0.4.0
An adjustable, configurable, and extensible framework for rendering seven segment LED displays.
|
General interface for writing LED segment patterns to the LED display module. More...
#include <LedDisplay.h>
Public Member Functions | |
LedDisplay (uint8_t numDigits) | |
virtual void | writePatternAt (uint8_t pos, uint8_t pattern)=0 |
Write the pattern for a given pos. More... | |
virtual void | writePatternsAt (uint8_t pos, const uint8_t patterns[], uint8_t len)=0 |
Write the array of patterns of length len , starting at pos . More... | |
virtual void | writePatternsAt_P (uint8_t pos, const uint8_t patterns[], uint8_t len)=0 |
Write the array of patterns of length len , which are stored in flash memory through PROGMEM, starting at pos . More... | |
virtual void | setBrightnessAt (uint8_t pos, uint8_t brightness)=0 |
Write the brightness for a given pos, leaving pattern unchanged. More... | |
virtual void | writeDecimalPointAt (uint8_t pos, bool state=true)=0 |
Write the decimal point for the pos. More... | |
virtual void | setGlobalBrightness (uint8_t brightness)=0 |
Set global brightness of all digits, with the brightness value expressed as a fraction of 256. More... | |
virtual void | clear ()=0 |
Clear all digits to blank pattern. | |
uint8_t | getNumDigits () const |
Return the number of digits supported by this display instance. | |
General interface for writing LED segment patterns to the LED display module.
Various 'Writer' classes provide additional functionality on top of this interface:
Definition at line 42 of file LedDisplay.h.
|
pure virtual |
Write the brightness for a given pos, leaving pattern unchanged.
The maximum brightness is determined by specifics of the subclass. For ScanningDisplay, the maximum brightness is the value of SUBFIELDS-1
template parameter.
A subclass may not support the ability to control the brightness on a per digit basis. In that case, this method does nothing. If the pos is out of bounds, the method also does nothing.
Implemented in ace_segment::ScanningDisplay< HW, LM, DIGITS, SUBFIELDS >.
|
pure virtual |
Set global brightness of all digits, with the brightness value expressed as a fraction of 256.
In other words, 255 is brightest (default); 0 represents off, and 1 is 1/256 of full brightness. If the specific subclass does not support brightness, this method does nothing.
Implemented in ace_segment::ScanningDisplay< HW, LM, DIGITS, SUBFIELDS >.
|
pure virtual |
Write the decimal point for the pos.
Clock LED modules will attach the colon segment to one of the decimal points.
Implemented in ace_segment::ScanningDisplay< HW, LM, DIGITS, SUBFIELDS >.
|
pure virtual |
Write the pattern for a given pos.
If the pos is out of bounds, the method does nothing.
Implemented in ace_segment::ScanningDisplay< HW, LM, DIGITS, SUBFIELDS >.
|
pure virtual |
Write the array of patterns
of length len
, starting at pos
.
If an element of patterns attempts to write to a digit beyond the last digit of the LED module, nothing happens.
Implemented in ace_segment::ScanningDisplay< HW, LM, DIGITS, SUBFIELDS >.
|
pure virtual |
Write the array of patterns
of length len
, which are stored in flash memory through PROGMEM, starting at pos
.
If an element of patterns attempts to write to a digit beyond the last digit of the LED module, nothing happens.
Implemented in ace_segment::ScanningDisplay< HW, LM, DIGITS, SUBFIELDS >.