NAME
inb, ins, inl, outb, outs, outl, insb, inss, insl, outsb, outss,
outsl – programmed I/O |
SYNOPSIS
int inb(int port) ushort ins(int port) ulong inl(int port) void outb(int port, int value) void outs(int port, ushort value) void outl(int port, ulong value) void insb(int port, void *address, int count) void inss(int port, void *address, int count) void insl(int port, void *address, int count) void outsb(int port, void *address, int count) void outss(int port, void *address, int count)
void outsl(int port, void *address, int count) |
DESCRIPTION
The x86 implementation provides functions to allow kernel code
written in C to access the I/O address space. On several other
architectures such as the PowerPC and Strongarm, the platform–dependent
code provides similar functions to access devices with an I/O
space interface, even when that is memory mapped, to
encourage portability of device drivers. Inb, ins and inl apply the corresponding hardware instruction to fetch the next byte, short or long from the I/O port. Outb, outs and outl output a value to the I/O port.
The remaining functions transfer count bytes, shorts, or longs
using programmed I/O between a memory address and port. Functions
insx copy values into memory; functions outsx copy values from
memory. The count is in elements, not bytes. |
SOURCE
/sys/src/9/pc/l.s |
SEE ALSO
dma(9) |