Skip to content

Commit

Permalink
Replaced invalid LT_EPICSBASE logic with working logic from SSCAN. Si…
Browse files Browse the repository at this point in the history
…nce EPICS_VERSION_INT defined in EPICSbase 3.15, added EPICS_PATCH_LEVEL argument.
  • Loading branch information
rsluiter committed Jan 4, 2018
1 parent 60aa414 commit c1c4407
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion motorApp/DeltaTauSrc/drvPmac.cc
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ static int motorIsrEnable(int card)

status = pdevLibVirtualOS->pDevConnectInterruptVME(
PmacInterruptVector + card,
#if LT_EPICSBASE(3,14,8)
#if LT_EPICSBASE(3,14,8,0)
(void (*)()) motorIsr,
#else
(void (*)(void *)) motorIsr,
Expand Down
6 changes: 5 additions & 1 deletion motorApp/MotorSrc/motor.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ USAGE... Definitions and structures common to all levels of motorRecord
#include <epicsEndian.h>

/* Less than EPICS base version test.*/
#define LT_EPICSBASE(v,r,l) ((EPICS_VERSION<=(v)) && (EPICS_REVISION<=(r)) && (EPICS_MODIFICATION<(l)))
#ifndef EPICS_VERSION_INT
#define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P))
#define EPICS_VERSION_INT VERSION_INT(EPICS_VERSION, EPICS_REVISION, EPICS_MODIFICATION, EPICS_PATCH_LEVEL)
#endif
#define LT_EPICSBASE(V,R,M,P) (EPICS_VERSION_INT < VERSION_INT((V),(R),(M),(P)))

/* Maximum message size of all supported devices; see drv[device].h for maximum
message size for each device. */
Expand Down
2 changes: 1 addition & 1 deletion motorApp/MotorSrc/motorRecord.cc
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ static void callbackFunc(struct callback *pcb)
{
pmr->mip &= ~MIP_DELAY_REQ; /* Turn off REQ. */
pmr->mip |= MIP_DELAY_ACK; /* Turn on ACK. */
#if LT_EPICSBASE(3,14,10)
#if LT_EPICSBASE(3,14,10,0)
scanOnce(pmr);
#else
scanOnce((struct dbCommon *) pmr);
Expand Down
2 changes: 1 addition & 1 deletion motorApp/OmsSrc/drvMAXv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,7 @@ static int motorIsrSetup(int card)

status = pdevLibVirtualOS->pDevConnectInterruptVME(
MAXvInterruptVector + card,
#if LT_EPICSBASE(3,14,8)
#if LT_EPICSBASE(3,14,8,0)
(void (*)()) motorIsr,
#else
(void (*)(void *)) motorIsr,
Expand Down
2 changes: 1 addition & 1 deletion motorApp/OmsSrc/drvOms.cc
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ static int motorIsrEnable(int card)
long status;
status = pdevLibVirtualOS->pDevConnectInterruptVME(
omsInterruptVector + card,
#if LT_EPICSBASE(3,14,8)
#if LT_EPICSBASE(3,14,8,0)
(void (*)()) motorIsr,
#else
(void (*)(void *)) motorIsr,
Expand Down
2 changes: 1 addition & 1 deletion motorApp/OmsSrc/drvOms58.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ static int motorIsrSetup(int card)
pmotor = (struct vmex_motor *) (motor_state[card]->localaddr);

status = pdevLibVirtualOS->pDevConnectInterruptVME(omsInterruptVector + card,
#if LT_EPICSBASE(3,14,8)
#if LT_EPICSBASE(3,14,8,0)
(void (*)()) motorIsr,
#else
(void (*)(void *)) motorIsr,
Expand Down

0 comments on commit c1c4407

Please sign in to comment.