HP-UX Reference (11i v2 07/12) - 7 Device (Special) Files, 9 General Information, Index (vol 10)

h
hil(7) hil(7)
(PA-RISC Systems Only)
of data in each packet, in which case the count and the packet can both be read in the same system call.
If the file status flag, O_NDELAY, is set and no data is available,
read() returns
0 instead of blocking.
write() is not supported by hil.
select() can be used to poll for available input from HP-HIL devices.
select() for write or for
exception conditions always returns a false indication in the file descriptor bit masks.
The
ioctl() is used to perform special operations on HP-HIL devices.
ioctl() system calls all have
the form:
int ioctl(int fildes, int request, char *arg);
The following request codes are defined in
<sys/hilioctl.h>
:
HILID Identify and Describe
This request returns the Identify and Describe Record in the
char variable to which arg
points, as supplied by the specified HP-HIL device. The Identify and Describe Record is
used to determine the type and characteristics of each device connected to the link. The
Identify and Describe Record can vary in length from 2 to 11 bytes. The record contains at
least:
A Device ID byte, and
A Describe Record Header byte.
The Device ID byte is used to identify the general class of a device, and its nationality in
the case of a keyboard or keypad. The Describe Record Header byte describes the position
report capabilities of the device. The Describe Record Header byte also indicates if an I/O
Descriptor byte follows at the end of the Describe Record. It also indicates support of the
Extended Describe and the Report Security Code requests. If the device is capable of
reporting any coordinates, the Describe Record contains the device resolution immediately
after the Describe Record Header byte. If the device reports absolute coordinates, the max-
imum count for each axis is specified after the device resolution. The I/O Descriptor byte
indicates how many buttons the device has. The I/O Descriptor byte also indicates device
proximity detection capabilities and specifies Prompt/Acknowledge functions. All HP-HIL
devices support the Identify and Describe request.
HILPST Perform Self Test
This request causes the addressed device to perform its self test, and returns the one-byte
test result in the
char variable to which arg points. A test result of zero indicates a suc-
cessful test, non-zero results indicate device-specific failures. All HP-HIL devices support
the Self Test request.
HILRR Read Register
The Read Register request expects an HP-HIL device register address in the char variable
to which arg points, and returns the one-byte contents of that register in *arg. The
Extended Describe Record indicates whether a device supports the Read Register request.
HILWR Write Register
The Write Register request expects
*arg to contain a record containing one or more packets
of data, each containing the HP-HIL device register address and one or more data bytes to
be written to that register. There are two types of Register Writes. Type 1 can be used to
write a single byte to each individual device register. Type 2 can be used to write several
bytes to one register. The Extended Describe Record indicates if a device supports either or
both types of register write requests.
HILRN Report Name
The Report Name request returns the device description string in the character array to
which arg points. The string may be up to fifteen characters long. The Extended Describe
Record indicates support of the Report Name request.
HILRS Report Status
The Report Status request returns the device-specific status information string in the char-
acter array to which arg points. The string can be up to fifteen bytes long. The Extended
Describe record indicates support of the Report Status request.
HP-UX 11i Version 2: December 2007 Update 2 Hewlett-Packard Company 57