
PIO-D144 User’s Manual
Page 44 Version: 2.1 Date: 1999/10
if ((int_c&0x01) != 0)
{
cc=new_int_state&0x01;
if (cc !=0) +; else +;
invert=invert ^ 1;
}
if ((int_c&0x02) != 0)
{
cc=new_int_state&0x02;
if (cc !=0) +; else +;
invert=invert ^ 2;
}
if ((int_c&0x04) != 0)
{
cc=new_int_state&0x04;
if (cc !=0) +; else +;
invert=invert ^ 4;
}
if ((int_c&0x08) != 0)
{
cc=new_int_state&0x08;
if (cc !=0) +; else +;
invert=invert ^ 8;
}
now_int_state=new_int_state;
outp(wBase+0x2a,invert);
if (wIrq>=8) outp(A2_8259,0x20);
outp(A1_8259,0x20);
}
4.7 DEMO 6: Outport of CN1-CN6
/* ------------------------------------------------------------ */
/* demo 6 : D/O demo
*/
/* step 1 : connect a DB-24C to CN1 of PIO-D144
*/
/* step 2 : run DEMO6.EXE
*/
/* step 3 : check the LED's of DB-24C will turn on sequentially */
/* ------------------------------------------------------------ */
#include "PIO.H"
ГК
Атлант
Инжиниринг
–
официальный
представитель
в
РФ
и
СНГ
+7(495)109-02-08 [email protected] www.bbrc.ru