1 .\" Copyright (c) 2000-2002
2 .\" Diomidis D. Spinellis, Athens, Greece
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer as
10 .\" the first lines of this file unmodified.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY Diomidis D. Spinellis ``AS IS'' AND ANY
16 .\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Diomidis D. Spinellis BE
19 .\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
22 .\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23 .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
24 .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
25 .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 .Nd 8255 parallel peripheral interface basic
41 .Pa /boot/device.hints :
42 .Cd hint.pbio.0.at="isa"
43 .Cd hint.pbio.0.port="0x360"
49 driver supports direct access to the Intel 8255A programmable
50 peripheral interface (PPI) chip running in mode 0 (simple
52 Such an interface provides 24 digital
55 The driver is designed for performing
57 under program control using
58 peripherals such as the
61 card, which emulates the Intel 8255A PPI in mode 0.
62 Other 8255A-based peripherals such as the
66 card have also been reported to work.
68 The PPI provides two 8-bit ports (port A and port B) and
69 two 4-bit ports (port C upper, port C lower).
70 Each port can be individually programmed for input and
72 and appears at a different offset of the device's base
76 A separate register allows the configuration of ports for input
78 The device is so simple, that reliably probing for it when
79 input data arrives at its terminals is impossible;
80 therefore the kernel configuration has to specify the
81 device's base address.
82 The device driver provides four character devices that
83 correspond to the peripheral's
86 Opening a device for read or write automatically configures
87 the corresponding hardware port for input or output.
88 At boot time all ports are set configured for input to avoid damaging
93 requests allow polled input and paced output to be
94 efficiently performed at the driver level without expensive
95 user/kernel context switching.
96 The driver can perform
98 in three different ways:
99 .Bl -tag -width ".No Differential"
101 The read or write operation returns immediately after reading
102 or writing the data to the port at bus speed.
104 Data is transferred from or to the port at intervals specified
110 Only port values that differ from the previous port value are returned.
113 The pacing interval is specified in
119 will result in no more than one value being read or written every
122 Single byte read/write operations will take at least
129 .Bl -tag -width ".Dv PBIO_SETIPACE"
131 accepts a pointer to an integer as the third argument,
132 and sets the driver for differential input if the integer is non-zero.
133 The input pace speed determines the periodic interval the driver will use to
134 examine the port for a changed value.
136 accepts a pointer to an integer as the third argument,
137 and sets the integer to the last set value for differential input.
139 accepts a pointer to an integer as the third argument,
140 and sets the driver's input pacing speed to the value of that integer.
142 accepts a pointer to an integer as the third argument,
143 and sets the integer to the last set value for the input pace.
145 accepts a pointer to an integer as the third argument,
146 and sets the driver's output pacing speed to the value of that integer.
148 accepts a pointer to an integer as the third argument,
149 and sets the integer to the last set value for the output pace.
152 .Bl -tag -width ".Pa /dev/pbio0ch" -compact
168 .%A "Diomidis Spinellis"
169 .%T "The information furnace: Consolidated home control"
171 .%J "Personal and Ubiquitous Computing"
179 device was first used under
182 .An "Diomidis D. Spinellis" Aq dds@aueb.gr
186 card's inputs can optionally be wired to generate an interrupt.
187 This feature is not supported.