手上有一塊CH350L的PCI轉(zhuǎn)串口卡,最近想寫一個(gè)CH350L的驅(qū)動(dòng),但是在網(wǎng)站上找不到CH350的資料,只有CH352的,不知道兩者是否兼容?
兼容的 驅(qū)動(dòng)就用CH35XDRV 中的 LINUX 驅(qū)動(dòng)
I bought a cheap CH350 based PCI to parallel port card (CH3501P) I found driver from this thread http://wch.cn/bbs/View.asp?S=102&I=37200 and then download here http://wch.cn/download/list.asp?id=112
Unfortunately this driver is not fully functional, because it only support serial port.
The following thread could get the parallel port card work without driver. http://ubuntuforums.org/showthread.php?t=1233589 The side effect is it caused serious interrupt strom(中斷風(fēng)暴). When pin 10 (ACK pin) got a assert signal (from low to high TTL value), the card generates infinit interrupts, just as described in the following two thread: http://lists.nongnu.org/archive/html/avrdude-dev/2010-08/msg00009.html http://lists.infradead.org/pipermail/linux-parport/2010-August/000711.html
Disable the parport interrupt by set status register (with address base +1) bit 4 (Enable IRQ Via Ack Line bit) to 0 or just call parport_pc_disable_irq(p) does not really work, because the infinit interrupts immediately come again when set this bit to 1. My workaround is to read the status register once, and the interrupts just stops.
--- a/DRV_1P/LINUX/driver/wch_main.c 2011-03-23 09:17:44.000000000 +0800 +++ b/DRV_1P/LINUX/driver/wch_main.c 2012-03-24 16:12:22.340370693 +0800 @@ -174,8 +202,30 @@ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) int handled = IRQ_NONE; #endif + if ((inb(0xc801) & 4) != 0) {//This inb()stops the irq storm, 0xc800 is the base addr + return handled; + } for (i = 0; i < WCH_BOARDS_MAX; i++) { if (dev_id == &(wch_board_table[i]))
This just stops the interrupt, but did not really bring interrupt handle. parport_irq()should be called here. Hope official driver could support it.
沒有提供并口驅(qū)動(dòng),該驅(qū)動(dòng)只支持異步串口!
請(qǐng)問,DRV-1P不是并口驅(qū)動(dòng)嗎?
請(qǐng)問并口驅(qū)動(dòng)到哪里下載?
Linux 相關(guān)問題可以直接聯(lián)系 Linux工程師 Email : szk@wch.cn Phone : 025-52638363