Hi
I want to write some ap to read / write and io control input driver, is it possible ?
How can I access an input driver, can I use fopen / read / write , is there some good sample ?
Thank you .
Hi
I want to write some ap to read / write and io control input driver, is it possible ?
How can I access an input driver, can I use fopen / read / write , is there some good sample ?
Thank you .
My PC parallel port document at
Linux will allow acess to any port using the ioperm syscall. Here is some code parts for Linux to write 255 to printer port:
#include #include #include #include
#define base 0x378 /* printer port base address */ #define value 255 /* numeric value to send to printer port */
main(int argc, char **argv) { if (ioperm(base,1,1)) fprintf(stderr, "Couldn't get the port at %x\n", base), exit(1);
outb(value, base); }
For reading use inb() function.
-- Tomi Engdahl (http://www.iki.fi/then/) Take a look at my electronics web links and documents at
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.