IO_pp_outp: Allow to switch direction of the printer port.
This commit is contained in:
parent
820aa3762f
commit
f31a3204ca
@ -300,7 +300,16 @@ BOOL IO_pp_outp(int port, DWORD* res)
|
|||||||
case 0:
|
case 0:
|
||||||
return IO_pp_do_access(idx,PPWDATA,res);
|
return IO_pp_do_access(idx,PPWDATA,res);
|
||||||
case 2:
|
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 1:
|
||||||
case 0x400:
|
case 0x400:
|
||||||
case 0x402:
|
case 0x402:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user