INB(9F)                 Kernel Functions for Drivers                 INB(9F)
NAME
       inb, inw, inl - read from an I/O port
SYNOPSIS
       #include <sys/ddi.h>
       #include <sys/sunddi.h>       
unsigned char inb(
int port);       
unsigned short inw(
int port);       
unsigned long inl(
int port);
INTERFACE LEVEL
       The functions described here are obsolete. For the 
inb(), 
inw(), and       
inl() functions, use, respectively, 
ddi_get8(9F), 
ddi_get16(9F), and       
ddi_get32(9F) instead.
PARAMETERS
       port                A valid I/O port address.       
addr                The address of a buffer where the values will be stored.       
count                The number of values to be read from the I/O port.
DESCRIPTION
       These routines read data of various sizes from the I/O port with the
       address specified by 
port.
       The 
inb(), 
inw(), and 
inl() functions read 8 bits, 16 bits, and 32
       bits of data respectively, returning the resulting values.
RETURN VALUES
       The 
inb(), 
inw(), and 
inl() functions return the value that was read
       from the I/O port.
CONTEXT
       These functions may be called from user, interrupt, or kernel
       context.
ATTRIBUTES
       See 
attributes(7) for descriptions of the following attributes:
       +----------------+-----------------+
       |ATTRIBUTE TYPE  | ATTRIBUTE VALUE |
       +----------------+-----------------+
       |Architecture    | x86             |
       +----------------+-----------------+
       |Stability Level |  Obsolete       |
       +----------------+-----------------+
SEE ALSO
       isa(5), 
attributes(7), 
ddi_get16(9F), 
ddi_get32(9F), 
ddi_get8(9F),       
outb(9F)       Writing Device Drivers                             September 12, 2020                      INB(9F)