From 743f272e7a9da3dd23d6449d58fcc40b965c5136 Mon Sep 17 00:00:00 2001 From: John Winans Date: Wed, 20 May 1992 10:20:04 +0000 Subject: [PATCH] altered calls to the driver to account for new timeout parameter --- src/devOpt/devGpibInteract.c | 8 +++++--- src/vxWorks/devOpt/devGpibInteract.c | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/devOpt/devGpibInteract.c b/src/devOpt/devGpibInteract.c index 518a6d8dd..24337f100 100644 --- a/src/devOpt/devGpibInteract.c +++ b/src/devOpt/devGpibInteract.c @@ -76,6 +76,8 @@ #define MAX_MSG_LENGTH 80 +int GITime = 60; /* shell-setable DMA timeout value */ + extern struct drvGpibSet drvGpib; /* entry points to driver functions */ int gpibWork(); @@ -360,7 +362,7 @@ int status; switch (pCmd->type) { case 'w': case 'W': /* write the message to the GPIB listen adrs */ - status =(*(drvGpib.writeIb))(pCmd->head.pibLink, pCmd->head.device, pCmd->cmd, strlen(pCmd->cmd)); + status =(*(drvGpib.writeIb))(pCmd->head.pibLink, pCmd->head.device, pCmd->cmd, strlen(pCmd->cmd), GITime); if (status == ERROR) strcpy(pCmd->resp, "GPIB TIMEOUT (while talking)"); else @@ -368,7 +370,7 @@ int status; break; case 'r': case 'R': /* write the command string */ - status = (*(drvGpib.writeIb))(pCmd->head.pibLink, pCmd->head.device, pCmd->cmd, strlen(pCmd->cmd)); + status = (*(drvGpib.writeIb))(pCmd->head.pibLink, pCmd->head.device, pCmd->cmd, strlen(pCmd->cmd), GITime); if (status == ERROR) { strcpy(pCmd->resp, "GPIB TIMEOUT (while talking)"); @@ -376,7 +378,7 @@ int status; } /* read the instrument */ pCmd->resp[0] = 0; /* clear response string */ - status = (*(drvGpib.readIb))(pCmd->head.pibLink, pCmd->head.device, pCmd->resp, MAX_MSG_LENGTH); + status = (*(drvGpib.readIb))(pCmd->head.pibLink, pCmd->head.device, pCmd->resp, MAX_MSG_LENGTH, GITime); if (status == ERROR) { diff --git a/src/vxWorks/devOpt/devGpibInteract.c b/src/vxWorks/devOpt/devGpibInteract.c index 518a6d8dd..24337f100 100644 --- a/src/vxWorks/devOpt/devGpibInteract.c +++ b/src/vxWorks/devOpt/devGpibInteract.c @@ -76,6 +76,8 @@ #define MAX_MSG_LENGTH 80 +int GITime = 60; /* shell-setable DMA timeout value */ + extern struct drvGpibSet drvGpib; /* entry points to driver functions */ int gpibWork(); @@ -360,7 +362,7 @@ int status; switch (pCmd->type) { case 'w': case 'W': /* write the message to the GPIB listen adrs */ - status =(*(drvGpib.writeIb))(pCmd->head.pibLink, pCmd->head.device, pCmd->cmd, strlen(pCmd->cmd)); + status =(*(drvGpib.writeIb))(pCmd->head.pibLink, pCmd->head.device, pCmd->cmd, strlen(pCmd->cmd), GITime); if (status == ERROR) strcpy(pCmd->resp, "GPIB TIMEOUT (while talking)"); else @@ -368,7 +370,7 @@ int status; break; case 'r': case 'R': /* write the command string */ - status = (*(drvGpib.writeIb))(pCmd->head.pibLink, pCmd->head.device, pCmd->cmd, strlen(pCmd->cmd)); + status = (*(drvGpib.writeIb))(pCmd->head.pibLink, pCmd->head.device, pCmd->cmd, strlen(pCmd->cmd), GITime); if (status == ERROR) { strcpy(pCmd->resp, "GPIB TIMEOUT (while talking)"); @@ -376,7 +378,7 @@ int status; } /* read the instrument */ pCmd->resp[0] = 0; /* clear response string */ - status = (*(drvGpib.readIb))(pCmd->head.pibLink, pCmd->head.device, pCmd->resp, MAX_MSG_LENGTH); + status = (*(drvGpib.readIb))(pCmd->head.pibLink, pCmd->head.device, pCmd->resp, MAX_MSG_LENGTH, GITime); if (status == ERROR) {