Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!ucbcad!ucbvax!sdcsvax!ucsdhub!hp-sdd!hplabs!hpcea!hpfcdc!hpfcmp!hpfcms!rocky From: rocky@hpfcms.HP.COM ( Rocky Craig ) Newsgroups: comp.sys.hp Subject: Re: HP gpio info requested Message-ID: <3350010@hpfcms.HP.COM> Date: Mon, 20-Apr-87 11:54:24 EST Article-I.D.: hpfcms.3350010 Posted: Mon Apr 20 11:54:24 1987 Date-Received: Sat, 25-Apr-87 00:11:28 EST References: <231@phoenix.PRINCETON.EDU> Organization: Hewlett-Packard, Fort Collins, CO Lines: 37 > HP documentation mentions several C routines that look useful, such as > "gpio_set_ctl ()". The problem is, no info is given on where the source > code for this routine is. An older document stated that such code was > in the dvio library, but that isn't the case (now). The routines to which you refer are documented in the "HP-UX Concepts and Tutorials (Volume 4): Device I/O and User Interfacing" manual. The routines form the "Device I/O Library" (DIL) which is an HP-UX extension to allow device (peripheral) I/O. Individual manual pages are found in section 3 ( gpio_set_ctl(3I) ). No source code is provided; there is an include file and a library (written in C). I'm speaking in reference to Series 300, Revision 5.2 (current). DIL also exists on the Series 500 and 800. Each GPIO card needs a character special file. The driver is "gpio", major number 22; only the select code is valid in the minor number. This information can be found in the Configuration Reference Manual section for the 98622A. The device can be accessed via open(2), close(2), read(2) and write(2) for simple data transfer. The DIL routines all require the file descriptor returned from an open(2). I have actually gotten things to work fairly easily. The biggest chance for problems is with the hardware: incompatible polarity settings on PCTL/PFLG, etc. Many people use HP's BASIC Workstation (much more friendly and I/O- oriented) to verify correct hardware operation before tackling the HP-UX implementation. One easy gotcha: The BASIC driver will ignore PSTS by default, whereas the HP-UX driver won't. The result: your BASIC code works, but HP-UX may claim the card/peripheral is dead. > Any info would be greatly appreciated, and would earn you a footnote & > undying gratitude. Good; I would hate to have "dying ungratitude" on my HP conscience :-) Rocky Craig Hewlett-Packard, Systems Software Operation ...hplabs!hpfcla!rocky