Treehopper C# API
ParallelInterface Class Reference

This module is used to provide an 8080-style R/W parallel interface (especially useful for displays) More...

Inheritance diagram for ParallelInterface:
ReadWriteParallelInterface WriteOnlyParallelInterface

Public Member Functions

async Task WriteCommandAsync (uint[] command)
 Write one or more words of data to the bus with the command flag asserted (RS=0); More...
 
async Task WriteDataAsync (uint[] data)
 Write one or more words of data to the bus with the data flag asserted (RS=1); More...
 
async Task< ushort[]> ReadCommandAsync (uint command, int length)
 Write a command to the bus and await data to be returned More...
 
async Task< ushort[]> ReadDataAsync (int length)
 Read data words from the bus More...
 
override string ToString ()
 Gets a string representation of the parallel interface's state More...
 

Public Attributes

int Width => DataBus.Count
 Get the width of the data bus (i.e., the count of the number of pins in the bus) More...
 

Properties

Collection< PinDataBus = new Collection<Pin>() [get, set]
 Controls which pins are used for the data bus. More...
 
Pin RegisterSelectPin [get, set]
 Gets or sets the pin used for Register Select (RS). More...
 
Pin ReadWritePin [get, set]
 Gets or sets the pin used for Read/Write (R/W) More...
 
Pin EnablePin [get, set]
 Gets or sets the pin used for Enable (E). More...
 
int DelayMicroseconds [get, set]
 gets or sets the number of microseconds that should be delayed after pulse. More...
 
bool Enabled [get, set]
 Gets or sets a value indicating whether this peripheral is enabled More...
 

Detailed Description

This module is used to provide an 8080-style R/W parallel interface (especially useful for displays)

Member Function Documentation

◆ WriteCommandAsync()

async Task WriteCommandAsync ( uint []  command)

Write one or more words of data to the bus with the command flag asserted (RS=0);

Parameters
command

Implements WriteOnlyParallelInterface.

◆ WriteDataAsync()

async Task WriteDataAsync ( uint []  data)

Write one or more words of data to the bus with the data flag asserted (RS=1);

Parameters
data

Implements WriteOnlyParallelInterface.

◆ ReadCommandAsync()

async Task<ushort[]> ReadCommandAsync ( uint  command,
int  length 
)

Write a command to the bus and await data to be returned

Parameters
commandThe command word to write
lengthThe number of words to read
Returns
An awaitable array of words read

Implements ReadWriteParallelInterface.

◆ ReadDataAsync()

async Task<ushort[]> ReadDataAsync ( int  length)

Read data words from the bus

Parameters
lengthThe number of words to read
Returns
An awaitable array of words read

Implements ReadWriteParallelInterface.

◆ ToString()

override string ToString ( )

Gets a string representation of the parallel interface's state

Returns
the parallel interface's state

Member Data Documentation

◆ Width

int Width => DataBus.Count

Get the width of the data bus (i.e., the count of the number of pins in the bus)

Property Documentation

◆ DataBus

Collection<Pin> DataBus = new Collection<Pin>()
getset

Controls which pins are used for the data bus.

◆ RegisterSelectPin

Pin RegisterSelectPin
getset

Gets or sets the pin used for Register Select (RS).

◆ ReadWritePin

Pin ReadWritePin
getset

Gets or sets the pin used for Read/Write (R/W)

◆ EnablePin

Pin EnablePin
getset

Gets or sets the pin used for Enable (E).

◆ DelayMicroseconds

int DelayMicroseconds
getset

gets or sets the number of microseconds that should be delayed after pulse.

◆ Enabled

bool Enabled
getset

Gets or sets a value indicating whether this peripheral is enabled


The documentation for this class was generated from the following file: