#include "pcivme_dll.h" #include //#include //#include //#include "vme.h" #include "CAENV1290.h" #include "CAENV1290_DEF.h" //#include #define usleep(x) Delay(x/1.0e6) static unsigned long ModuleAddress[10]; int _VI_FUNC V1290_map (int ModuleNumber, unsigned long ModuleOffset, int print) { int i; unsigned short geo, fw, ah, al; ModuleAddress[ModuleNumber] = ModuleOffset; if (print) { printf("V1290_map offset = 0x%08x\n", ModuleOffset); printf("V1290_map firmware = %d.%d\n", (fw>>8)&0xff, fw&0xff); printf("V1290_map geo = %d\n", geo&0x1f ); printf("V1290_map addr = 0x%04X0000\n", (ah<<8)|(al&0xff)); } return 0; } /************************************************/ static void mloop(int n){ int i; for (i=0;i=len) { printf("ERROR V1290_read: Increase storage size: ndata=%d >= len=%d \n",ndata, len); break; } VME_A24D32_R(ModuleAddress[ModuleNumber] + CAENV1290_OB, &whereto[ndata++]); } while ( (whereto[ndata-1]& 0xF8000000) != 0x80000000 ); return ndata; }