.\" -*- coding: UTF-8 -*-
.\" Copyright (c) Michael Haardt (michael@cantor.informatik.rwth-aachen.de),
.\" Sun Jan 15 19:16:33 1995
.\"
.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\"
.\" The GNU General Public License's references to "object code"
.\" and "executables" are to be interpreted as the output of any
.\" document formatting or typesetting system, including
.\" intermediate and printed output.
.\"
.\" This manual is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
.\" License along with this manual; if not, see
.\" .
.\" %%%LICENSE_END
.\"
.\" Modified, Sun Feb 26 15:02:58 1995, faith@cs.unc.edu
.\"*******************************************************************
.\"
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH LP 4 "13 sierpnia 2020 r." Linux "Podręcznik programisty Linuksa"
.SH NAZWA
lp \- urządzenia drukarek wierszowych
.SH SKŁADNIA
\fB#include \fP
.SH KONFIGURACJA
\fBlp\fP[0\(en2] are character devices for the parallel line printers; they
have major number 6 and minor number 0\(en2. The minor numbers correspond
to the printer port base addresses 0x03bc, 0x0378, and 0x0278. Usually they
have mode 220 and are owned by user \fIroot\fP and group \fIlp\fP. You can use
printer ports either with polling or with interrupts. Interrupts are
recommended when high traffic is expected, for example, for laser printers.
For typical dot matrix printers, polling will usually be enough. The
default is polling.
.SH OPIS
Obsługiwane są następujące wywołania funkcji \fBioctl\fP(2):
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPTIME, int \fP\fIarg\fP\fB)\fP"
Sets the amount of time that the driver sleeps before rechecking the printer
when the printer's buffer appears to be filled to \fIarg\fP. 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 influences only the polling driver.
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPCHAR, int \fP\fIarg\fP\fB)\fP"
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
\fIarg\fP. If printing is too slow, increase this number; if the system gets
too slow, decrease this number. The default is 1000. It influences only
the polling driver.
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPABORT, int \fP\fIarg\fP\fB)\fP"
Jeśli parametr \fIarg\fP jest równy 0, wtedy sterownik drukarki będzie
powtarzał operację po wystąpieniu błędu; w przeciwnym wypadku przerwie
działanie. Standardową wartością tego parametru jest 0.
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPABORTOPEN, int \fP\fIarg\fP\fB)\fP"
Jeśli \fIarg\fP jest równy 0, funkcja \fBopen\fP(2) zostanie przerwana po
wystąpieniu błędu; w przeciwnym wypadku błąd zostanie
zignorowany. Standardowe zachowanie polega na ignorowaniu błędów.
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPCAREFUL, int \fP\fIarg\fP\fB)\fP"
If \fIarg\fP 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.
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPWAIT, int \fP\fIarg\fP\fB)\fP"
.\" FIXME . Actually, since Linux 2.2, the default is 1
Ustawia na \fIarg\fP liczbę iteracji aktywnego oczekiwania (busy\-wait) przed
spróbkowaniem, czy drukarka zaakceptowała właśnie zapisany znak, oraz liczbę
iteracji, które należy przeczekać przed kolejnym próbkowaniem. Specyfikacje
określają ten czas jako 0.5 mikrosekundy, lecz doświadczenie wykazało, że
opóźnienie spowodowane wykonaniem kodu jest już wystarczające. Z tego powodu
wartością domyślną dla tego ustawienia jest 0. Jest ono wykorzystywane w
sterowniku zarówno w trybie próbkowania, jak i w trybie przerwań.
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPSETIRQ, int \fP\fIarg\fP\fB)\fP"
To wywołanie funkcji \fBioctl\fP(2) wymaga uprawnień administratora. Funkcja
pobiera argument typu \fIint\fP zawierający nowe przerwanie IRQ. Skutkiem
ubocznym jest inicjacja drukarki. Gdy \fIarg\fP jest zerem, to stosowany będzie
sterownik z próbkowaniem; jest to równocześnie zachowanie domyślne.
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPGETIRQ, int *\fP\fIarg\fP\fB)\fP"
Zachowuje w parametrze \fIarg\fP aktualnie stosowane przerwanie IRQ.
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPGETSTATUS, int *\fP\fIarg\fP\fB)\fP"
Zachowuje wartość stanu portu w zmiennej \fIarg\fP. Poszczególne bity mają
następujące znaczenie:
.TS
l l.
LP_PBUSY odwrócony sygnał zajętości
LP_PACK niezmienione potwierdzenie wejścia
LP_POUTPA niezmieniony sygnał braku papieru
LP_PSELECD niezmieniony sygnał wyboru
LP_PERRORP niezmieniony sygnał błędu
.TE
.IP
Znaczenia sygnałów należy szukać w dokumentacji drukarki. Należy pamiętać,
że dla niektórych drukarek ustawiane mogą być też nieudokumentowane tu bity.
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPRESET)\fP"
Inicjuje drukarkę. Nie stosuje się żadnych parametrów.
.SH PLIKI
.\" .SH 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 modularized it.
.\" LPCAREFUL, LPABORT, LPGETSTATUS were added by Chris Metcalf.
\fI/dev/lp*\fP
.SH "ZOBACZ TAKŻE"
\fBchmod\fP(1), \fBchown\fP(1), \fBmknod\fP(1), \fBlpcntl\fP(8), \fBtunelp\fP(8)
.SH "O STRONIE"
Angielska wersja tej strony pochodzi z wydania 5.10 projektu Linux
\fIman\-pages\fP. Opis projektu, informacje dotyczące zgłaszania błędów oraz
najnowszą wersję oryginału można znaleźć pod adresem
\%https://www.kernel.org/doc/man\-pages/.
.SH TŁUMACZENIE
Autorami polskiego tłumaczenia niniejszej strony podręcznika są:
Piotr Pogorzelski
i
Michał Kułach
.
Niniejsze tłumaczenie jest wolną dokumentacją. Bliższe informacje o warunkach
licencji można uzyskać zapoznając się z
.UR https://www.gnu.org/licenses/gpl-3.0.html
GNU General Public License w wersji 3
.UE
lub nowszej. Nie przyjmuje się ŻADNEJ ODPOWIEDZIALNOŚCI.
Błędy w tłumaczeniu strony podręcznika prosimy zgłaszać na adres
.MT
manpages-pl-list@lists.sourceforge.net
.ME .