Re: [PARPORT] Reading individual data pins from user-space application?

From: Jeremy Elson (jelson@usc.edu)
Date: Wed Jul 26 2000 - 15:07:02 EDT

  • Next message: Jeremy Elson: "Re: [PARPORT] Reading individual data pins from user-space application?"

    I wrote a library that does this very thing, called Parapin:

    http://www.circlemud.org/~jelson/software/parapin

    Regards,
    Jeremy

    Jan Prikryl writes:
    >Hi,
    >
    >after getting the userland parport driver to work (thanks Tim) I have
    >another problem:
    >
    >I have a very simple pen-like device with three microswitches
    >grounding pins D0 - D2 to the ground data od the port. Allowing access
    >to "/dev/port" for normal users I am able to switch the port to
    >data-input mode and read whether pins D0 - D2 are grounded or not. I
    >thought the safer way of reading the parallel port would be possible
    >using the userland driver ioctl() calls, but I do not get any
    >meaninful input from the port either using read() on port that has
    >been set to input mode, or using ioctl(PPRDATA).
    >
    >The sequence is ioctls after opening the port for reading/writing that
    >I have tried was
    >
    > PPCLAIM
    > PPSETMODE to IEEE1284_MODE_ECP
    > PPDATADIR to 1
    > PPRDATA (or read() one byte)
    >
    >Am I doing something wrong or is this task something that ppdev has
    >not been designed for?
    >
    >Thanks.
    >
    >-- jan
    >
    >--------------------+------------------------------------------------------
    > Jan Prikryl | vr|vis center for virtual reality and visualisation
    > <prikryl@vrvis.at> | http://www.vrvis.at
    >--------------------+------------------------------------------------------
    >
    >-- To unsubscribe, send mail to: linux-parport-request@torque.net --
    >-- with the single word "unsubscribe" in the body of the message. --

    -- 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 : Wed Jul 26 2000 - 15:12:55 EDT