Opensourceinfo

Opensource for an Openmind.

OpenSource Headlines

Former Sun CEO tries anew with health start-up

Jonathan Schwartz, the chief executive who sold Sun Microsystems to Oracle , is once again in charge of a company, a start-up called Picture of Health for the time being.

Behind the open source turnaround at Broadcom

Native Linux drivers for Broadcom chip sets lets hotspots become integrated into real networks more easily.

TI tip multi-platform ARM Cortex A15 a oeEaglea mobile devices

In the aftermath of ARM's stonking new Cortex A15 "Eagle" chipset breaking cover yesterday , Texas Instruments are keen to play up their " lead Eagle licensee " role.

Reply to comment

Well, first of all, it's fun, or I wouldn't be doing it. I work with some intelligent, talented people, like Carlie Fairchild , publisher at LJ , and Katherine Druckman , our Webmistress.

Fact or Fiction? Top 8 Linux Myths Debunked

If the idea of using Linux in your business is one that makes you nervous, chances are you've fallen prey to one or more of the many myths out there that are frequently disseminated by competing vendors such as Microsoft.

Recent court ruling makes it more important than ever to understand the GPL

By Phil Odence on Thu, 09/09/10 - 7:52am. When Alan Shimel reported on the recent court decision against Westinghouse Digital in the BusyBox suit, he talked of the GPL having teeth .

Cloud-based source code host adds Git

Article:Cloud-based source code host adds Git:/g/a/2010/09/09/urnidgns852573C4006938800025779A00017BEC.DTL Article:Cloud-based source code host adds Git:/g/a/2010/09/09/urnidgns852573C4006938800025779A00017BEC.DTL 17:27 PDT -- Codesion, which offers hosted source code management, has added the Git distributed version control system to its services, ...

NoSQL takes a seat on Android with new mobile version of CouchDB

A new mobile version of the CouchDB database system, called CouchOne Mobile, is available for Google's Android operating system.

Turnkey Linux Intros Amazon S3 Powered Backup

TurnKey Linux Wednesday released a smart, fully automated open source-based backup and restore facility powered by the Amazon Simple Storage Service cloud.

Fast Easy Web Hosting

Your Say About Movies

Cigars Review

Man Pages



Special Files
Browse in : All > Documents > Man Pages > Special Files (101)
All A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Other

lp

NAME

lp - line printer devices  

SYNOPSIS

#include <linux/lp.h>  

CONFIGURATION

lp[0-2] are character devices for the parallel line printers; they have major number 6 and minor number 0-2. The minor numbers correspond to the printer port base addresses 0x03bc, 0x0378 and 0x0278. Usually they have mode 220 and are owned by root and group lp. You can use printer ports either with polling or with interrupts. Interrupts are recommended when high traffic is expected, e.g. for laser printers. For usual dot matrix printers polling will usually be enough. The default is polling.  

DESCRIPTION

The following ioctl(2) calls are supported:
int ioctl(int fd, LPTIME, int arg)
Sets the amount of time that the driver sleeps before rechecking the printer when the printer`s buffer appears to be filled to arg. If you have a fast printer, decrease this number; if you have a slow printer then increase it. This is in hundredths of a second, the default 2 being 0.02 seconds. It only influences the polling driver.
int ioctl(int fd, LPCHAR, int arg)
Sets the maximum number of busy-wait iterations which the polling driver does while waiting for the printer to get ready for receiving a character to arg. If printing is too slow, increase this number; if the system gets too slow, decrease this number. The default is 1000. It only influences the polling driver.
int ioctl(int fd, LPABORT, int arg)
If arg is 0, the printer driver will retry on errors, otherwise it will abort. The default is 0.
int ioctl(int fd, LPABORTOPEN, int arg)
If arg is 0, open(2) will be aborted on error, otherwise error will be ignored. The default is to ignore it.
int ioctl(int fd, LPCAREFUL, int arg)
If arg is 0, then the out-of-paper, offline and error signals are required to be false on all writes, otherwise they are ignored. The default is to ignore them.
int ioctl(int fd, LPWAIT, int arg)
Sets the number of busy waiting iterations to wait before strobing the printer to accept a just-written character, and the number of iterations to wait before turning the strobe off again, to arg. The specification says this time should be 0.5 microseconds, but experience has shown the delay caused by the code is already enough. For that reason, the default value is 0. This is used for both the polling and the interrupt driver.
int ioctl(int fd, LPSETIRQ, int arg)
This ioctl() requires superuser privileges. It takes an int containing the new IRQ as argument. As a side effect, the printer will be reset. When arg is 0, the polling driver will be used, which is also default.
int ioctl(int fd, LPGETIRQ, int *arg)
Stores the currently used IRQ in arg.
int ioctl(int fd, LPGETSTATUS, int *arg)
Stores the value of the status port in arg. The bits have the following meaning:

LP_PBUSYinverted busy input, active high
LP_PACKunchanged acknowledge input, active low
LP_POUTPAunchanged out-of-paper input, active high
LP_PSELECDunchanged selected input, active high
LP_PERRORPunchanged error input, active low

Refer to your printer manual for the meaning of the signals. Note that undocumented bits may also be set, depending on your printer.

int ioctl(int fd, LPRESET)
Resets the printer. No argument is used.
 

FILES

/dev/lp*  

AUTHORS

The printer driver was originally written by Jim Weigand and Linus Torvalds. It was further improved by Michael K. Johnson. The interrupt code was written by Nigel Gamble. Alan Cox modularised it. LPCAREFUL, LPABORT, LPGETSTATUS were added by Chris Metcalf.  

SEE ALSO

mknod(1), chown(1), chmod(1), tunelp(8), lpcntl(8)


Please review our Privacy Policy
and Terms of Use .