|
Treehopper C# API
|
SiTI DM632/DM633/DM634 16-channel, 16-bit PWM constant-current LED driver More...
Public Member Functions | |
| Dm632 (Spi SpiModule, SpiChipSelectPin LatchPin, double speedMhz=6) | |
| Construct a DM632 16-channel, 16-bit PWM LED controller attached directly to an SPI port More... | |
| Dm632 (ChainableShiftRegisterOutput upstreamDevice) | |
| Construct a DM632 16-channel, 16-bit PWM LED controller attached to the output of another shift register More... | |
| Task | Clear () |
| Clear the outputs of all LEDs More... | |
| async Task | FlushAsync (bool force=false) |
| Flush data to the port More... | |
| async Task | Write (byte[] value) |
| Immediately update all the pins at once with the given value. More... | |
Public Attributes | |
| bool | HasGlobalBrightnessControl => true |
| Gets whether this display has global brightness control (Hint: it does!) More... | |
| bool | HasIndividualBrightnessControl => true |
| Gets whether this display has individual brightness control (which it does!) More... | |
Protected Member Functions | |
| override void | updateFromCurrentValue () |
| Set the individual LED brightness values based on the direct value written to this register More... | |
| async Task | FlushIfAutoFlushEnabled () |
| Classes extending this class should call this function after the internal pin data structure is updated. More... | |
Properties | |
| double | Brightness [get, set] |
| Gets or sets the brightness of the display More... | |
| IList< Led > | Leds = new List<Led>() [get] |
| Gets the list of LEDs associated with this driver More... | |
| IList< ChainableShiftRegisterOutput > | Children = new List<ChainableShiftRegisterOutput>() [get, set] |
| byte [] | CurrentValue [get, protected set] |
| The current value of the port More... | |
| bool | AutoFlush = true [get, set] |
| Whether or not written data should automatically be flushed to the controller More... | |
| IFlushable | Parent [get, protected set] |
| The parent shift register (if not null) this device is attached to More... | |
SiTI DM632/DM633/DM634 16-channel, 16-bit PWM constant-current LED driver
| Dm632 | ( | Spi | SpiModule, |
| SpiChipSelectPin | LatchPin, | ||
| double | speedMhz = 6 |
||
| ) |
Construct a DM632 16-channel, 16-bit PWM LED controller attached directly to an SPI port
| SpiModule | The SPI module to use |
| LatchPin | The latch pin to use |
| speedMhz | The speed, in MHz, to use |
| Dm632 | ( | ChainableShiftRegisterOutput | upstreamDevice | ) |
Construct a DM632 16-channel, 16-bit PWM LED controller attached to the output of another shift register
| upstreamDevice | The shift register this DM632 is attached to |
| Task Clear | ( | ) |
Clear the outputs of all LEDs
Implements ILedDriver.
|
protectedvirtual |
Set the individual LED brightness values based on the direct value written to this register
Note that the state is always set to true when this is called; only the brightness is adjusted
Implements ChainableShiftRegisterOutput.
|
inherited |
Flush data to the port
| force | Whether to flush all data to the port, even if it doesn't appear to have changed. |
Implements IFlushable.
|
inherited |
Immediately update all the pins at once with the given value.
Flush() will be implicity called.
| value | A value representing the data to write to the port |
|
protectedinherited |
Classes extending this class should call this function after the internal pin data structure is updated.
| bool HasGlobalBrightnessControl => true |
Gets whether this display has global brightness control (Hint: it does!)
| bool HasIndividualBrightnessControl => true |
Gets whether this display has individual brightness control (which it does!)
|
getset |
Gets or sets the brightness of the display
The DM632 has no global brightness control, so this property emulates this functionality by scaling each LED's output value by this value.
|
getsetinherited |
|
getprotected setinherited |
The current value of the port
|
getsetinherited |
Whether or not written data should automatically be flushed to the controller
|
getprotected setinherited |
The parent shift register (if not null) this device is attached to