Owner's manual

KTD-S0003-C Page 29 CPLD Interface
pITX-SP Software Guide
flag = 0;
outp (CPLD_BASE_ADDR, GPIO_OUTPUT);
reg_val &= ~IRQ_BIT6;
outp (CPLD_BASE_ADDR+1, reg_val);
for (i = 0; i < IRQ_TIMEOUT; i++)
if (flag) break;
if (i != IRQ_TIMEOUT)
{
gotoxy (1, 3);
printf ("Interrupt Count GPIO 6 = %d", ++count6);
}
delay (500);
}
outp (CPLD_BASE_ADDR, GPIO_CONTROL);
reg_val = inp (CPLD_BASE_ADDR+1);
reg_val &= ~IRQ_ENABLE;
outp (CPLD_BASE_ADDR+1, reg_val);
_disable ();
_dos_setvect (VECTOR_IRQ7, oldISR );
outp (IMR_8259, old_mask );
_enable ();
}