AceSegment  0.8.2
A framework for rendering seven segment LED displays using the TM1637, MAX7219, HT16K33, or 74HC595 controller chips
Public Member Functions | List of all members
ace_segment::HybridModule< T_SPII, T_DIGITS, T_SUBFIELDS, T_CI, T_GPIOI > Class Template Reference

An implementation of LedModule class that supports an LED module using a single 74HC595 Shift Register chip on the segment pins. More...

#include <HybridModule.h>

Inheritance diagram for ace_segment::HybridModule< T_SPII, T_DIGITS, T_SUBFIELDS, T_CI, T_GPIOI >:
Inheritance graph
[legend]
Collaboration diagram for ace_segment::HybridModule< T_SPII, T_DIGITS, T_SUBFIELDS, T_CI, T_GPIOI >:
Collaboration graph
[legend]

Public Member Functions

 HybridModule (const T_SPII &spiInterface, uint8_t segmentOnPattern, uint8_t digitOnPattern, uint8_t framesPerSecond, const uint8_t *digitPins)
 
void begin ()
 
void end ()
 
- Public Member Functions inherited from ace_segment::ScanningModule< LedMatrixSingleHc595< T_SPII, GpioInterface >, T_DIGITS, 1, ClockInterface >
 ScanningModule (const LedMatrixSingleHc595< T_SPII, GpioInterface > &ledMatrix, uint8_t framesPerSecond)
 Constructor. More...
 
void begin ()
 Configure the driver with the parameters given by in the constructor. More...
 
void end ()
 A no-op end() function for consistency with other classes.
 
void setBrightnessAt (uint8_t pos, uint8_t brightness)
 Set the brightness for a given pos, leaving pattern unchanged. More...
 
uint16_t getFramesPerSecond () const
 Return the requested frames per second.
 
uint16_t getFieldsPerSecond () const
 Return the fields per second.
 
uint16_t getFieldsPerFrame () const
 Total fields per frame across all digits.
 
uint16_t getMicrosPerField () const
 Return micros per field. More...
 
bool renderFieldWhenReady ()
 Display one field of a frame when the time is right. More...
 
void renderFieldNow ()
 Render the current field immediately. More...
 
- Public Member Functions inherited from ace_segment::LedModule
 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

- Protected Member Functions inherited from ace_segment::LedModule
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.
 

Detailed Description

template<typename T_SPII, uint8_t T_DIGITS, uint8_t T_SUBFIELDS = 1, typename T_CI = ClockInterface, typename T_GPIOI = GpioInterface>
class ace_segment::HybridModule< T_SPII, T_DIGITS, T_SUBFIELDS, T_CI, T_GPIOI >

An implementation of LedModule class that supports an LED module using a single 74HC595 Shift Register chip on the segment pins.

This is a convenience class that pairs together a ScanningModule and a LedMatrixSingleHc595 in a single class.

Template Parameters
T_SPIIinterface to SPI, either SimpleSpiInterface or HardSpiInterface
T_DIGITSnumber of LED digits
T_SUBFIELDSnumber of subfields for each digit to get brightness control using PWM. The default is 1, but can be set to greater than 1 to get brightness control.
T_CIclass that provides access to Arduino clock functions (millis() and micros()). The default is ClockInterface.
T_GPIOI(optional) interface to GPIO functions, default GpioInterface (note: 'GPI' is already taken on ESP8266)

Definition at line 57 of file HybridModule.h.


The documentation for this class was generated from the following file: