AceSegment
0.8.2
A framework for rendering seven segment LED displays using the TM1637, MAX7219, HT16K33, or 74HC595 controller chips
|
An implementation of LedModule using the MAX7219 chip. More...
#include <Max7219Module.h>
Public Member Functions | |
Max7219Module (const T_SPII &spiInterface, const uint8_t *remapArray=nullptr) | |
Constructor. More... | |
void | begin () |
void | end () |
bool | isFlushRequired () const |
Return true if flushing required. | |
void | flush () |
Send segment patterns of all digits. More... | |
![]() | |
LedModule (uint8_t *patterns, uint8_t numDigits) | |
Constructor. More... | |
uint8_t | getNumDigits () const |
Return the number of digits supported by this display instance. | |
void | setPatternAt (uint8_t pos, uint8_t pattern) |
Set the led digit pattern at position pos. | |
uint8_t | getPatternAt (uint8_t pos) const |
Get the led digit pattern at position pos. | |
void | setBrightness (uint8_t brightness) |
Set global brightness of all digits. More... | |
uint8_t | getBrightness () const |
Get the current brightness. | |
Additional Inherited Members | |
![]() | |
void | begin () |
Subclasses should call this from its own begin(). | |
void | end () |
Subclasses should call this from its own end(). More... | |
void | setDigitDirty (uint8_t pos) |
Set the dirty bit of digit pos . | |
void | clearDigitDirty (uint8_t pos) |
Clear the dirty bit of digit pos . | |
bool | isDigitDirty (uint8_t pos) const |
Check the dirty bit of digit pos . | |
void | clearDigitsDirty () |
Clear dirty bits of all digits. | |
bool | isAnyDigitDirty () const |
Return true if any digits are dirty. | |
bool | isBrightnessDirty () const |
Check if the brightness level is dirty. | |
void | setBrightnessDirty () |
Mark the brightness as dirty. | |
void | clearBrightnessDirty () |
Clear the dirty bit for brightness. | |
An implementation of LedModule using the MAX7219 chip.
The chip uses SPI.
T_SPII | class that implements the SPI interface, usually one of the classes in the AceSPI library: SimpleSpiInterface, SimpleSpiFastInterface, HardSpiInterface, HardSpiFastInterface. |
T_DIGITS | number of digits in the module |
Definition at line 107 of file Max7219Module.h.
|
inlineexplicit |
Constructor.
spiInterface | instance of SPI interface class |
remapArray | (optional, nullable) a mapping of the physical digit positions to their logical positions |
Definition at line 115 of file Max7219Module.h.
|
inline |
Send segment patterns of all digits.
For a rough idea of how long this function takes, here are the numbers on a 16 MHz AVR:
The isFlushRequired() method can be used to optimize the number of calls to flush(), but often it is not necessary.
Definition at line 171 of file Max7219Module.h.