io_reset(3I) — Series 300, 400, 800 Only
NAME
io_reset() − reset an I/O interface
SYNOPSIS
#include <dvio.h>
int io_reset(int eid);
DESCRIPTION
io_reset() resets the interface associated with the device file that was opened. It also pulses the peripheral reset line on the GPIO interface, or the IFC line on the HP-IB. eid is an entity identifier of an open HP-IB, Centronics-compatible parallel interface, or GPIO device file obtained from an open(), dup(), fcntl(), or creat() call.
io_reset() also causes an interface to go through its self-test, and returns a failure indication if the interface fails its test.
RETURN VALUE
io_reset() returns 0 (zero) if successful, or −1 if an error was encountered.
ERRORS
io_reset() fails under the following circumstances, and sets errno (see errno(2)) to the value indicated:
[EBADF] eid does not refer to an open file.
[ENOTTY] eid does not refer to a channel device file.
[EIO] Interface could not be reset or failed self-test.
[EACCES] The interface associated with this eid is locked by another process and O_NDELAY is set for this eid (see io_lock(3I)).
DEPENDENCIES
Series 300/400:
When an HP-IB interface is reset, the interrupt mask is set to 0, the parallel poll response is set to 0, the serial poll response is set to 0, the HP-IB address is assigned its powerup default value, the IFC line is pulsed (if system controller), the card is put on line, and REN is set (if system controller).
When a GPIO interface is reset, the peripheral reset line is pulled low, the PCTL line is placed in the clear state, and if the DOUT CLEAR jumper is installed, the data out lines are all cleared. The interrupt enable bit is also cleared.
Interface self-test is not supported.
AUTHOR
io_reset() was developed by HP.
Hewlett-Packard Company — HP-UX Release 9.0: August 1992