diff --git a/motorApp/CommSrc/gpibIO.c b/motorApp/CommSrc/gpibIO.c index 9aa32e0c..b56d7967 100644 --- a/motorApp/CommSrc/gpibIO.c +++ b/motorApp/CommSrc/gpibIO.c @@ -17,6 +17,10 @@ #include #include #include +#ifdef GPIB +#include +#include +#endif #define GPIB_SEND 0 #define GPIB_RECEIVE 1 @@ -29,7 +33,11 @@ volatile int gpibIODebug = 0; -extern struct drvGpibSet drvGpib; /* entry points to driver functions */ +#ifdef GPIB +extern struct drvGpibEt drvGpib; /* entry points to driver functions */ +#else +extern struct drvGpibSet drvGpib; /* entry points to driver functions */ +#endif struct gpibMessage { struct dpvtGpibHead head; @@ -54,9 +62,12 @@ struct gpibInfo *gpibIOInit(int link, int address) gpibInfo->head.device = address; gpibInfo->address = address; gpibInfo->semID = semBCreate(SEM_Q_PRIORITY, SEM_EMPTY); - +#ifdef GPIB + gpibInfo->head.pibLink = (*(drvGpib.getLink))(link, address); +#else (*(drvGpib.ioctl))(GPIB_IO, link, NULL, IBGENLINK, 0, NULL); (*(drvGpib.ioctl))(GPIB_IO, link, NULL, IBGETLINK, 0, &gpibInfo->head.pibLink); +#endif Debug(1, "gpibIOInit, address = %d\n", address); return(gpibInfo); }