IO_pp_outp: Allow to switch direction of the printer port.

This commit is contained in:
Uwe Bonnes 2004-02-24 00:59:19 +00:00 committed by Alexandre Julliard
parent 820aa3762f
commit f31a3204ca
1 changed files with 10 additions and 1 deletions

View File

@ -300,7 +300,16 @@ BOOL IO_pp_outp(int port, DWORD* res)
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: