On Tue, Jun 19, 2001 at 06:40:47PM +0200, Uwe Bonnes wrote:
> isn't ppdev also good for any emulation (wine,dosemu), where the
> emulated program does direct port access e.g. with inb() and
> outb(). The emulated programm might also want to access the fifo
> addresses...
That's not what ppdev is for. It isn't 'access to a PC-style parallel
port', but 'access to an IEEE 1284 parallel port of some sort', with
an interface that is supposed to make it fast for actually using
PC-style ports since they're so common. For emulation, you need to
actually do the emulation and pretend that you're a parallel port.
Dream up a set of hardware modes that you can provide assistance with
(or better yet, ask ppdev). Then trap the I/O and handle it. For SPP
registers, easy: ioctl ppdev.
For EPP register accesses, you need to ioctl ppdev into EPP mode (if
necessary), and read() or write() the appropriate amount. [Yes, this
is another valid reason that you might not know how much data to
expect, and I was wrong the other day when I said that you should
always know.]
For ECR accesses, you need to be smarter. If you are going to offer
an ECR, your 'FIFO' can be just a buffer that periodically write()s
out to ppdev, or in input mode read()s with a short timeout.
The easiest thing to do, of course, is to only offer emulated SPP
registers..
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 Jun 19 2001 - 12:50:16 EDT