Re: [PARPORT] Parallel Port Midi driver?

From: Tim Waugh (twaugh@redhat.com)
Date: Tue Jan 15 2002 - 05:56:52 EST

  • Next message: E.John Joseph: "[PARPORT] "lpd" Problem"

    On Tue, Jan 15, 2002 at 10:37:50AM +0900, ÃÖ Á¾È¯ wrote:

    > if (negotiate_first ) {

    Presumably you tried setting this to 1 as well as 0..

    > for ( ; ;) {
    > struct pollfd pfd;
    > pfd.fd = fd;
    > pfd.events = POLLIN;
    >
    > if ( poll(&pfd, 1, 1000 ) > 0 ) {
    > while ( (nread=read(fd, &rchar, 1)) > 0 )
    > printf("%x ", rchar);
    > }
    > printf(".");
    > fflush(stdout);
    > }

    The poll implementation provided by ppdev is extremely minimal, and
    doesn't provide information about buffer availability, just
    interrupts. You don't want to use it here unless you really don't
    want to try reading unless you get an interrupt.

    Incidentally, you might find the libieee1284 library easier to get
    along with than using raw ioctls: it has more documentation than ppdev
    does, at least.

    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 : Tue Jan 15 2002 - 05:59:49 EST