Class PAR400EM

java.lang.Object
  |
  +--PAR400EM

public class PAR400EM
extends java.lang.Object

This class is a thin wrapper over a parallel port native library for a SOM400EM PLD's GPIO lines


Constructor Summary
PAR400EM()
          Construct an parallel object
 
Method Summary
 int getshadow()
          Return the current state of the output port
 int read()
          Read a byte of data from the input port, PORTX This port is currently only 5 bits wide, MSBs 7,6, and 5 are masked to zero by the native method
 int write(int data)
          Write a byte of data to the output port, PORTY This port is currently only 5 bits wide, MSBs 7,6, and 5 have no effect.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PAR400EM

public PAR400EM()
Construct an parallel object

Method Detail

write

public int write(int data)
Write a byte of data to the output port, PORTY This port is currently only 5 bits wide, MSBs 7,6, and 5 have no effect. Data written to the port is stored in a shadow variable, which can be retrieved by using the getshadow method

Parameters:
data - The byte of data to write to the port.
Returns:
0
See Also:
getshadow

read

public int read()
Read a byte of data from the input port, PORTX This port is currently only 5 bits wide, MSBs 7,6, and 5 are masked to zero by the native method

Returns:
the byte that was read

getshadow

public int getshadow()
Return the current state of the output port

Returns:
the last byte written to the output port