Re: [PARPORT] Example Code

From: Philip Blundell (philb@gnu.org)
Date: Tue Apr 03 2001 - 17:43:31 EDT

  • Next message: Gene Heskett: "Re: [PARPORT] Freecom CD/RW problems"

    >>Which seems better?
    >
    >ioctl(fd, PPSPEW, buffer, len)
    >
    >or
    >
    >ioctl (fd, PPHANDSHAKE, &turn_off);
    >write (fd, buffer, len);
    >
    >or
    >
    >ioctl (fd, PPSETMODE, IEEE1284_MODE_SPEW);
    >write (fd, buffer, len);

    I'd rate them in descending order of preference as you've written them there.

    Basically I think that this new mode is sufficiently oddball that I want to
    keep it isolated in its own little corner: I don't want write() to have to
    check some extra flag every time in order to figure out what to do. Since
    SPEW isn't even slightly an IEEE1284 mode, the third option you gave seems
    particularly distasteful. The middle one I could live with, but it doesn't
    seem to have all that much going for it.

    Anybody else have an opinion?

    p.

    -- 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 Apr 03 2001 - 18:31:50 EDT