-static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwrace.c,v 6.2 1999-11-01 08:35:36 muench Exp $";
+static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwrace.c,v 6.3 2000-02-03 10:32:40 muench Stab $";
#define _POSIX_C_SOURCE 199309L
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <stdio.h>
+#include <time.h>
#include <hadesstd.h>
#include <lvme.h>
msglog(LOG_DEBUG, "%s:%d:%s\n", __FILE__, __LINE__, strerror(errno));
return -1;
}
- my->lbma = allocMem(sizeof(LBma));
-
- if (0 > conLBma(my->lbma, cardBase + 0x100000, 512 * 1024, 0x09)) {
- msglog(LOG_DEBUG, "%s:%d:%s\n", __FILE__, __LINE__, strerror(errno));
- return -1;
- }
- my->buf = LBma_getPtrL(my->lbma, 0);
standbyMode(my);
acquireMode(my);
void desHwRace(HwRace *my)
{
- desLBma(my->lbma);
- freeMem(my->lbma);
-
standbyMode(my);
desRc(my->rc);
freeMem(my->rc);
int size;
size = Rc_readMem(my->rc, my->currAddr);
-#if 1
+#if 0
+/* This sleep was a quickhack in sep. 99 beamtime to fix a problem
+ * during bank switching. It is not understood, why it helped.
+*/
if ( 1 || my->currAddr == 0) {
struct timespec tS, *t = &tS;
t->tv_sec = 0;
- t->tv_nsec = 020000000;
+ t->tv_nsec = 040000000;
nanosleep(t, NULL);
}
#endif