Re: [PARPORT] Reading from pin - help.

From: Blaise Gassend (blaise@gassend.com)
Date: Thu Dec 19 2002 - 18:46:07 EST

  • Next message: Blaise Gassend: "Re: [PARPORT] Reading from pin - help."

    > > Do something like
    > >
    > > int re;
    > >
    > > fd = open(portname,O_RDWR);
    > >
    > > ioctl(fd,PPRSTATUS,&res);

    > Yep, but when i read from file descriptor the soft is 'blocked' waiting for
    > data.

    Perhaps your lpd currently has the parallel port open or something like
    that.

    > Isnt there anything easier? I just want to read from some pin a data,
    > not\hing more.

    Your code will be a lot more portable if you access the parallel port
    through high-level interfaces rather than through direct port access. As
    for which method is simpler, that is really up for grabs. You might
    actually considering using libieee1284 for maximum portability (accross
    kernel versions and so on).

    If you want help debugging your direct io version, tell us your whole
    program, what your experiment was, what the results were. Saying that
    you use inb and it doesn't work isn't enough for us to be able to help
    you.

    Blaise Gassend

    -- 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 : Thu Dec 19 2002 - 18:47:10 EST