Tim Waugh (email@example.com)
Tue, 1 Dec 1998 01:47:33 +0000 (GMT)
My attempt at an implementation of IEEE-1284 can be found at:
That file should replace linux/drivers/misc/parport_ieee1284.c, and the
following kernel patch should be applied:
It applies to clean 2.1.130, despite the name.
The approach I've taken is to try to keep things simple. The main exposed
int parport_ieee1284_negotiate (struct parport *, int mode);
ssize_t parport_ieee1284_read_block (struct parport *, char *, size_t);
ssize_t parport_ieee1284_write_block (struct parport *, char *, size_t);
IEEE1284_NONE (compatibility mode)
IEEE1284_NIBBLE (reverse nibble)
IEEE1284_BYTE (reverse byte)
All but IEEE1284_NONE may be or-ed with IEEE1284_DEVICEID.
The read/write functions don't renegotiate unless they have to, and do not
Negotiating to mode IEEE1284_NONE is the same as termination
(parport_ieee1284_terminate). Negotiating to the current mode is a no-op.
My hope is that the printer driver can just call
parport_ieee1284_write_block for the polling case, although most of the
code will remain in order to utilize interrupts.
The code is largely untested, although nibble-mode reading and
compatibility-mode writing work for my printer.
Comments are welcome...
-- To unsubscribe, send mail to: firstname.lastname@example.org --
-- with the single word "unsubscribe" in the body of the message. --
This archive was generated by hypermail 2.0b3 on Wed 30 Dec 1998 - 10:18:49 EST