1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
|
'\" 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 <ishikawa@linux.or.jp>
.\" and TAKAHASHI Mutsuji <muz@ilp.iijnet.or.jp>
.\"
.\" Japanese Version Last Modified Sun Jan 11 03:42:56 JST 1998
.\" by ISHIKAWA Mutsumi <ishikawa@linux.or.jp>
.\"
.\" 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"
.SH ̾
lp \- 饤ץǥХ
.SH
.B #include <linux/lp.h>
.SH
\fBlp\fP[0\(en2] ϥѥץΤΥ饯ǥХǥ㡼
ʥС 6 ޥʡʥС 0\(en2 ġޥʡʥСϡ١
ɥ쥹 0x03bc, 0x0378, 0x0278 Τ줾ΥץݡȤб
̾ΥǥХեϥ⡼ 220 ʡ root 롼 lp Ȥʤ
Ƥ롣ץݡȤϥݡ(polling)ޤϳ
(interrupts) ΤɤѤƤѤǤ롣ߤѤϡ٤
ͽۤ㤨Х졼ץץݡȤ³
ɤ˿侩롣̤ΥɥåȥޥȥꥯץǤϡݡ
̾ϽʬǤ롣ǥեȤǤϥݡѤ롣
.SH
.BR ioctl (2)
뤬ݡȤƤ롣
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPTIME, int \fP\fIarg\fP\fB)\fP"
ץΥХåե( buffer ) äѤˤʤäɥ饤Фץ
ƥåޤǤ˵ٻߤ֤ \fIarg\fP Ȥ롣®ʥץ
λϤ餷٤ץλˤ䤹ñ̤1ä100ʬ1
ǡǥեȤ20.02äˤ롣ݡɥ饤( polling driver
)Τߤ˱ƶ롣
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPCHAR, int \fP\fIarg\fP\fB)\fP"
ݡɥ饤ФץʸǤΤ
ĥӥ(busy-wait)βκͤ \fIarg\fPȤ롣
⤷٤Ϥ䤷ƥब٤ʤꤹˤ
餹ǥեȤ 1000 Ǥ롣ݡɥ饤ФΤߤ˱ƶ롣
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPABORT, int \fP\fIarg\fP\fB)\fP"
⤷\fIarg\fP 0 ʤ顢ץɥ饤Фϥ顼ˤĤƺƻ
Ԥʳξߤ롣ǥեȤ 0 Ǥ롣
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPABORTOPEN, int \fP\fIarg\fP\fB)\fP"
⤷\fIarg\fP 0 ʤ
.BR open (2)
η̤顼ξ硢ưߤ롣ʳʤ饨顼̵
뤵롣ǥեȤǤϥ顼̵뤵롣
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPCAREFUL, int \fP\fIarg\fP\fB)\fP"
\fIarg\fP0ΤȤˤϡ٤ƤνФλˡڤ졢ե饤
顼Υʥ뤬(false)Ǥ뤳ȤɬפȤ뤬0 ʳʤ餳
Υʥ̵뤵롣ǥեȤǤ⤳Υʥ̵뤵롣
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPWAIT, int \fP\fIarg\fP\fB)\fP"
ץ줿ʸΤԤĤᡢɥ饤Фʸ
Ƥ饹ȥ(strobe)ޤǤԤη֤βȡȥ
ƤӥդˤޤǤԤη֤β \fIarg\fP
롣ͤˤФλ֤ 0.5 ޥäȤ٤иˤ
Υɤˤä٤ǽʬǤ롣ΤᡢǥեȤǤ 0
롣ϡݡȳߥɥ饤ФξǻȤ롣
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPSETIRQ, int \fP\fIarg\fP\fB)\fP"
.BR ioctl (2)
Ȥˤϡѡ桼θ¤ɬפǤ롣IRQ
.I int
ȤƤȤ롣ޤѤȤƥץϥꥻåȤ롣
\fIarg\fP0λޤϥǥեȤưǤϡݡɥ饤СȤ
롣
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPGETIRQ, int *\fP\fIarg\fP\fB)\fP"
ȤƤIRQ\fIarg\fPˤ롣
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPGETSTATUS, int *\fP\fIarg\fP\fB)\fP"
ơݡȤͤ\fIarg\fP˼롣ƥӥåȤˤϼΤ褦ʰ̣
롧
.TS
l l.
LP_PBUSY ӥȿžϥƥ
LP_PACK Υå桢ƥ
LP_POUTPA ڤ쿮桢ϥƥ
LP_PSELECD 桢ϥƥ
LP_PERRORP 顼桢ƥ
.TE
.sp
ΰ̣ˤĤƤϳƼΥץΥޥ˥奢ȤΤȡץ
ˤäƤϵܤΤʤӥåȤ⥻åȤ뤫⤷ʤΤǡդΤȡ
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPRESET)\fP"
ץꥻåȤ롣ϤȤʤ
.SH ե
/dev/lp*
.\" .SH
.\" ץɥ饤ФϽ Jim Weigand Linus Torvalds ˤäƽ
.\" 졢 Michael K.\& Johnson ˤäƲɤ줿ߤΥ
.\" Nigel Gamble ˤäƽ줿ޤAlan Cox ϥɥ饤Ф⥸塼
.\" 벽
.\" LPCAREFUL, LPABORT, LPGETSTATUS Chris Metcalf ˤäƲä줿
.SH Ϣ
.BR chmod (1),
.BR chown (1),
.BR mknod (1),
.BR lpcntl (8),
.BR tunelp (8)
.\" .SH
.\" <ishikawa@linux.or.jp>,
.\" ⶶ ӻ <muz@ilp.iijnet.or.jp>
.SH
ͥ 2.1.x ǤϥѥݡȤޤ꤬˽ľƤޤ
äơͥ 2.1.x Υѥݡȥɥ饤Фˤϡ
Υޥ˥奢ƤϤΤޤŬѤǤޤ
|