Re: [PARPORT] I/O ports and the parallel interface

From: Tim Waugh (
Date: Wed Jan 29 2003 - 17:26:27 EST

  • Next message: Joe Lang: "Re: [PARPORT] I/O ports and the parallel interface"

    On Wed, Jan 29, 2003 at 08:56:16PM +0000, Joe Lang wrote:

    > Is there a way to query the kernel (or some other system resource)
    > to determine the I/O ports used by a parallel port adaptor?
    > You know, the base/data, the status, and the control I/O ports.
    > I do understand that the status and control ports are offset from the base,
    > so if I can get the base, that would be enough.

    The first question to ask it whether you need to know those numbers at
    all. The kernel provides an interface for accessing those ports
    without needing to know things like base addresses (the ppdev driver).

    Also, you can use a library like libieee1284 to get a nicer
    programming interface to it.

    > If I look at the output from the dmesg command I see info like:
    > parport0: PC-style at 0x378 [SPP,PS2]
    > How does the parport driver determine the 0x378 value displayed above?

    The kernel figures this out by guessing, largely.

    You can figure out what the kernel guessed by looking in


    -- To unsubscribe, send mail to: --
    -- with the single word "unsubscribe" in the body of the message. --

    This archive was generated by hypermail 2b29 : Wed Jan 29 2003 - 17:28:07 EST