void interrupt irq_service()
{
new_int_state=inportb(wBase+7)&0x0f; /* read all interrupt state */
int_c=new_int_state^now_int_state; /* compare which interrupt */
/* signal be change */
if ((int_c&0x1)!=0) /* INT_CHAN_0 is active */
{
if ((new_int_state&0x01)!=0) /* now PC0 change to high */
{
+;
}
else /* now PC0 change to low */
{
+;
}
invert=invert^1; /* to generate a high pulse */
}
if ((int_c&0x2)!=0)
{
if ((new_int_state&0x02)!=0) /* now PC1 change to high */
{
+;
}
else /* now PC1 change to low */
{
+;
{
invert=invert^2; /* to generate a high pulse */
}
if ((int_c&0x4)!=0)
{
If ((new_int_state&0x04)!=0) /* now PC2 change to high */
{
+;
}
else /* now PC2 change to low */
{
+;
}
invert=invert^4; /* to generate a high pulse */
}
if ((int_c&0x8)!=0)
{
if ((new_int_state&0x08)!=0) /* now PC3 change to high */
{
+;
{
else /* now PC3 change to low */
{
+;
}
invert=invert^8; /* to generate a high pulse */
}
now_int_state=new_int_state;
outportb(wBase+0x2a,invert);
if (wIrq>=8) outportb(A2_8259,0x20);
outportb(A1_8259,0x20);
}
OME-PIO-D56/OME-PIO-D24 User Manual (Ver.2.1, Oct/2003)
---- 17