From owner-freebsd-hackers Wed Nov 11 14:32:06 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA11351 for freebsd-hackers-outgoing; Wed, 11 Nov 1998 14:32:06 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from dingo.cdrom.com (castles249.castles.com [208.214.165.249]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA11293 for ; Wed, 11 Nov 1998 14:32:00 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id OAA05676; Wed, 11 Nov 1998 14:28:15 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199811112228.OAA05676@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: "David E. Cross" cc: Phillip Salzman , freebsd-hackers@FreeBSD.ORG Subject: Re: Kernel Hacking stuffs (Bidirectional Parallel Port) In-reply-to: Your message of "Wed, 11 Nov 1998 17:24:25 EST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 11 Nov 1998 14:28:15 -0800 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > > On Wed, 11 Nov 1998, Phillip Salzman wrote: > > > > > Have you looked at the Parallel Port Bus info (ie, ppbus)? > > > > I was going to use this while creating a driver for my parallel > > port scanner, but noticed it would require a more advanced knowledge of C > > than I had at the time. > > > > -- > > Phillip Salzman > > I had not looked at it until you mentioned it. It suffers the same > problems that the lpt.c driver does. The way these drivers gain their > bidirectional ability is by tying the status lines (ACK, BUSY, PE, ERROR, > and 1 I forget) to the data lines, allowing 5 bits of data at a time, one > of these bits is used as a framing signal (0x1x means high nibble is being > transfered, 0x0x is the low nibble). > > Am I correct in thinking that 'modern' bidirectional ports and printers > have 8 lines dedicated to carrying data in both directions? Or is this > the only way it has ever been, and ever will be? There are several different (incompatible) ways of shifting bidirectional data. The nibble mode you describe is the lowest common denominator. There's also "true bidirectional" mode, where the 8 data lines are open-collector outputs, so driving them high lets you listen to the other end. Then there are the EPP 1.7 and EPP 1.9 modes, and ECP to finish it all off. Ppbus either supports or will support all of these, depending on the capabilities of your hardware. You can see the nibble and "true" modes in action in the 'vpo' driver. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message