'\" t .\" Copyright (c) Michael Haardt (michael@cantor.informatik.rwth-aachen.de), .\" Sun Jan 15 19:16:33 1995 .\" .\" 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, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. .\" .\" Modified, Sun Feb 26 15:02:58 1995, faith@cs.unc.edu .\" .\" Japanese Version Copyright (c) 1996,1997,1998 .\" ISHIKAWA Mutsumi, TAKAHASHI Mutsuji .\" all rights reserved. .\" Translated Tue Feb 13 22:48:47 JST 1997 .\" by ISHIKAWA Mutsumi .\" and TAKAHASHI Mutsuji .\" .\" Japanese Version Last Modified Sun Jan 11 03:42:56 JST 1998 .\" by ISHIKAWA Mutsumi .\" .\" WORD: printer プリンター .\" WORD: parallel パラレル .\" WORD: polling ポーリング .\" WORD: interrupt 割り込み .\" WORD: dot matrix printer ドットマトリクスプリンター .\" WORD: default デフォルト .\" WORD: modularize モジュール化 .\" WORD: driver ドライバ .\" WORD: buffer バッファ .\" .TH LP 4 1995-01-15 "Linux" "Linux Programmer's Manual" .\"O .SH NAME .\"O lp \- line printer devices .SH 名前 lp \- ラインプリンターデバイス .\"O .SH SYNOPSIS .SH 書式 .B #include .\"O .SH CONFIGURATION .SH 設定 .\"O \fBlp\fP[0\(en2] are character devices for the parallel line printers; .\"O they have major number 6 and minor number 0\(en2. .\"O The minor numbers .\"O correspond to the printer port base addresses 0x03bc, 0x0378 and 0x0278. .\"O Usually they have mode 220 and are owned by root and group lp. .\"O You can use printer ports either with polling or with interrupts. .\"O Interrupts are recommended when high traffic is expected, for example, .\"O for laser printers. .\"O For usual dot matrix printers polling will usually be enough. .\"O The default is polling. \fBlp\fP[0\(en2] はパラレルプリンターのためのキャラクタデバイスでメジャー ナンバー 6 マイナーナンバー 0\(en2 を持つ。マイナーナンバーは、ベース アドレス 0x03bc, 0x0378, 0x0278 のそれぞれのプリンターポートに対応する 通常、このデバイスファイルはモード 220 オーナー root グループ lp となっ ている。プリンターポートはポーリング(polling)または割り込み (interrupts) のどちらを用いても利用できる。割り込みの利用は、高負荷が 予想される時、例えばレーザープリンターをプリンタポートに接続する場合な どに推奨される。普通のドットマトリクスプリンターでは、ポーリングの利用 で通常は十分である。デフォルトではポーリングを利用する。 .\"O .SH DESCRIPTION .SH 説明 .\"O The following .\"O .BR ioctl (2) .\"O calls are supported: 次の .BR ioctl (2) コールがサポートされている。 .IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPTIME, int \fP\fIarg\fP\fB)\fP" .\"O Sets the amount of time that the driver sleeps before rechecking the printer .\"O when the printer's buffer appears to be filled to \fIarg\fP. .\"O If you have a fast printer, decrease this number; .\"O if you have a slow printer then increase it. .\"O This is in hundredths of a second, the default 2 .\"O being 0.02 seconds. .\"O It only influences the polling driver. プリンターのバッファ( buffer ) がいっぱいになった時、ドライバがプリンター を再チェックするまでに休止する時間を \fIarg\fP とする。高速なプリンター の時はこれを減らし、遅いプリンターの時には増やす。単位は1秒の100分の1 で、デフォルトの2は0.02秒にあたる。ポーリングドライバ( polling driver )のみに影響する。 .IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPCHAR, int \fP\fIarg\fP\fB)\fP" .\"O Sets the maximum number of busy-wait iterations which the polling driver does .\"O while waiting for the printer to get ready for receiving a character to .\"O \fIarg\fP. .\"O If printing is too slow, increase this number; if the .\"O system gets too slow, decrease this number. .\"O The default is 1000. .\"O It only influences the polling driver. ポーリングドライバがプリンターの文字受取り準備ができるのを待 つビジーウエイト(busy-wait)の回数の最大値を \fIarg\fPとする。 もし印刷が遅すぎる時はこれを増やし、システムが遅くなりすぎる時には 減らす。デフォルトは 1000 である。ポーリングドライバのみに影響する。 .IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPABORT, int \fP\fIarg\fP\fB)\fP" .\"O If \fIarg\fP is 0, the printer driver will retry on errors, otherwise .\"O it will abort. .\"O The default is 0. もし、\fIarg\fP が 0 なら、プリンタードライバはエラーについて再試行 を行う。それ以外の場合は中止する。デフォルトは 0 である。 .IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPABORTOPEN, int \fP\fIarg\fP\fB)\fP" .\"O If \fIarg\fP is 0, .\"O .BR open (2) .\"O will be aborted on error, otherwise error will be ignored. .\"O The default is .\"O to ignore it. もし、\fIarg\fP が 0 なら .BR open (2) の結果がエラーの場合、動作が中止される。それ以外ならエラーは無 視される。デフォルトではエラーは無視される。 .IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPCAREFUL, int \fP\fIarg\fP\fB)\fP" .\"O If \fIarg\fP is 0, then the out-of-paper, offline and error signals are .\"O required to be false on all writes, otherwise they are ignored. .\"O The default is to ignore them. \fIarg\fPが0のときには、すべての書き出しの時に、紙切れ、オフライン、エ ラーのシグナルが偽(false)であることが必要とされるが、0 以外ならこれ らのシグナルは無視される。デフォルトでもこれらのシグナルは無視される。 .IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPWAIT, int \fP\fIarg\fP\fB)\fP" .\"O Sets the number of busy waiting iterations to wait before strobing the .\"O printer to accept a just-written character, and the number of iterations to .\"O wait before turning the strobe off again, .\"O to \fIarg\fP. .\"O The specification says this time should be 0.5 .\"O microseconds, but experience has shown the delay caused by the code is .\"O already enough. .\"O For that reason, the default value is 0. .\"O This is used for both the polling and the interrupt driver. プリンターが送られた文字を受け取るのを待つため、ドライバが文字を送っ てからストローブ(strobe)するまでの待ちの繰り返しの回数と、ストローブ を再びオフにするまでの待ちの繰り返しの回数を \fIarg\fPに設定 する。仕様によればこの時間は 0.5 マイクロ秒とするべきだが、経験によれば このコードによって生じる遅れで十分である。そのため、デフォルトでは 0 で ある。これは、ポーリングと割り込みドライバの両方で使われる。 .IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPSETIRQ, int \fP\fIarg\fP\fB)\fP" .\"O This .\"O .BR ioctl (2) .\"O requires superuser privileges. .\"O It takes an .\"O .I int .\"O containing the new IRQ as argument. .\"O As a side effect, the printer will be reset. .\"O When \fIarg\fP is 0, the polling driver will be used, which is also default. この .BR ioctl (2) を使うには、スーパーユーザの権限が必要である。新しいIRQを示す .I int を引数としてとる。また、副作用としてプリンターはリセットされる。 \fIarg\fPが0の時またはデフォルトの動作では、ポーリングドライバーが使わ れる。 .IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPGETIRQ, int *\fP\fIarg\fP\fB)\fP" .\"O Stores the currently used IRQ in \fIarg\fP. 現在使われているIRQを\fIarg\fPにいれる。 .IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPGETSTATUS, int *\fP\fIarg\fP\fB)\fP" .\"O Stores the value of the status port in \fIarg\fP. .\"O The bits have the following meaning: ステータスポートの値を\fIarg\fPに収める。各ビットには次のような意味が ある: .TS l l. .\"O LP_PBUSY inverted busy input, active high .\"O LP_PACK unchanged acknowledge input, active low .\"O LP_POUTPA unchanged out-of-paper input, active high .\"O LP_PSELECD unchanged selected input, active high .\"O LP_PERRORP unchanged error input, active low LP_PBUSY ビジー信号の反転、ハイがアクティブ LP_PACK アクノリッジ信号、ローがアクティブ LP_POUTPA 紙切れ信号、ハイがアクティブ LP_PSELECD 選択信号、ハイがアクティブ LP_PERRORP エラー信号、ローがアクティブ .TE .sp .\"O Refer to your printer manual for the meaning of the signals. .\"O Note that undocumented bits may also be set, depending on your printer. 信号の意味については各自のプリンターのマニュアルを参照のこと。プリンター によっては記載のないビットもセットされるかもしれないので、注意のこと。 .IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPRESET)\fP" .\"O Resets the printer. .\"O No argument is used. プリンターをリセットする。引数はとらない。 .\"O .SH FILES .SH ファイル /dev/lp* .\"O .\" .SH AUTHORS .\" .SH 著者 .\"O .\" The printer driver was originally written by Jim Weigand and Linus .\"O .\" Torvalds. .\"O .\" It was further improved by Michael K.\& Johnson. .\"O .\" The interrupt code was written by Nigel Gamble. .\"O .\" Alan Cox modularized it. .\"O .\" LPCAREFUL, LPABORT, LPGETSTATUS were added by Chris Metcalf. .\" プリンタードライバは初めは Jim Weigand と Linus Torvalds によって書 .\" かれ、さらに Michael K.\& Johnson によって改良された。割り込みのコード .\" は Nigel Gamble によって書かれた。また、Alan Cox はドライバをモジュー .\" ル化した。 .\" LPCAREFUL, LPABORT, LPGETSTATUS は Chris Metcalf によって加えられた。 .\"O .SH "SEE ALSO" .SH 関連項目 .BR chmod (1), .BR chown (1), .BR mknod (1), .BR lpcntl (8), .BR tunelp (8) .\" .SH 翻訳者 .\" 石川 睦 , .\" 高橋 睦司 .SH 翻訳者注 カーネル 2.1.x ではパラレルポートまわりが大幅に書き直されています。 したがって、カーネル 2.1.x のパラレルポートドライバには、 このマニュアルの内容はそのまま適用できません。