LedController
2.0.2
A library for the MAX7219 and the MAX7221 Led display drivers.
|
A block of bytes used to represent all of the data in a Segment. More...
#include <LedController_byteblock.hpp>
Public Member Functions | |
ByteBlock () noexcept | |
Construct a new Byte Block object with 0s. More... | |
ByteBlock (byte n0, byte n1, byte n2, byte n3, byte n4, byte n5, byte n6, byte n7) noexcept | |
Construct a new Byte Block object from a list of values. More... | |
ByteBlock (byte newdata[8]) noexcept | |
Construct a new Byte Block object from an array. More... | |
ByteBlock (const ByteRow< 8 > &data) noexcept | |
Construct a new Byte Block object from a byteRow. More... | |
ByteBlock | makeColumns () const noexcept |
Turns an ByteBlock of rows into an ByteBlock of columns. More... | |
ByteBlock | reverse () const noexcept |
Reverse an ByteBlock of 8 bytes (mirror it) More... | |
ByteBlock | rotate180 () const noexcept |
rotate an ByteBlock by 180 degrees More... | |
ByteBlock | transpose () const noexcept |
Turns an ByteBlock of rows into an ByteBlock of columns. More... | |
Public Member Functions inherited from sakurajin::ByteRow< 8 > | |
byte | at (uint64_t index) const noexcept |
Access the class just like the underlying array. More... | |
ByteRow () noexcept | |
Construct a new Byte Row object with 0s. More... | |
ByteRow (byte newdata[SIZE]) noexcept | |
Construct a new Byte Row object from an array. More... | |
virtual bool | operator!= (const ByteRow< SIZE > &other) const noexcept |
checks if two byteRows do not have identical data More... | |
virtual ByteRow | operator& (const ByteRow< SIZE > &other) const noexcept |
Overlaps two ByteRows (bitwise or). More... | |
virtual ByteRow | operator++ () const noexcept |
Moves all data of the ByteRow to the up by one. More... | |
virtual ByteRow | operator-- () const noexcept |
Moves all data of the ByteRow to the down by one. More... | |
virtual ByteRow | operator<< (unsigned int distance) const noexcept |
Moves all data of the ByteRow to the left by a given distance. More... | |
ByteRow & | operator= (byte newdata[SIZE]) noexcept |
Assign an array to this object. More... | |
virtual bool | operator== (const ByteRow< SIZE > &other) const noexcept |
checks if two byteRows have identical data More... | |
virtual ByteRow | operator>> (unsigned int distance) const noexcept |
Moves all data of the ByteRow to the right by a given distance. More... | |
const byte & | operator[] (uint64_t index) const noexcept |
Access the class just like the underlying array. More... | |
byte & | operator[] (uint64_t index) noexcept |
Access the class just like the underlying array. More... | |
~ByteRow () noexcept | |
Destroy the Byte Row object. More... | |
Static Public Member Functions | |
static ByteBlock | makeColumns (ByteBlock rowArray) noexcept |
Turns an ByteBlock of rows into an ByteBlock of columns. More... | |
static byte | reverse (byte input) noexcept |
This function changes to bitorder of a byte (useful to mirror "images" you want to display) More... | |
static ByteBlock | reverse (ByteBlock input) noexcept |
Reverse an ByteBlock of 8 bytes (mirror it) More... | |
static ByteBlock | rotate180 (ByteBlock input) noexcept |
rotate an ByteBlock by 180 degrees More... | |
static ByteBlock | transpose (ByteBlock rowArray) noexcept |
Turns an ByteBlock of rows into an ByteBlock of columns. More... | |
Additional Inherited Members | |
Protected Attributes inherited from sakurajin::ByteRow< 8 > | |
byte | _data [SIZE] |
The internal array where the actual data is. More... | |
A block of bytes used to represent all of the data in a Segment.
It is simply a ByteRow with size 8 but useful regardless.
Definition at line 26 of file LedController_byteblock.hpp.
|
inlinenoexcept |
Construct a new Byte Block object from an array.
newdata | The array which should be used to initilize the row. |
Definition at line 40 of file LedController_byteblock.hpp.
|
inlinenoexcept |
Construct a new Byte Block object from a list of values.
This way {0,0,0,0,0,0,0,0} can be used as copy-assignement.
Definition at line 51 of file LedController_byteblock.hpp.
References sakurajin::ByteRow< 8 >::_data.
|
inlinenoexcept |
Construct a new Byte Block object with 0s.
Definition at line 69 of file LedController_byteblock.hpp.
|
inlinenoexcept |
Construct a new Byte Block object from a byteRow.
data | the data that should be assigned |
Definition at line 82 of file LedController_byteblock.hpp.
|
inlinenoexcept |
Turns an ByteBlock of rows into an ByteBlock of columns.
Definition at line 110 of file LedController_byteblock.hpp.
References transpose().
Turns an ByteBlock of rows into an ByteBlock of columns.
rowArray | the ByteBlock of rows of which you want the columns of |
Definition at line 227 of file LedController_byteblock.hpp.
References ByteBlock(), and reverse().
|
inlinenoexcept |
Reverse an ByteBlock of 8 bytes (mirror it)
Definition at line 125 of file LedController_byteblock.hpp.
|
inlinestaticnoexcept |
This function changes to bitorder of a byte (useful to mirror "images" you want to display)
input | The byte that should be reversed |
Definition at line 158 of file LedController_byteblock.hpp.
Reverse an ByteBlock of 8 bytes (mirror it)
input | The ByteBlock that should be mirrored |
Definition at line 181 of file LedController_byteblock.hpp.
References ByteBlock(), and reverse().
|
inlinenoexcept |
rotate an ByteBlock by 180 degrees
Definition at line 140 of file LedController_byteblock.hpp.
rotate an ByteBlock by 180 degrees
input | the ByteBlock that will be rotated |
Definition at line 204 of file LedController_byteblock.hpp.
References ByteBlock(), and reverse().
|
inlinenoexcept |
Turns an ByteBlock of rows into an ByteBlock of columns.
Definition at line 95 of file LedController_byteblock.hpp.
References makeColumns().
Turns an ByteBlock of rows into an ByteBlock of columns.
rowArray | the ByteBlock of rows of which you want the columns of |
Definition at line 252 of file LedController_byteblock.hpp.
References makeColumns().