1 .\" $NetBSD: ppi.9,v 1.3 2004/01/23 19:50:43 wiz Exp $
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer as
11 .\" the first lines of this file unmodified.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
16 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS''
17 .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
20 .\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 .\" POSSIBILITY OF SUCH DAMAGE.
28 .\" $FreeBSD: src/share/man/man4/ppi.4,v 1.4.2.7 2001/12/17 11:30:12 ru Exp $
35 .Nd "user-space interface to ppbus parallel port"
39 .In dev/ppbus/ppbus_conf.h
43 interface is performed using
46 Each command takes a single
48 argument, transferring one byte of data.
49 The following commands are available:
50 .Bl -tag -width indent
51 .It Dv PPIGDATA , PPISDATA
52 Get and set the contents of the data register.
53 .It Dv PPIGSTATUS , PPISSTATUS
54 Get and set the contents of the status register.
55 .It Dv PPIGCTRL , PPISCTRL
56 Get and set the contents of the control register.
57 The following defines correspond to bits in this register.
58 Setting a bit in the control register drives the corresponding
60 .Bl -tag -width indent -compact
67 .It Dv PPIGEPP , PPISEPP
68 Get and set the contents of the EPP control register.
69 .It Dv PPIGECR , PPISECR
70 Get and set the contents of the ECP control register.
71 .It Dv PPIGFIFO , PPISFIFO
72 Read and write the ECP FIFO (8-bit operations only).
75 To present the value 0x5a to the data port, drive STROBE low and
76 then high again, the following code fragment can be used:
82 ioctl(fd, PPISDATA, \*[Am]val);
83 ioctl(fd, PPIGCTRL, \*[Am]val);
85 ioctl(fd, PPISCTRL, \*[Am]val);
87 ioctl(fd, PPISCTRL, \*[Am]val);
98 originally appeared in
101 This manual page is based on the
104 manual page and was updated for the
109 The inverse sense of signals is confusing.
113 interface is slow, and there is no way (yet) to chain multiple operations together.
115 The headers required for user applications are not installed as part of the