AceSegment  0.4.0
An adjustable, configurable, and extensible framework for rendering seven segment LED displays.
Public Member Functions | Friends | List of all members
ace_segment::LedMatrixDualShiftRegister< SA > Class Template Reference

An LedMatrix that whose group pins are attached to one 74HC595 shift register and the element pins are attached to another shift register. More...

#include <LedMatrixDualShiftRegister.h>

Inheritance diagram for ace_segment::LedMatrixDualShiftRegister< SA >:
Inheritance graph
[legend]
Collaboration diagram for ace_segment::LedMatrixDualShiftRegister< SA >:
Collaboration graph
[legend]

Public Member Functions

 LedMatrixDualShiftRegister (const SA &spiAdapter, uint8_t groupOnPattern, uint8_t elementOnPattern)
 
void begin () const
 
void end () const
 
void draw (uint8_t group, uint8_t elementPattern) const
 Write out the group and element patterns in a single 16-bit stream with the group bits in the MSB and the element bits in the LSB.
 
void enableGroup (uint8_t group) const
 
void disableGroup (uint8_t group) const
 
void clear () const
 
- Public Member Functions inherited from ace_segment::LedMatrixBase
 LedMatrixBase (uint8_t groupOnPattern, uint8_t elementOnPattern)
 
void begin () const
 Configure the pins for the given LED wiring.
 
void end () const
 Turn off the pins by doing the opposite of begin().
 
void draw (uint8_t, uint8_t) const
 Write element patterns for the given group.
 
void disableGroup (uint8_t) const
 Disable the elements of given group.
 
void enableGroup (uint8_t) const
 Enable the elements of given group.
 
void clear () const
 Clear everything.
 

Friends

class ::LedMatrixDualShiftRegisterTest_draw
 
class ::LedMatrixDualShiftRegisterTest_enableGroup
 
class ::LedMatrixDualShiftRegisterTest_disableGroup
 

Additional Inherited Members

- Static Public Attributes inherited from ace_segment::LedMatrixBase
static constexpr uint8_t kActiveHighPattern = 0xFF
 Bit pattern to indicate that logical 1 activates group or element.
 
static constexpr uint8_t kActiveLowPattern = 0x00
 Bit pattern to indicate that logical 0 activates group or element.
 
- Protected Attributes inherited from ace_segment::LedMatrixBase
const uint8_t mGroupXorMask
 
const uint8_t mElementXorMask
 

Detailed Description

template<typename SA>
class ace_segment::LedMatrixDualShiftRegister< SA >

An LedMatrix that whose group pins are attached to one 74HC595 shift register and the element pins are attached to another shift register.

The 2 shift registers are daisy chained so that they can be accessed in a serial transfer of 16-bits using hardware or software SPI.

The group pins are assumed to be connected to the most significant byte. The element pins are connected to the least signficiant byte.

Template Parameters
SAclass providing SPI, either SwSpiAdapter or HwSpiAdapter

Definition at line 48 of file LedMatrixDualShiftRegister.h.


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