HP 9000 Series 300 Tutorials Manual page 158

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

Advertisement

• the special file must be a raw special file in order to use DIL
subroutines with it; therefore, the Ad portion of the minor number must
be 31 (If in hexadecimal).
Based on this information, you would use mknod as follows to create the special
file for the interface:
mknod /dev/raw_hpib c 21 Ox021fOO
To further illustrate the use of mknod, suppose you have two HP-IB interfaces
(major number
=
21) whose switches are set to select codes 2 and 3. The
following mknod commands set up a special file for the interface at select code
02 (/dev/raw_hpib1) and select code 03 (/dev/raw_hpib2):
mknod /dev/raw_hpib1 c 21 Ox021fOO
mknod /dev/raw_hpib2 c 21 Ox031fOO
Creating a GPIO Interface File
Now suppose you have a GPIO interface that you want to access with the DIL
subroutines on the same computer.
Because the GPIO interface does not use a bus architecture, the usual bus
address (Ad) and secondary address (UV) components of mknod's minor number
are ignored, and you need only determine the select code value.
Assuming that you have set the interface select code switches to 04 on
the Series 300 GPIO card, the following mknod command will create the
appropriate special file, named /dev/raw_gpio:
mknod
/dev/raw_gpio
c
22
Ox040000
A-6
Series 300 Dependencies

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hp 9000 series 800

Table of Contents