typedef struct HwRaceS {
char name[12];
- Rc *rc;
- LVme_L *buf;
- int bankRequested;
+ Rc * rc;
+ LVme_L * buf;
int currAddr;
+ int endOfData;
} HwRace;
+#define RCPAGEBITSHIFT 8
+#define RCPAGESIZE 1 << RCPAGEBITSHIFT
+
int conHwRace(HwRace *my, const char *name, const Param *param);
void desHwRace(HwRace *my);
void HwRace_requestBuffer(HwRace *my);
-int HwRace_isBusy(HwRace *my);
-int HwRace_isEmpty(HwRace *my);
+
+static int HwRace_isEmpty(HwRace *my)
+{
+ return my->currAddr >= my->endOfData;
+}
+
int HwRace_readSubEvt(HwRace *my, void *subEvt);
+
static int HwRace_isBufRequested(HwRace *my) {
return my->currAddr == 0;
}
+static void HwRace_getEndOfData(HwRace *my)
+{
+ my->endOfData = (Rc_getPages(my->rc) << RCPAGEBITSHIFT);
+}
+
#endif