Re: [PARPORT] inb (problems)

From: Tim Waugh (twaugh@redhat.com)
Date: Fri Apr 07 2000 - 03:32:00 EDT

  • Next message: Steven Griffiths: "Re: [PARPORT] inb (problems)"

    On Thu, 6 Apr 2000, Samuel Ace Winchenbach wrote:

    > Hello, I have been having troubles reading values from the control
    > port (base + 2 == 0x37A) the following code sets all the pins on the
    > control port high. I do this by "poking" the value 4 to 0x37A.
    > Seeing the two least significant and the last bit are all inverted, to
    > set the line high you poke a zero. bit 2 is non-inverted so to set
    > the pin high, set the bit to 1 (which happens to be 4). Then I put it
    > in an infinite loop... waiting for an external device to pull a pin
    > low. Seeing that the control port has read/write access I should be
    > able to tell when something pulls the line low. Can anyone help me
    > with this?

    Are you really expecting the device to do that? It might damage the port!

    The status lines are for peripheral-to-host communication, and often the
    data lines are bi-directional (the host data line drivers can be turned
    off via one of the control port bits).

    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 : Fri Apr 07 2000 - 03:34:37 EDT