2 .\" Copyright (c) 2006, Sun Microsystems, Inc.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH INB 9F "Oct 24, 2012"
8 inb, inw, inl, repinsb, repinsw, repinsd \- read from an I/O port
13 #include <sys/sunddi.h>
15 \fBunsigned char\fR \fBinb\fR(\fBint\fR \fIport\fR);
20 \fBunsigned short\fR \fBinw\fR(\fBint\fR
26 \fBunsigned long\fR \fBinl\fR(\fBint\fR \fIport\fR);
31 \fBvoid\fR \fBrepinsb\fR(\fBint\fR \fIport\fR, \fBunsigned char *\fR\fIaddr\fR, \fBint\fR
37 \fBvoid\fR \fBrepinsw\fR(\fBint\fR \fIport\fR, \fBunsigned short *\fR\fIaddr\fR, \fBint\fR
43 \fBvoid\fR \fBrepinsd\fR(\fBint\fR \fIport\fR, \fBunsigned long *\fR\fIaddr\fR, \fBint\fR
50 The functions described here are obsolete. For the \fBinb()\fR, \fBinw()\fR,
51 and \fBinl()\fR functions, use, respectively, \fBddi_get8\fR(9F),
52 \fBddi_get16\fR(9F), and \fBddi_get32\fR(9F) instead. For \fBrepinsb()\fR,
53 \fBrepinsw()\fR, and\fBrepinsl()\fR, use, respectively, \fBddi_rep_get8\fR(9F),
54 \fBddi_rep_get16\fR(9F), and \fBddi_rep_get32\fR(9F) instead.
62 A valid I/O port address.
71 The address of a buffer where the values will be stored.
80 The number of values to be read from the I/O port.
86 These routines read data of various sizes from the I/O port with the address
87 specified by \fIport\fR.
90 The \fBinb()\fR, \fBinw()\fR, and \fBinl()\fR functions read 8 bits, 16 bits,
91 and 32 bits of data respectively, returning the resulting values.
94 The \fBrepinsb()\fR, \fBrepinsw()\fR, and \fBrepinsd()\fR functions read
95 multiple 8-bit, 16-bit, and 32-bit values, respectively. \fIcount\fR specifies
96 the number of values to be read. A pointer to a buffer will receive the input
97 data; the buffer must be long enough to hold count values of the requested
102 The \fBinb()\fR, \fBinw()\fR, and \fBinl()\fR functions return the value that
103 was read from the I/O port.
107 These functions may be called from user, interrupt, or kernel context.
111 See \fBattributes\fR(5) for descriptions of the following attributes:
119 ATTRIBUTE TYPE ATTRIBUTE VALUE
123 Stability Level Obsolete
129 \fBisa\fR(4), \fBattributes\fR(5), \fBddi_get8\fR(9F), \fBddi_get16\fR(9F),
130 \fBddi_get32\fR(9F), \fBddi_rep_get8\fR(9F), \fBddi_rep_get16\fR(9F),
131 \fBddi_rep_get32\fR(9F), \fBoutb\fR(9F)
134 \fIWriting Device Drivers\fR