|
ru.linux- RU.LINUX --------------------------------------------------------------------- From : Svyatoslav Abramenkov 2:464/8088.100 11 Aug 2004 17:08:41 To : Nick Gazaloff Subject : OCR -------------------------------------------------------------------------------- At 10 Aug 04 16:00:07, Nick Gazaloff wrote to Svyatoslav Abramenkov: >> >> а второй кабель - под LPT, но, afaik, в Linux 2.4 нет поддержки >> ECP/EPP >> - только nibble mode. >> NG> Есть. less /usr/src/linux/Documentation/parport.txt. Как минимум, >> задать >> NG> прерывание -- будет EPP. Задать еще и DMA -- будет ECP (правда, ECP >> с NG> принтером у меня так и не завелся). >> В PLIP кроме nibble mode больше ничего не реализовали. NG> /usr/src/linux/Documentation/networking/PLIP.txt NG> PLIP hardware interconnection NG> PLIP uses several different data transfer methods. The first (and the NG> only one implemented in the early version of the code) uses a standard NG> printer "null" cable to transfer data four bits at a time using NG> data bit outputs connected to status bit inputs. NG> The second data transfer method relies on both machines having NG> bi-directional parallel ports, rather than output-only ``printer'' NG> ports. This allows byte-wide transfers and avoids reconstructing NG> nibbles into bytes, leading to much faster transfers. >===== Start cut [/usr/src/kernel-source-2.4.26/drivers/net/plip.c] =====< /* $Id: plip.c,v 1.3.6.2 1997/04/16 15:07:56 phil Exp $ */ /* PLIP: A parallel port "network" driver for Linux. */ /* This driver is for parallel port with 5-bit cable (LapLink (R) cable). */ /* * Authors: Donald Becker <becker@scyld.com> * Tommy Thorn <thorn@daimi.aau.dk> * Tanabe Hiroyasu <hiro@sanpo.t.u-tokyo.ac.jp> * Alan Cox <gw4pts@gw4pts.ampr.org> * Peter Bauer <100136.3530@compuserve.com> * Niibe Yutaka <gniibe@mri.co.jp> * Nimrod Zimerman <zimerman@mailandnews.com> * * Enhancements: * Modularization and ifreq/ifmap support by Alan Cox. * Rewritten by Niibe Yutaka. * parport-sharing awareness code by Philip Blundell. * SMP locking by Niibe Yutaka. * Support for parallel ports with no IRQ (poll mode), * Modifications to use the parallel port API * by Nimrod Zimerman. * * Fixes: * Niibe Yutaka * - Module initialization. * - MTU fix. * - Make sure other end is OK, before sending a packet. * - Fix immediate timer problem. * * Al Viro * - Changed {enable,disable}_irq handling to make it work * with new ("stack") semantics. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ /* * Original version and the name 'PLIP' from Donald Becker <becker@scyld.com> * inspired by Russ Nelson's parallel port packet driver. * * NOTE: * Tanabe Hiroyasu had changed the protocol, and it was in Linux v1.0. * Because of the necessity to communicate to DOS machines with the * Crynwr packet driver, Peter Bauer changed the protocol again * back to original protocol. * * This version follows original PLIP protocol. * So, this PLIP can't communicate the PLIP of Linux v1.0. */ /* * To use with DOS box, please do (Turn on ARP switch): * # ifconfig plip[0-2] arp */ static const char version[] = "NET3 PLIP version 2.4-parport gniibe@mri.co.jp\ n"; /* Sources: Ideas and protocols came from Russ Nelson's <nelson@crynwr.com> "parallel.asm" parallel port packet driver. The "Crynwr" parallel port standard specifies the following protocol: Trigger by sending nibble '0x8' (this causes interrupt on other end) count-low octet count-high octet ... data octets checksum octet Each octet is sent as <wait for rx. '0x1?'> <send 0x10+(octet&0x0F)> <wait for rx. '0x0?'> <send 0x00+((octet>>4)&0x0F)> The packet is encapsulated as if it were ethernet. The cable used is a de facto standard parallel null cable -- sold as a "LapLink" cable by various places. You'll need a 12-conductor cable to make one yourself. The wiring is: SLCTIN 17 - 17 GROUND 25 - 25 D0->ERROR 2 - 15 15 - 2 D1->SLCT 3 - 13 13 - 3 D2->PAPOUT 4 - 12 12 - 4 D3->ACK 5 - 10 10 - 5 D4->BUSY 6 - 11 11 - 6 Do not connect the other pins. They are D5,D6,D7 are 7,8,9 STROBE is 1, FEED is 14, INIT is 16 extra grounds are 18,19,20,21,22,23,24 */ >===== End cut [/usr/src/kernel-source-2.4.26/drivers/net/plip.c] =====< Hи здесь, ни в оставшемся коде ты не найдёшь ничего, предназначенного для работы не в nibble mode, как, кстати, и схемы кабеля для такого случая. -- Svyatoslav <absolute_sh@mail.ru> [Registered Linux user #219421] --- QDed/Linux * Origin: AbSolute Soft&Hard (2:464/8088.100) Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /ru.linux/4590011a3692.html, оценка из 5, голосов 10
|