[PARPORT] IEEE-1284


Tim Waugh (tim@cyberelk.demon.co.uk)
Tue, 1 Dec 1998 01:47:33 +0000 (GMT)


Hi guys,

My attempt at an implementation of IEEE-1284 can be found at:

ftp://ftp.torque.net/pub/parport/2.1.130arca36-parport_ieee1284.c

That file should replace linux/drivers/misc/parport_ieee1284.c, and the
following kernel patch should be applied:

ftp://ftp.torque.net/pub/parport/patch-2.1.130arca36-ieee1284.diff

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
functions are:

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);

Modes are:

IEEE1284_NONE (compatibility mode)
IEEE1284_NIBBLE (reverse nibble)
IEEE1284_BYTE (reverse byte)
IEEE1284_ECP
IEEE1284_ECPRLE
IEEE1284_EPP

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
use interrupts.

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...

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 2.0b3 on Wed 30 Dec 1998 - 10:18:49 EST