Resetting Interfaces - HP 9000 Series 300 Tutorials Manual

Device i/o and user interfacing hp-ux concepts and tutorials
Hide thumbs Also See for HP 9000 Series 300:
Table of Contents

Advertisement

Resetting Interfaces
The DIL routine io_reset can be used to reset both HP-IB and GPIO
interfaces.
The following example call to io_reset resets the interface whose entity
identifier is eid where eid is the value that was returned when the interface
special file was opened.
io_reset(eid);
Refer to the appropriate hardware-specific appendix for more information
about the exact effects of io_reset on HP-IB and GPIO interfaces when used
with various computer models.
For example, suppose that after opening an interface file you want to make sure
the interface has been properly initialized. This is done by calling io_reset
and looking at its return value:
#include <fcntl.h>
#include <errno.h>
main()
{
}
int eid;
if «eid
=
open("/dev/raw_hpib", D_RDWR»
==
-1) {
printf(" open failed, errno
=
%d\n", errno);
exit(2) ;
}
if (io_reset(eid)
==
-1)
{
}
printf("Possible problem with interface\n");
exit
(1) ;
/* program continues if "io_reset" was successful */
General-Purpose Routines
2-13

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hp 9000 series 800

Table of Contents