CharlieplexSegment Class

Definition

Provides support for Charlieplex multiplexing. https://wikipedia.org/wiki/Charlieplexing

C#
public class CharlieplexSegment : IDisposable
C#
public class CharlieplexSegment : IDisposable, Iot.Device.Multiplexing.IOutputSegment
Inheritance
CharlieplexSegment
Implements

Constructors

CharlieplexSegment(Int32[], Int32, GpioController, Boolean)

Initializes a new Charlieplex type that can be use for multiplex over a relatively small number of GPIO pins.

Properties

Length

The length of the segment; the number of GPIO pins it exposes.

NodeCount

The number of nodes (like LEDs) that can be addressed.

Methods

Display(CancellationToken)

Displays nodes in their current configuration for the specified duration.

DisplaySegment(TimeSpan)

Displays nodes in their current configuration for the specified duration.

Dispose()

Cleanup. Failing to dispose this class, especially when callbacks are active, may lead to undefined behavior.

GetNodes(Int32[], Int32)

Provides the set of Charlie nodes given the set of pins and the count provided. If count = 0, then the Charlieplex maximum is used for the pins provided (n^2-n).

Write(Int32, PinValue, Int32)

Write a PinValue to a node, to update Charlieplex segment. Address scheme is 0-based. Given 8 nodes, addresses would be 0-7. Displays nodes in their updated configuration for the specified duration.

Write(Int32, PinValue, TimeSpan)

Write a PinValue to a node, to update Charlieplex segment. Address scheme is 0-based. Given 8 nodes, addresses would be 0-7. Displays nodes in their updated configuration for the specified duration.

Explicit Interface Implementations

IOutputSegment.Display(CancellationToken)

Displays current state of segment. Segment is displayed at least until token receives a cancellation signal, possibly due to a specified duration expiring.

IOutputSegment.DisplayAsync(CancellationToken)

Displays current state of segment. Segment is displayed at least until token receives a cancellation signal, possibly due to a specified duration expiring.

IOutputSegment.Item[Int32]

Segment values.

IOutputSegment.TurnOffAll()

Clears shift register. Performs a latch.

IOutputSegment.Write(Byte)

Writes discrete underlying bits to a virtual segment. Writes each bit, left to right. Least significant bit will written to index 0. Does not display output.

IOutputSegment.Write(Int32, PinValue)

Writes a PinValue to a virtual segment. Does not display output.

IOutputSegment.Write(ReadOnlySpan<Byte>)

Writes discrete underlying bits to a virtual output. Writes each byte, left to right. Least significant bit will written to index 0. Does not display output.

Applies to

Product Versions
.NET IoT Libraries 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 2.0.0, 2.1.0, 2.2.0