AceSegment
0.3.0
An adjustable, configurable, and extensible framework for rendering seven segment LED displays.
|
Class that represents the abstraction of a particular LED display wiring. More...
#include <LedMatrix.h>
Public Member Functions | |
LedMatrix (Hardware *hardware, uint8_t numGroups, uint8_t numElements) | |
void | setCathodeOnGroup () |
LED negative terminals are on the group line. More... | |
void | setAnodeOnGroup () |
LED positive terminals are on the group line. More... | |
void | invertGroupLevels () |
If a transistor drives the group, invert the logic levels. More... | |
virtual void | configure () |
Configure the pins for the given LED wiring. More... | |
virtual void | finish () |
Turn off the pins by doing the opposite of configure(). More... | |
virtual void | enableGroup (uint8_t group)=0 |
virtual void | disableGroup (uint8_t group)=0 |
virtual void | drawElements (uint8_t pattern)=0 |
Protected Attributes | |
Hardware *const | mHardware |
const uint8_t | mNumGroups |
const uint8_t | mNumElements |
uint8_t | mGroupOn |
uint8_t | mGroupOff |
uint8_t | mElementOn |
uint8_t | mElementOff |
Class that represents the abstraction of a particular LED display wiring.
If the resistors are on the segments, then the segments become the Elements and the digits become the Groups. If the resistors are on the digits, then the digits become the Elements and the segments become the Groups. The setCathodeOnGroup() and setAnnodeOnGroup() methods determine the polarity of the LED with respect to the Group line. The invertGroupLevels() should be called when transistors are used on the Group lines to handle higher currents.
Definition at line 49 of file LedMatrix.h.
|
inlinevirtual |
Configure the pins for the given LED wiring.
Reimplemented in ace_segment::LedMatrixSerial, ace_segment::LedMatrixSpi, and ace_segment::LedMatrixDirect.
Definition at line 82 of file LedMatrix.h.
|
inlinevirtual |
Turn off the pins by doing the opposite of configure().
Reimplemented in ace_segment::LedMatrixSerial, ace_segment::LedMatrixSpi, and ace_segment::LedMatrixDirect.
Definition at line 85 of file LedMatrix.h.
|
inline |
If a transistor drives the group, invert the logic levels.
Definition at line 76 of file LedMatrix.h.
|
inline |
|
inline |