Skip to content

Commit

Permalink
test: EVRU irqpoller.
Browse files Browse the repository at this point in the history
  • Loading branch information
jerzyjamroz committed Jan 4, 2024
1 parent d6cdcbf commit de52716
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion evgMrmApp/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ LIBRARY_IOC += evgmrm
# INC += evgOutput.h
# INC += mrmevgseq.h

SRC_DIRS += ../devSupport
SRC_DIRS += ../devSupport

#All the source files that are compiled and put in the library.
evgmrm_SRCS += evgInit.cpp
Expand Down
12 changes: 7 additions & 5 deletions evgMrmApp/src/evgInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ evgShutdown(void*)
mrf::Object::visitObjects(&disableIRQ,0);
}

static void
static void
inithooks(initHookState state) {
epicsUInt8 lvl;
switch(state) {
Expand Down Expand Up @@ -225,7 +225,7 @@ mrmEvgSetupVME (
printf("##### Setting up MRF EVG in VME Slot %d #####\n",slot);
printf("Found Vendor: %08x\nBoard: %08x\nRevision: %08x\n",
info.vendor, info.board, info.revision);

epicsUInt32 xxx = CSRRead32(csrCpuAddr + CSR_FN_ADER(1));
if(xxx)
printf("Warning: EVG not in power on state! (%08x)\n", xxx);
Expand Down Expand Up @@ -489,6 +489,7 @@ mrmEvgSetupPCI (
conf->numUnivInp, conf->numRearInp);

evgMrm* evg = new evgMrm(id, conf, bus, BAR_evg, cur);
EVRMRM *evru = 0; // EVM only

MRFVersion ver(evg->version());

Expand Down Expand Up @@ -536,6 +537,7 @@ mrmEvgSetupPCI (
delete evg;
return -1;
} else {
new IRQPoller(&EVRMRM::isr_poll, (void *)evru, 0.1);
printf("PCI interrupt connected!\n");
}

Expand All @@ -562,7 +564,7 @@ static const iocshArg * const mrmEvgSetupVMEArgs[5] = { &mrmEvgSetupVMEArg0,
static const iocshFuncDef mrmEvgSetupVMEFuncDef = { "mrmEvgSetupVME", 5,
mrmEvgSetupVMEArgs };

static void
static void
mrmEvgSetupVMECallFunc(const iocshArgBuf *args) {
mrmEvgSetupVME(args[0].sval,
args[1].ival,
Expand Down Expand Up @@ -750,15 +752,15 @@ reportCard(mrf::Object* obj, void* arg) {
}

evg->show(*level);

if(*level >= 2)
printregisters(evg->getRegAddr());

printf("\n");
return true;
}

static long
static long
report(int level) {
printf("=== Begin MRF EVG support ===\n");
mrf::Object::visitObjects(&reportCard, (void*)&level);
Expand Down
3 changes: 2 additions & 1 deletion mrfCommon/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ mrfCommon_SRCS += mrfCommon.cpp
mrfCommon_SRCS += spi.cpp
mrfCommon_SRCS += flash.cpp
mrfCommon_SRCS += flashiocsh.cpp
#NOTINUSE: mrfCommon_SRCS += pollirq.cpp
#NOTINUSE:
mrfCommon_SRCS += pollirq.cpp

mrfCommon_LIBS += $(EPICS_BASE_IOC_LIBS)

Expand Down

0 comments on commit de52716

Please sign in to comment.