fix LPT pin numeration

This commit is contained in:
Sergey Popov 2011-12-31 11:48:35 +04:00
parent 233f9ffab0
commit eee04e2563

View File

@ -207,12 +207,12 @@ void reset_pin(int pin_num)
{
if (pin_num==0)
return; // there is no LPT control for target host
if (pin_num<0 || pin_num>8)
if (pin_num<2 || pin_num>8)
{
log_event("Error: incorrent LPT pin number");
return;
}
int pins = 1<<(pin_num);
int pins = 1<<(pin_num-1);
if (ioperm (lpt_port, 3, 1))
{
log_event("Error: LPT port access error");