/******************************************************************************** INT_Ch.c: Multi-channels as rising or falling edge interrupt in single slot. Compiler: BC++ 3.1, Turbo C ++ 1.01(3.01) (free from http://community.borland.com/museum) MSC 6.0, MSVC 1.52. Compile mode: large Project: INT_Ch.c ..\..\..\..\Lib\8000A.Lib To use 8048W on iPAC-8000 system step1: call i8048W_Init step2: call InstallSlotLevelIsr(slot,ISR_Function)to install your own ISR function step3: to enable rising/falling edge trigger for each channel step4: define interrupt service for each events. step5: call i8048W_UnFreezeCPU disable backplane interrupt register. step6: call UnInstallSlotLevelIsr to uninstall the ISR function. Note: To test 8048W interrupt ISR function on iPAC-8000 system, 1. You must avoid to use Print, GetCh and Kbhit , because these function themselves will produce interrupt also. 2. If use UDP version os image, you must use closeudp command to close udp under prompt C837_V2_UDP>closeudp [4 Sep,2005] by Martin *********************************************************************************/ #include #include #include "..\..\..\Lib\8000A.h" #include "..\..\..\lib\8048W.h" void ISR_Function(int slot); void showBasicInfo(int slot); void main(void) { int iSlot; int slot,channel; int data; long findIO=0; int quit=0; InitLib(); InstallCom_1(115200L,8,0,1); for(slot=0;slot