hil.7 (2010 09)

h
hil(7) hil(7)
system call.
If the file status flag, O_NDELAY, is set and no data is available, read(2) returns
0 instead of blocking.
write (2) is not supported by
hil.
select (2) can be used to poll for available input from HP-HIL devices. select (2) for write or for exception
conditions always returns a false indication in the file descriptor bit masks.
ioctl (2) is used to perform special operations on HP-HIL devices. ioctl (2) 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 posi-
tion 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 immedi-
ately after the Describe Record Header byte. If the device reports absolute coordinates,
the maximum 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 func-
tions. 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 sup-
port the Self Test request.
HILRR Read Register
The Read Register request expects an HP-HIL device register address in the
char vari-
able 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 pack-
ets 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
character 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.
2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010