PCI 8255 LINUX DRIVER
Here is the linux
driver of Decision PCI 8255 card.
And this driver is tested well on the kernel with version 2.2.14.
To decompress the
file: tar -xvzf pci8255dist.tgz
After you
decompress the pci8255dist.tgz file, do the following steps:
1.Login as root.
2.chmod +x install
3.chmod +x uninstall Then you install the module by typing.
4.install After you run 4th step , you will see "Register
Successful",then you will know how many Decision PCI 8255 card and it
wil build a device node in "/dev" named "/dev/dpci8255". If you want to
remove the driver , please run the 5th step.
5.uninstall
Note: You can compile "test.c". It is
the basic I/O program for 8255.
Another "test1.c" is used for test the 8253 timer.
There are 6
function on this driver:
1.int
SetControlWord(int file_desc,int port,char value);
- Set the 8255 Control Register value.
Where:
file_desc - is the file handle
port - the control register port
value - the value to send to the control register
2.char
GetControlWord(int file_desc,int port);
- Get the 8255 Control Register value.
Where:
file_desc - is the file handle
port - the control register port
3.int WritePort(int
file_desc,int port,char value);
- Use to send data.
Where:
file_desc
port - the port to send data
value - the value to send
4.char ReadPort(int
file_desc,int port);
- Use to get data.
Where:
file_desc - is the file handle
port - the port to get data
5.int
WriteCounter(int file_desc,int number,int value);
- Use to send data to counter.
Where:
file_desc - is the
file handle
number - the counter to send data
value - the data to send
6.int
ReadCounter(int file_desc,int number);
- Use to get the value of the data on counter.
Where:
file_desc - is the file handle
number - the counter to get data
For more
information please see the dci8255.h
|