public class LptPort
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
ACKNOWLEDGE
Bit value of Acknowledge line in status register of LPT port (at base address + 1).
|
static int |
AUTOLINEFEED
Bit value of Auto Linefeed line in control register of LPT port (at base address + 2).
|
static int |
BUSY
Bit value of Busy line in status register of LPT port (at base address + 1).
|
static int |
DATA0
Bit value of bit 0 in data register of LPT port (at base address).
|
static int |
DATA1
Bit value of bit 1 in data register of LPT port (at base address).
|
static int |
DATA2
Bit value of bit 2 in data register of LPT port (at base address).
|
static int |
DATA3
Bit value of bit 3 in data register of LPT port (at base address).
|
static int |
DATA4
Bit value of bit 4 in data register of LPT port (at base address).
|
static int |
DATA5
Bit value of bit 5 in data register of LPT port (at base address).
|
static int |
DATA6
Bit value of bit 6 in data register of LPT port (at base address).
|
static int |
DATA7
Bit value of bit 7 in data register of LPT port (at base address).
|
static int |
ERROR
Bit value of Error line in status register of LPT port (at base address + 1).
|
static int |
INITRESET
Bit value of Init/Reset line in control register of LPT port (at base address + 2).
|
static int |
PAPEREND
Bit value of Paper End line in status register of LPT port (at base address + 1).
|
static int |
SELECT
Bit value of Select line in status register of LPT port (at base address + 1).
|
static int |
SELECTIN
Bit value of Select In line in control register of LPT port (at base address + 2).
|
static int |
STROBE
Bit value of Strobe line in control register of LPT port (at base address + 2).
|
Constructor and Description |
---|
LptPort() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close port
Do nothing, if port is not open.
|
boolean |
isOpen()
Return true if port is open, false otherwise.
|
int |
open(int address)
Open LPT port at specified base address, e.g. 0x378.
|
int |
readData()
Return content of data port (at base address) in lower byte.
|
int |
readStatus()
Return content of status port (at base address + 1) in lower byte.
|
int |
writeControl(int data)
Write lower byte of data into control port (at base address + 2).
|
int |
writeData(int data)
Write lower byte of data into data port (at base address).
|
public static final int DATA0
public static final int DATA1
public static final int DATA2
public static final int DATA3
public static final int DATA4
public static final int DATA5
public static final int DATA6
public static final int DATA7
public static final int ERROR
public static final int SELECT
public static final int PAPEREND
public static final int ACKNOWLEDGE
public static final int BUSY
public static final int STROBE
public static final int AUTOLINEFEED
public static final int INITRESET
public static final int SELECTIN
public int open(int address)
public boolean isOpen()
public int writeData(int data)
public int writeControl(int data)
public int readData()
public int readStatus()
public void close()