Base class that all LED drivers inherit from.
More...
#include <LedDriver.h>
|
| vector< Led > | leds |
| | The collection of LEDs that belong to this driver. More...
|
| |
| const bool | hasGlobalBrightnessControl |
| | Gets or sets whether this controller supports global _brightness control. More...
|
| |
| const bool | hasIndividualBrightnessControl |
| | Gets or sets whether this controller's LEDs have individual _brightness control (through PWM or otherwise). More...
|
| |
| bool | autoFlush |
| | Whether this interface should automatically flush new values or not. More...
|
| |
| Flushable * | parent |
| | Gets or sets the parent flushable device (if it exists); if this property is set by this driver, it is expected that flushing the parent will also flush this device. More...
|
| |
◆ LedDriver()
| LedDriver |
( |
int |
numLeds, |
|
|
bool |
hasGlobalBrightnessControl, |
|
|
bool |
hasIndividualBrightnessControl |
|
) |
| |
- Parameters
-
| numLeds | The number of LEDs to construct |
| hasGlobalBrightnessControl | Whether the controller can globally adjust the LED _brightness. |
| hasIndividualBrightnessControl | Whether the controller has individual LED _brightness control |
◆ brightness() [1/2]
◆ brightness() [2/2]
| void brightness |
( |
double |
value | ) |
|
If the display's hasGlobalBrightnessControl is true, native brightness control will be used. Otherwise, if the display's hasIndividualBrightnessControl is true, global brightness will be emulated by setting all
◆ flush()
| virtual void flush |
( |
bool |
force = false | ) |
|
|
pure virtualinherited |
- Parameters
-
| [in] | force | whether to flush all data to the port expander, even if it doesn't appear to have been changed |
Implemented in ChainableShiftRegisterOutput, and Dm632.
◆ autoFlush
◆ hasGlobalBrightnessControl
| const bool hasGlobalBrightnessControl |
◆ hasIndividualBrightnessControl
| const bool hasIndividualBrightnessControl |
◆ leds
◆ parent
This property is designed to make LED displays, which operate across groups of LEDs (and possibly groups of LED drivers), much more efficient to update. Many commonly-used LED drivers are shift registers that are chained together; since these cannot be individually addressed, any write to one must include a write to all the other ones. By properly setting the parent shift register in each chain, displays can optimize these updates.
The documentation for this class was generated from the following file:
- F:/Git/treehopper-sdk/C++/API/inc/Libraries/Displays/LedDriver.h