From ec28dc7658170e74b1408bb89976f4cf54ed9ad3 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 10 Apr 2001 13:28:51 +0000 Subject: [PATCH] Removed the SYNCHRONOUS stuff (was introduced end of 99 for test during beam time) --- hadaq/hwrich.c | 60 +------------------------------------------------- 1 file changed, 1 insertion(+), 59 deletions(-) diff --git a/hadaq/hwrich.c b/hadaq/hwrich.c index 7660ca5..5c16a63 100644 --- a/hadaq/hwrich.c +++ b/hadaq/hwrich.c @@ -1,4 +1,4 @@ -static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwrich.c,v 6.14 2001-03-07 16:02:44 hades Exp $"; +static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwrich.c,v 6.15 2001-04-10 13:28:51 hades Exp $"; #define _POSIX_C_SOURCE 199309L @@ -9,14 +9,6 @@ static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hada #include #include -#undef SYNCHRONOUS - -#ifdef SYNCHRONOUS -#include - -#include "dtu_defs.h" - -#endif #include #include "subevt.h" #include "hwrace.h" @@ -28,9 +20,6 @@ struct HardwareS { size_t maxSubEvtSize; HwRace *race[NRACES]; unsigned raceToRead; -#ifdef SYNCHRONOUS - LVme *lvme; -#endif }; #include "hardware.h" @@ -50,13 +39,6 @@ Hardware *newHardware(void) Hardware *my; Param paramS, *param = ¶mS; int i; -#ifdef SYNCHRONOUS - unsigned long cardBase; -#endif - -#ifdef SYNCHRONOUS - cardBase = 0x44100000; -#endif if (0 > conParam(param)) { msglog(LOG_ERR, "%s:%d:%s\n", __FILE__, __LINE__, strerror(errno)); @@ -78,15 +60,6 @@ Hardware *newHardware(void) } } -#ifdef SYNCHRONOUS - my->lvme = allocMem(sizeof(LVme)); - if (-1 == conLVme(my->lvme, cardBase, 0x100000, 0x09, 0, 0)) { - return NULL; - } - /* set Lock Busy */ - LVme_setBitL(my->lvme, STATUS1, 4); -#endif - desParam(param); return my; } @@ -99,31 +72,11 @@ void deleteHardware(Hardware *my) desHwRace(my->race[i]); freeMem(my->race[i]); } -#ifdef SYNCHRONOUS - desLVme(my->lvme); -#endif - freeMem(my); } void Hardware_waitForTrigger(Hardware *my, void *subEvt) { -#ifdef SYNCHRONOUS - static int beginRun = 1; /* eat 1 triggers at begin run */ - - while (beginRun > 0) { - /* wait for begin run trigger and release busy afterwards */ - while (!LVme_tstBitL(my->lvme, STATUS1, 6)) { - struct timespec tS, *t = &tS; - t->tv_sec = 0; - t->tv_nsec = 020000000; - nanosleep(t, NULL); - } - LVme_setL(my->lvme, RELEASE1, 0xee); - sleep(1); - beginRun--; - } -#endif } void Hardware_readout(Hardware *my, void *partEvt) @@ -135,18 +88,7 @@ void Hardware_readout(Hardware *my, void *partEvt) for (my->raceToRead = 0; my->raceToRead < NRACES; my->raceToRead++) { if (HwRace_isEmpty(my->race[my->raceToRead])) { -#ifdef SYNCHRONOUS - LVme_setL(my->lvme, RELEASE1, 0xee); - for (i = 0; i < 20000; i++) { - j = 1 + 1; - } -#endif HwRace_requestBuffer(my->race[my->raceToRead]); -#ifdef SYNCHRONOUS - for (i = 0; i < 20000; i++) { - j = 1 + 1; - } -#endif while (HwRace_isBusy(my->race[my->raceToRead])) { #if 0 /* -- 2.43.0