Re: [PARPORT] base address?

From: twaugh@redhat.com
Date: Tue Apr 18 2000 - 05:31:13 EDT

  • Next message: zhu qun ying: "Re: [PARPORT] base address?"

    On Tue, Apr 18, 2000 at 05:23:48PM +0800, zhu qun ying wrote:

    > When I trace into my low level function, the upper layer issue the
    > 'read' function without making the data line reverse. At this point
    > I am not clear of what the usage of xxx_data_forward() and
    > xxx_data_reverse(). Does the upper layer should call the reverse
    > function before making a read? The one I am tracing is
    > parport_device_id(), there are parport_read() calls without setting
    > the direction. I have change my read function to change to reverse
    > mode then forward before return, that seems solve partially my
    > problem. Is this the right way?

    parport_read (in ieee1284.c) calls a low-level port driver's protocol
    read function, depending on the currently negotiated protocol. So for
    instance in reverse nibble mode it will call port->nibble_read_data,
    which doesn't need a bidirectional port and so doesn't use
    data_forward or data_reverse.

    If the currently negotiated mode is reverse byte though,
    port->byte_read_data will get called, which needs to turn off the data
    line drivers (with data_reverse) before the peripheral drives them.

    Is that any clearer?

    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 Apr 18 2000 - 05:31:33 EDT