|
|
coherent
hs Device Driver hs
Device driver for polled serial ports
The COHERENT hhss driver adds support for up to eight serial lines,
/ddeevv/hhss0000 through /ddeevv/hhss0077.
Serial lines controlled via the hhss driver can be opened in one of
two ways, as follows:
/ddeevv/hhss??
Polled, local mode (no modem control).
/ddeevv/hhss??rr
Polled, remote mode (modem control).
Any port used with the hhss device driver will be polled, i.e.,
interrupt operation is not used. Please refer to the Lexicon
article ccoomm for explanations of ``local'' vs ``remote'' and
``polled'' vs ``interrupt-driven''.
To use the hhss driver, first configure it to match your equipment
(see below), then load the driver using the following command
while running as the superuser rroooott:
/etc/drvld -r /drv/hs
To unload the driver without rebooting COHERENT, first use the ppss
command with the -dd option to get the process identifier for the
hhss driver process, then unload the driver process by using the
kkiillll command. Note that the hhss driver process will not unload
until all ooppeenned ports have been closed. For example (user input
shown in bold):
$ ppss -dd
TTY PID
------- 0 <idle>
------- 38 <hs>
...
$ kkiillll kkiillll 3388
The present version of COHERENT limits ``polled'' operation to
one device driver at a time. Therefore, if any of the ccoomm family
of devices is used in polled mode, hhss devices cannot be used.
Conversely, /ddeevv/ccoomm11ppll through /ddeevv/ccoomm44ppll and /ddeevv/ccoomm11pprr
through /ddeevv/ccoomm44pprr cannot be used if the hhss driver is in use.
Both drivers can be present at the same time, but polled devices
may not be ooppeenn under both drivers at the same time. Note that
enabling a port via /eettcc/eennaabbllee keeps it open continuously.
COHERENT Lexicon Page 1
hs Device Driver hs
***** Port Configuration *****
The default configuration for the hhss driver is for four ports, at
hexadecimal addresses 0x3F8, 0x2F8, 0x3E8, and 0x2E8, at a speed
of 9600 baud. The driver is configured by setting the following
parameters:
11. The number of ports.
22. The I/O address for each port.
33. The default speed of each port.
All steps in the configuration must be done as the superuser
rroooott. Patch the number of ports into driver variable HHSSNNUUMM_.
For example, if you wish to support three ports, enter:
/conf/patch /drv/hs HSNUM_=3
Address and speed information are stored sequentially starting at
variable HHSS_PPOORRTTSS_. The speed for each port is indicated by the
corresponding value found in <ssggttttyy.hh>, from one, corresponding
to 50 baud, to 16, corresponding to 9600 baud. If the three
ports in the example above are at hexadecimal adresses of 0x2A0,
0x2B0, and 0x2C0, with speeds of 2400, 2400, and 9600 baud,
respectively, then the following three patches must be performed:
/conf/patch /drv/hs HS_PORTS_=0x2A0 HS_PORTS_+2=12
/conf/patch /drv/hs HS_PORTS_+4=0x2B0 HS_PORTS_+6=12
/conf/patch /drv/hs HS_PORTS_+8=0x2C0 HS_PORTS_+10=16
Finally, nodes must be created for each port using the mmkknnoodd
command. The major device number is 7; the minor number will
range from 0 through 7 for ports /ddeevv/hhss0000 through /ddeevv/hhss0077,
respectively, with 128 added to the device minor number if modem
control is desired. The following commands will make nodes in
/ddeevv for local and remote versions of the three ports in the
example:
/etc/mknod -f /dev/hs00 c 7 0
/etc/mknod -f /dev/hs01 c 7 1
/etc/mknod -f /dev/hs02 c 7 2
/etc/mknod -f /dev/hs00r c 7 128
/etc/mknod -f /dev/hs01r c 7 129
/etc/mknod -f /dev/hs02r c 7 130
***** See Also ***** ccoomm, ddeevviiccee ddrriivveerrss, ddrrvvlldd
COHERENT Lexicon Page 2
hs Device Driver hs
***** Diagnostics *****
An attempt to open a non-existent device will generate error
messages. This can occur if hardware is absent or not turned on.
***** Notes *****
Note that if any ccoomm device driver is used in polling mode, the
hhss driver cannot be used, and vice versa.
COHERENT Lexicon Page 3
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.