Table of Contents

Class GpioOutputSegment

Namespace
Iot.Device.Multiplexing
Assembly
Iot.Device.Multiplexing.dll

IOutputSegment implementation that uses GpioController.

public class GpioOutputSegment : IOutputSegment
Inheritance
GpioOutputSegment
Implements

Constructors

GpioOutputSegment(int[], GpioController?, bool)

IOutputSegment implementation that uses GpioController.

public GpioOutputSegment(int[] pins, GpioController? gpioController = null, bool shouldDispose = true)

Parameters

pins int[]

The GPIO pins that should be used and are connected.

gpioController GpioController

The GpioController to use. If one isn't provided, one will be created.

shouldDispose bool

The policy to use (true, by default) for disposing the GPIO controller when disposing this instance.

Properties

this[int]

Segment values.

public PinValue this[int index] { get; set; }

Parameters

index int

Property Value

PinValue

Length

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

public int Length { get; }

Property Value

int

Methods

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.

public void Display(CancellationToken token)

Parameters

token CancellationToken

Dispose()

Disposes the underlying GpioController.

public void Dispose()

TurnOffAll()

Writes a byte to the underlying GpioController.

public void TurnOffAll()

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.

public void Write(byte value)

Parameters

value byte

Write(int, PinValue)

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

public void Write(int pin, PinValue value)

Parameters

pin int
value PinValue

Write(SpanByte)

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

public void Write(SpanByte value)

Parameters

value SpanByte