/* Standalone test code to check VETROC at a basic level */ /* R. Michaels May 2015 */ #include #include #include #include #include #include "jvme.h" #include "vetrocLib.h" int main(int argc, char *argv[]) { int vetroc_addr, iflag, nvetroc, slot = -1; if(argc != 3) { printf("Usage: vetrocfirmware \n"); return -1; } slot = atoi(argv[2]); vmeOpenDefaultWindows(); vmeBusLock(); vetroc_addr = (slot<<19); /* 0 = software synch-reset, software triggers, internal clock */ iflag = 0; nvetroc = 0; nvetroc = vetrocInit(vetroc_addr, 0x80000, 1, iflag); printf("num vetroc found %d \n",nvetroc); vetrocGFirmwareUpdateVerify(argv[1]); vmeBusUnlock(); vmeCloseDefaultWindows(); return 0; }