155,7 → 155,7 |
return 0; |
} |
|
int VMEopen(const char *cszDeviceName, unsigned char ubAddressModifier, int *pnHandle) |
int VMEopen(const char *cszDeviceName, unsigned char ubAddressModifier, ptrdiff_t *pnHandle) |
{ |
VMEMM_DEVICE *dev = (VMEMM_DEVICE *)NULL; |
int error; |
177,7 → 177,7 |
} |
|
dev->cAddressModifier = ubAddressModifier; |
*pnHandle = (int)dev; |
*pnHandle = (ptrdiff_t)dev; |
|
error = initHardware(dev); |
if (error) |
188,7 → 188,7 |
return setAccessProperties(*pnHandle, dev->cAddressModifier, BYTE_ACCESS); // set access properties to default |
} |
|
int VMEinit(const char *cszDeviceName, unsigned short nVMEMM, unsigned char ubAddressModifier, int *pnHandle) |
int VMEinit(const char *cszDeviceName, unsigned short nVMEMM, unsigned char ubAddressModifier, ptrdiff_t *pnHandle) |
{ |
char *szLocalDeviceName = szDeviceName(cszDeviceName, nVMEMM); |
|
195,7 → 195,7 |
return VMEopen(szLocalDeviceName, ubAddressModifier, pnHandle); |
} |
|
int setAccessProperties(int nHandle, unsigned char bModifier, unsigned char bAccessType) |
int setAccessProperties(ptrdiff_t nHandle, unsigned char bModifier, unsigned char bAccessType) |
{ |
VMEMM_DEVICE *dev = (VMEMM_DEVICE *)nHandle; |
|
218,7 → 218,7 |
return 0; |
} |
|
int VMEread(int nHandle, unsigned long ulAddress, unsigned char ubAccessWidth, unsigned long ulElementCount, void *pvBuffer) |
int VMEread(ptrdiff_t nHandle, unsigned long ulAddress, unsigned char ubAccessWidth, unsigned long ulElementCount, void *pvBuffer) |
{ |
VMEMM_DEVICE *dev = (VMEMM_DEVICE *)nHandle; |
size_t count = (size_t)(ulElementCount * ubAccessWidth); |
263,7 → 263,7 |
return 0; |
} |
|
int VMEwrite(int nHandle, unsigned long ulAddress, unsigned char ubAccessWidth, unsigned long ulElementCount, void *pvBuffer) |
int VMEwrite(ptrdiff_t nHandle, unsigned long ulAddress, unsigned char ubAccessWidth, unsigned long ulElementCount, void *pvBuffer) |
{ |
VMEMM_DEVICE *dev = (VMEMM_DEVICE *)nHandle; |
size_t count = (size_t)(ulElementCount * ubAccessWidth); |
307,7 → 307,7 |
return 0; |
} |
|
int VMEaccessVIC(int nHandle, unsigned char ubAccessMode, unsigned short uwAddress, unsigned char *ubContent) |
int VMEaccessVIC(ptrdiff_t nHandle, unsigned char ubAccessMode, unsigned short uwAddress, unsigned char *ubContent) |
{ |
VMEMM_DEVICE *dev = (VMEMM_DEVICE *)nHandle; |
PCIVME_VIC68A_ACTION vic68a_action; |
327,7 → 327,7 |
return 0; |
} |
|
int VMEreset(int nHandle) |
int VMEreset(ptrdiff_t nHandle) |
{ |
VMEMM_DEVICE *dev = (VMEMM_DEVICE *)nHandle; |
PCIVME_RESET_COMMAND reset_command; |
363,7 → 363,7 |
return 0; |
} |
|
int VMETAS(int nHandle, unsigned long ulAddress, unsigned char *ubResult) |
int VMETAS(ptrdiff_t nHandle, unsigned long ulAddress, unsigned char *ubResult) |
{ |
VMEMM_DEVICE *dev = (VMEMM_DEVICE *)nHandle; |
PCIVME_TAS_STRUCT tas; |
383,7 → 383,7 |
return 0; |
} |
|
int VMEinterrupt(int nHandle, unsigned char *ubVector) |
int VMEinterrupt(ptrdiff_t nHandle, unsigned char *ubVector) |
{ |
VMEMM_DEVICE *dev = (VMEMM_DEVICE *)nHandle; |
PCIVME_VECTOR_LEVEL ubLocalVector; |
399,7 → 399,7 |
return 0; |
} |
|
int VMEsysfailGet(int nHandle, BOOLEAN *bResult) |
int VMEsysfailGet(ptrdiff_t nHandle, BOOLEAN *bResult) |
{ |
VMEMM_DEVICE *dev = (VMEMM_DEVICE *)nHandle; |
PCIVME_VIC68A_ACTION sAction; // structure to access vic chip |
419,7 → 419,7 |
return 0; |
} |
|
int VMEsysfailSet(int nHandle, BOOLEAN bForce) |
int VMEsysfailSet(ptrdiff_t nHandle, BOOLEAN bForce) |
{ |
VMEMM_DEVICE *dev = (VMEMM_DEVICE *)nHandle; |
PCIVME_VIC68A_ACTION sAction; // structure to access vic chip |
437,7 → 437,7 |
return 0; |
} |
|
int VMEerror(int nHandle) |
int VMEerror(ptrdiff_t nHandle) |
{ |
__u8 ubVector; |
|
449,7 → 449,7 |
return 0; |
} |
|
int VMEclose(int nHandle) |
int VMEclose(ptrdiff_t nHandle) |
{ |
int error = 0; |
VMEMM_DEVICE *dev = (VMEMM_DEVICE *)nHandle; |
469,7 → 469,7 |
return error; |
} |
|
int VMEcontrolInterrupt(int nHandle, BOOLEAN *bEnable) |
int VMEcontrolInterrupt(ptrdiff_t nHandle, BOOLEAN *bEnable) |
{ |
VMEMM_DEVICE *dev = (VMEMM_DEVICE *)nHandle; |
PCIVME_IRQ_CONTROL control; |
488,7 → 488,7 |
return 0; |
} |
|
int GetLastError(int nHandle) |
int GetLastError(ptrdiff_t nHandle) |
{ |
VMEMM_DEVICE *dev = (VMEMM_DEVICE *)nHandle; |
int nLocalError; |