LedController
2.0.2
A library for the MAX7219 and the MAX7221 Led display drivers.
|
This class is used to handle the configuration of the sakurajin::LedController. More...
#include <LedController_config.hpp>
Public Member Functions | |
controller_configuration< columns, rows > | copy () const noexcept |
This function returns a copy of this configuration. More... | |
unsigned int | getColumn (unsigned int segmentNumber) const noexcept |
This function returns the column a given segment is in. More... | |
unsigned int | getRow (unsigned int segmentNumber) const noexcept |
This function returns the row a given segment is in. More... | |
unsigned int | getRowLen () const noexcept |
Get the length each row has. More... | |
unsigned int | getSegmentNumber (unsigned int column, unsigned int row) const noexcept |
Calculate the segment Number/index from its coordinates. More... | |
bool | isValid () const noexcept |
check of this configuration is valid More... | |
unsigned int | SegmentCount () const noexcept |
returns the total number of segments (rows*columns) More... | |
Static Public Member Functions | |
static bool | isValidConfig (const controller_configuration< columns, rows > &conf) noexcept |
check if a given configuragtion is valid More... | |
Public Attributes | |
bool | debug_output = false |
if this is set to true, debug output will be printed. More... | |
unsigned int | IntensityLevel = 1 |
The current brightness level of the leds. More... | |
bool | onlySendOnChange = true |
Only send data if something changed if true. More... | |
unsigned int | row_SPI_CS [rows] |
This Arrays specifies which Pin to use for each row. More... | |
unsigned int | SPI_CLK = 0 |
The pin for the clock signal (CLK). More... | |
unsigned int | SPI_CS = 0 |
The pin for the chip select signal (CS). More... | |
unsigned int | SPI_MOSI = 0 |
The pin for the data transfer signal (MOSI on board and DIN on Matrix). More... | |
uint64_t | spiTransferSpeed = 8000000 |
The speed which with the hardware spi should transfer the data to the matrix. More... | |
bool | useHardwareSpi = false |
true if you want to use hardware SPI (view https://www.arduino.cc/en/Reference/SPI for pin config). More... | |
bool | virtual_multi_row = true |
set to false if each of your rows has a dedicated CS pin. More... | |
This class is used to handle the configuration of the sakurajin::LedController.
columns | The number of columns this configuration has. |
rows | The number of rows this configuration has. |
Definition at line 31 of file LedController_config.hpp.
|
inlinenoexcept |
This function returns a copy of this configuration.
Definition at line 271 of file LedController_config.hpp.
References sakurajin::controller_configuration< columns, rows >::IntensityLevel, sakurajin::controller_configuration< columns, rows >::onlySendOnChange, sakurajin::controller_configuration< columns, rows >::row_SPI_CS, sakurajin::controller_configuration< columns, rows >::SPI_CLK, sakurajin::controller_configuration< columns, rows >::SPI_CS, sakurajin::controller_configuration< columns, rows >::SPI_MOSI, and sakurajin::controller_configuration< columns, rows >::useHardwareSpi.
|
inlinenoexcept |
This function returns the column a given segment is in.
segmentNumber | The index of the segment which you want the column of. |
Definition at line 215 of file LedController_config.hpp.
|
inlinenoexcept |
This function returns the row a given segment is in.
segmentNumber | The index of the segment which you want the row of. |
Definition at line 189 of file LedController_config.hpp.
|
inlinenoexcept |
Get the length each row has.
Definition at line 235 of file LedController_config.hpp.
|
inlinenoexcept |
Calculate the segment Number/index from its coordinates.
column | The column the segment is in |
row | The row the segment is in |
Definition at line 254 of file LedController_config.hpp.
|
inlinenoexcept |
check of this configuration is valid
Definition at line 172 of file LedController_config.hpp.
References sakurajin::controller_configuration< columns, rows >::isValidConfig().
|
inlinestaticnoexcept |
check if a given configuragtion is valid
conf | the configuration that should be checked |
Definition at line 300 of file LedController_config.hpp.
References PRINTLN_IF.
|
inlinenoexcept |
returns the total number of segments (rows*columns)
Definition at line 154 of file LedController_config.hpp.
bool sakurajin::controller_configuration< columns, rows >::debug_output = false |
if this is set to true, debug output will be printed.
Definition at line 130 of file LedController_config.hpp.
unsigned int sakurajin::controller_configuration< columns, rows >::IntensityLevel = 1 |
The current brightness level of the leds.
Definition at line 89 of file LedController_config.hpp.
bool sakurajin::controller_configuration< columns, rows >::onlySendOnChange = true |
Only send data if something changed if true.
If this is true, new data will only be sent if the data given differes from the data internally stored.
Definition at line 112 of file LedController_config.hpp.
unsigned int sakurajin::controller_configuration< columns, rows >::row_SPI_CS[rows] |
This Arrays specifies which Pin to use for each row.
Definition at line 101 of file LedController_config.hpp.
unsigned int sakurajin::controller_configuration< columns, rows >::SPI_CLK = 0 |
The pin for the clock signal (CLK).
Definition at line 65 of file LedController_config.hpp.
unsigned int sakurajin::controller_configuration< columns, rows >::SPI_CS = 0 |
The pin for the chip select signal (CS).
Definition at line 54 of file LedController_config.hpp.
unsigned int sakurajin::controller_configuration< columns, rows >::SPI_MOSI = 0 |
The pin for the data transfer signal (MOSI on board and DIN on Matrix).
Definition at line 43 of file LedController_config.hpp.
uint64_t sakurajin::controller_configuration< columns, rows >::spiTransferSpeed = 8000000 |
The speed which with the hardware spi should transfer the data to the matrix.
Definition at line 121 of file LedController_config.hpp.
bool sakurajin::controller_configuration< columns, rows >::useHardwareSpi = false |
true if you want to use hardware SPI (view https://www.arduino.cc/en/Reference/SPI for pin config).
While this is a lot faster you cannot use every pin for the MOSI and CLK signal. SPI_MOSI and SPI_CLK will be set automatically if this is true.
Definition at line 78 of file LedController_config.hpp.
bool sakurajin::controller_configuration< columns, rows >::virtual_multi_row = true |
set to false if each of your rows has a dedicated CS pin.
By default this is true and it is assumed that all Segments are connected in series.
Definition at line 141 of file LedController_config.hpp.