Treehopper C# API
LedDisplay Class Reference

Interface for a display widget made of multiple LEDs. More...

Inheritance diagram for LedDisplay:
IFlushable BarGraph LedGraphicDisplay

Public Member Functions

void WriteLeds ()
 Write the LEDs without flushing the drivers More...
 
Task FlushAsync (bool force=false)
 Flush changed data to the port expander More...
 

Properties

LedCollection Leds [get]
 The collection of LEDs that belong to this display widget More...
 
bool AutoFlush [get, set]
 Whether this interface should automatically flush new values or not More...
 
IFlushable Parent [get]
 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...
 

Detailed Description

Interface for a display widget made of multiple LEDs.

Member Function Documentation

◆ WriteLeds()

void WriteLeds ( )

Write the LEDs without flushing the drivers

◆ FlushAsync()

Task FlushAsync ( bool  force = false)
inherited

Flush changed data to the port expander

Parameters
forcewhether to flush all data to the port expander, even if it doesn't appear to have been changed

Implemented in Max7219, Pca9685, LedDriver, BarGraph, ChainableShiftRegisterOutput, RgbLed, Tm1650, Ht16k33, GraphicDisplay, Apa102, Is31fl3218, LedDisplayCollection, GpioLedDriver< TDigitalOutPin >, and PwmLedDriver< TPwm >.

Property Documentation

◆ Leds

LedCollection Leds
get

The collection of LEDs that belong to this display widget

◆ AutoFlush

bool AutoFlush
getsetinherited

Whether this interface should automatically flush new values or not

◆ Parent

IFlushable Parent
getinherited

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

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: