Re: [PARPORT] Example Code

From: Peter Ryser (Peter.Ryser@xilinx.com)
Date: Fri Mar 30 2001 - 11:44:04 EST

  • Next message: Hernan Gustavo Solari: "Re: [PARPORT] Kernel 2.4.2 + SparQ, would you help me?"

    >
    >
    >> ioctl(fd, PPSETMODE, PARPORT_MODE_STUPID);
    >> write(fd, buffer, 100); /* no handshaking, no timeouts, just write
    >> data as fast as possible to the data port with only one context switch */
    >
    >
    > But it still seems a bit strange to me to want to just write to the
    > data port as fast as possible without ever touching the control lines.

    I have a device that uses one data line as clock and other data lines
    for other purposes. It uses the status lines as back channel. It doesn't
    know anything about the control lines. Data is transmitted by
    continuously setting and clearing the clock line. The device is able to
    receive data pretty fast.

    Using PPWDATA works fine. What I'm trying to do is to speed up data
    transfer. So, I really want to blast out data by using write().

    > (Currently, you can replace PARPORT_MODE_STUPID with
    > IEEE1284_MODE_{COMPAT,ECP,EPP} and have it to the obvious thing.)

    As far as I found out all modes use handshaking. Is there a way to tell
    ppdev/parport to turn off/ignore handshaking?

    - Peter

    -- 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 : Fri Mar 30 2001 - 11:53:26 EST