Hi again,
I was following the example of using ppdev in order to access the parallel
port device file, i.e.
int fd;
fd = open("/dev/parport0",O_RDWR);
but fd is returned as -1 and when I check the errno, it says ENODEV. In
the man pages, it says the following:
"pathname refers to a device special file and no
corresponding device exists. (This is a Linux ker-
nel bug - in this situation ENXIO must be
returned.) "
Why would this be the case? Is there something that needs to be done
before trying to open the /dev/parport0 in order to let my program access
this file?
Also I would really like to use the outb() and inb() functions since I
need to set certain pins according to the protocol of my device, is there
a way to do this with the ppdev interface?
Thanks,
-- Andrew Hogue York University Toronto, ON CANADAOn Wed, 28 Mar 2001, Tim Waugh wrote:
> On Tue, Mar 27, 2001 at 06:49:50PM -0500, Andrew Hogue wrote: > > > I am new to writing drivers and would like to see a few simple examples in > > C so that I could write a parallel port driver (preferably kernel level) > > to access some custom hardware of mine. I know the protocol (i.e. which > > bits to set on which pins) in order to access my hardware and how to power > > it up etc... > > drivers/char/lp.c > drivers/net/plip.c > drivers/media/video/cpia_pp.c > drivers/block/paride/* > > Also, do 'make htmldocs' and take a look in Documentation/DocBook. > > Tim. > */ >
-- To unsubscribe, send mail to: linux-parport-request@torque.net -- -- with the single word "unsubscribe" in the body of the message. --
This archive was generated by hypermail 2b29 : Wed Mar 28 2001 - 16:29:38 EST