ioprobe(D3DK) —
.IX \f4ioprobe\fP(D3DK)
NAME
ioprobe − probe an I/O address for a device
SYNOPSIS
UNIX System V/68:
#include <sys/types.h>
#include <sys/buf.h>
#include <sys/iosystm.h>
int ioprobe(u_int access, addr_t addr, u_int ∗data);
UNIX System V/88:
#include <sys/types.h>
#include <sys/buf.h>
#include <sys/iosystm.h>
int ioprobe(u_int bus, addr_t addr);
ARGUMENTS
busThe I/O bus to probe (UNIX System V/88 only).
accessThe type of probe desired (UNIX System V/68 only).
addrThe Address to probe.
dataThe data read or written by ioprobe (UNIX System V/68 only).
DESCRIPTION
The ioprobe function is obsolete. Drivers should use nioprobe, instead.
ioprobe is used in driver initialization routines to probe for a controller at addr.
On UNIX System V/68, the controller may be probed in different ways depending on the value of access. The following constants are used to define the access type:
| IOP_READ | 0 |
| IOP_WRITE | 1 |
| IOP_BYTE | 2 |
| IOP_SHORT | 4 |
| IOP_LONG | 6 |
| IOP_DEFBUS | 0 |
ioprobe is called with an access value that is a combination (bit-wise “or”) of these constants. Acceptable access values (defined in sys/iosystm.h) and the resulting behavior of ioprobe follow:
| IOP_READ|IOP_BYTE|IOP_DEFBUS | Read a byte from addr. |
| IOP_READ|IOP_SHORT|IOP_DEFBUS | Read an unsigned short integer from addr. |
| IOP_READ|IOP_LONG|IOP_DEFBUS | Read an unsigned long integer from addr. |
| IOP_WRITE|IOP_BYTE|IOP_DEFBUS | Write a byte to addr. |
| IOP_WRITE|IOP_SHORT|IOP_DEFBUS | Write a short to addr. |
| IOP_WRITE|IOP_LONG|IOP_DEFBUS | Write a long to addr. |
On UNIX System V/88, a specific bus may be selected when ioprobe is called. bus (defined in sys/iosystm.h) may be one of the following:
| VME_A16 | 0x4 |
| VME_A24 | 0x5 |
| VME_A32 | 0x6 |
If addr is invalid or nonexistent, ioprobe returns −1.
RETURN VALUES
Zero if the probe suceeds, or −1 if no device responded.
LEVEL
Base
SEE ALSO
iomapin(D3DK), nioprobe(D3DK)
DDI/DKI