This module supports up to 6 pclta interfaces and runs in full
interrupt mode. The supported IRQs are 5,9,10,11,12 and 15,
according to the 'PCLTA Users Guide'.

INSTALLATION
------------

In order to succesfully compile and install the module, you should
have the following packages installed on your linux system:

    gcc (tested with 2.7.2.1)
    modules (tested with 2.1.34)
    kernel sources (tested with 2.0.30)

Unpack the sources where ever you like and change to 'pclta'
directory. Compile the sources with

    $ make pclta.o

You should get no error or warning messages during compilation. If
you get them though, then you probably haven't installed kernel
sources correctly. Check for /usr/include/asm and /usr/include/linux
links.

If everything works fine then you are able to try inserting the module
into kernel. You must be superuser to be able to do that. To insert
the module, type the following:

    # /sbin/insmod pclta.o probe_io=<card_io> probe_irq=<card_irq> major=<mjr>

You MUST specify <card_io> (e.q. 0x340) and <card_irq> (e.q. 9). The default
major number is 40, but you can overwrite this. To check if the module has
been installed properly, type:

    # /sbin/lsmod

You should find line that reads Module: pclta, Pages:1, Used by:0. If
it fails, look at /var/log/messages and the sources and try to figure out
what went wrong. You can also send me an e-mail.

To remove module, type:

    # /sbin/rmmod pclta.o

USAGE
-----

To use the card in you programms you must create character device file
for your card (you've chosen <mjr> when inserting the module, didn't you?):

    # mknod /dev/pclta c <mjr> 0
    # chmod 666 /dev/pclta

Now you can use open(), read(), write() and close() syscalls as with any
other file. With the open() you can open the device, and close it with
the close() function. The read() function will return an uplink packet. The
format of the packet is described in the 'Host Application User's Guide'.
The read() function will block if there are no packets available, unless you
have set the O_NONBLOCK flag, in which case it returns with errno set to
EWOULDBLOCK. The write() function behaves in the same manner.

Advanced users can also use the select() system call. It works as expected.

SUPPORT FOR MULTIPLE CHANNELS
------------------------------

The module supports up to 6 LON chanells on the same system. If you want
to use more than one channel, you have to enter list of io's and irq's when
inserting module and create character devices accordingly.
For example (two channels in this case):

    # /sbin/insmod pclta.o probe_io=0x340,0x350 probe_irq=5,9
    # mknod /dev/pcltaa 40 0
    # chmod 666 /dev/pcltaa
    # mknod /dev/pcltab 40 1
    # chmod 666 /dev/pcltab

The /dev/pcltaa will be the channel with base_io 0x340 and irq 5, while the
/dev/pcltab represents the one with base_io 0x350 and irq 9. You must have
noted that the minor numbers are mapped to channels starting with 0 and
increasing by 1 for each additional channel.

Have fun...

--
Miran
