LP(4) — NEWS-OS Programmer’s Manual
NAME
lp − line printer
SYNOPSIS
device lp0 at iop0 priority 104
device lp0 at hb0 priority 104
device lp0 at ap0 priority 104
DESCRIPTION
lp provides the interface to any of the standard centronics interfaced printers.
NWS-3100/NWS-5000 supports input to centronics interfaced printers as well. The input/output to a device is switched by issuing a read/write system call (for NWS-3100/NWS-5000 Series only). In input mode, it will not return from a read system call until the specified bytes are read.
The two hand shake output modes available on NWS-3100/NWS-5000 Series are as follows:
standard output mode
fast output mode(for NWP-549)
Standard output mode is the default.
Escape sequences, default page width and other restrictions completely depends on connected printer’s specification.
IOCTL SYSTEM CALL
LPIOCSTATUS
Queries the status information of the printer.
1 is returned in status when the printer is ready; otherwise, 0 is returned. NWS-3100/NWS-5000 Series models:
#include <sys/ioctl.h>
#include <newsapbus/printer.h>
int status;
ioctl(fd, LPIOCSTATUS, &status);
Models other than NWS-3100/NWS-5000 Series:
#include <sys/ioctl.h>
#include <newsiop/printer.h>
int status;
ioctl(fd, LPIOCSTATUS, &status);
LPIOCFLUSH
Flushes the data in the printer buffer. NWS-3100/NWS-5000 Series models:
#include <sys/ioctl.h>
#include <newsapbus/printer.h>
ioctl(fd, LPIOCFLUSH, 0);
Models other than NWS-3100/NWS-5000 Series:
#include <sys/ioctl.h>
#include <newsiop/printer.h>
ioctl(fd, LPIOCFLUSH, 0);
LPIOCSETMODE
Sets hand shake mode for NWS-3100/NWS-5000 Series output.
fast output modeLPFASTMODE(1)
#include <sys/ioctl.h>
#include <newsapbus/printer.h>
int mode;
mode = LPFASTMODE;
ioctl(fd, LPIOCSETMODE, &mode);
LPIOCGETMODE
Queries hand shake mode of NWS-3100/NWS-5000 Series output.
#include <sys/ioctl.h>
#include <newsapbus/printer.h>
int mode;
ioctl(fd, LPIOCGETMODE, &mode);
NOTES
A contradictive read/write system call should not be issued.
FILES
/dev/lp0
SEE ALSO
NEWS-OSRelease 4.2.1R