Added status argument in callbacks

This commit is contained in:
MarkRivers
2007-04-17 21:08:44 +00:00
parent 99438abc45
commit 30f24d531c
3 changed files with 10 additions and 7 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ typedef struct MotorStatus {
typedef void (*interruptCallbackMotorStatus)(
void *userPvt, asynUser *pasynUser,
struct MotorStatus *value);
struct MotorStatus *value, asynStatus status);
typedef struct asynMotorStatusInterrupt {
asynUser *pasynUser;
int addr;
+5 -2
View File
@@ -473,6 +473,7 @@ static void XPSAuxPoller(drvXPSAsynAuxPvt *pPvt)
int firstTime = 1;
int i;
int status;
asynStatus ioStatus = asynSuccess;
asynUser *pasynUser;
int addr, reason, mask, changedBits;
@@ -488,12 +489,14 @@ static void XPSAuxPoller(drvXPSAsynAuxPvt *pPvt)
if (status) {
asynPrint(pPvt->pasynUser, ASYN_TRACE_ERROR,
"drvXPSAsynAux::XPSAuxPoller error calling GPIOAnalogGet=%d\n", status);
ioStatus = asynError;
}
for (i=0; i<MAX_DIGITAL_INPUTS; i++) {
status = GPIODigitalGet(pPvt->socketID, digitalInputNames[i], &digitalValues[i]);
if (status) {
asynPrint(pPvt->pasynUser, ASYN_TRACE_ERROR,
"drvXPSAsynAux::XPSAuxPoller error calling GPIODigitalGet=%d\n", status);
ioStatus = asynError;
}
}
@@ -510,7 +513,7 @@ static void XPSAuxPoller(drvXPSAsynAuxPvt *pPvt)
if (firstTime) changedBits = 0xffff;
if ((mask & changedBits) && (reason == binaryInput)) {
pUInt32DigitalInterrupt->callback(pUInt32DigitalInterrupt->userPvt, pasynUser,
mask & digitalValues[addr]);
mask & digitalValues[addr], ioStatus);
}
pnode = (interruptNode *)ellNext(&pnode->node);
}
@@ -529,7 +532,7 @@ static void XPSAuxPoller(drvXPSAsynAuxPvt *pPvt)
if (reason == analogInput) {
pfloat64Interrupt->callback(pfloat64Interrupt->userPvt,
pfloat64Interrupt->pasynUser,
analogValues[addr]);
analogValues[addr], ioStatus);
}
pnode = (interruptNode *)ellNext(&pnode->node);
}
+4 -4
View File
@@ -2,9 +2,9 @@
FILENAME... drvOmsPC68.cc
USAGE... Motor record driver level support for OMS PC68 serial device.
Version: $Revision: 1.4 $
Modified By: $Author: dkline $
Last Modified: $Date: 2007-02-13 13:22:28 $
Version: $Revision: 1.5 $
Modified By: $Author: rivers $
Last Modified: $Date: 2007-04-17 21:08:44 $
*/
/*
@@ -651,7 +651,7 @@ static int omsGet(int card, char *pchar)
return(nread);
}
static void asynCallback(void *drvPvt,asynUser *pasynUser,char *data,size_t len, int eomReason)
static void asynCallback(void *drvPvt,asynUser *pasynUser,char *data,size_t len, int eomReason, asynStatus status)
{
int d,cnt,stat,done;
OmsPC68controller* pcntrl;