[Prev][Next][Index][Thread]

Re: Foolish Me...



Scott Laird writes:

 > It's alternating one line, at more like 10 Hz on my system.  I don't 
 > have the output handy, but if you watch a trace of the QuickCam program 
 > in Wine, you'll see that it ignores this stream anyway -- it sends a 
 > reset and waits for an acknoledgement.

Fortunately, we're running over a real operating system, so we can
just check /proc/ioports to see if a parallel port is available.  If
it is, then we read the status register for a second and see if we see
the expected bits wiggling.  If not, try another parallel port address.

 > Here's the beginning, with the 
 > first part of the brightness command.
 > 
 >   IO: 0x0020 (1 bytes) to port 0x37a
 >   IO: 0x0075 (1 bytes) to port 0x378
 >   IO: read from port 0x378, res = 0x0075

Note how they're setting the port to input mode, then they're
outputting a known value to the output port?  I'm pretty sure that
they're doing this to see if the parallel port is bidirectional.  I
suspect that, if you read back something *other* than 0x75, that the
port is bidirectional.  Anybody have a bidirectional parallel port to
test this theory?

-russ <nelson@crynwr.com>    http://www.crynwr.com/~nelson
Crynwr Software   | Crynwr Software sells packet driver support | PGP ok
11 Grant St.      | +1 315 268 1925 voice | Good government is a contradiction
Potsdam, NY 13676 | +1 315 268 9201 FAX   | in terms.  Ask me for details.

Follow-Ups: References: