PPDEV: Allow to switch direction of the printer port
Changelog: dlls/winedos/ppdev.c:IO_pp_outp Allow to switch direction of the printer port This lets mitoujtag.exe access the Jtag chain via the parallel port and a Xilinx parallel cable. -- Uwe Bonnes bon(a)elektron.ikp.physik.tu-darmstadt.de Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt --------- Tel. 06151 162516 -------- Fax. 06151 164321 ---------- Index: wine/dlls/winedos/ppdev.c =================================================================== RCS file: /home/wine/wine/dlls/winedos/ppdev.c,v retrieving revision 1.1 diff -u -w -r1.1 ppdev.c --- wine/dlls/winedos/ppdev.c 17 Sep 2003 22:45:46 -0000 1.1 +++ wine/dlls/winedos/ppdev.c 4 Feb 2004 15:27:00 -0000 @@ -300,7 +300,16 @@ case 0: return IO_pp_do_access(idx,PPWDATA,res); case 2: - return IO_pp_do_access(idx,PPWCONTROL,res); + { + /* We can't switch port direction via PPWCONTROL, + so do it via PPDATADIR + */ + DWORD mode = *res & 0x20; + IO_pp_do_access(idx,PPDATADIR,&mode); + mode = (*res & ~0x20); + return IO_pp_do_access(idx,PPWCONTROL,&mode); + } + case 1: case 0x400: case 0x402:
participants (1)
-
Uwe Bonnes