#ifndef __PCIVME_NI_H__
#define __PCIVME_NI_H__
#include <stddef.h>
//-------------------------------------------------------------------------------------------
// pcivme_ni.h - header for ni-labview shared library or dll for ARW pcivme interface
// this library can also be used for other purposes aside from labview
//
// Copyright (C) 2002-2004 ARW Elektronik Germany
//
// this source code is published under LGPL (Open Source). You can use, redistrubute and
// modify it unless this header is not modified or deleted. No warranty is given that
// this software will work like expected.
// This product is not authorized for use as critical component in life support systems
// wihout the express written approval of ARW Elektronik Germany.
//
// Please announce changes and hints to ARW Elektronik
//
// $Log: pcivme_ni.h,v $
// Revision 1.8 2004/08/13 19:23:45 klaus
// conversion to kernel-version 2.6, released version 3.0
//
// Revision 1.7 2002/10/20 18:07:18 klaus
// changed error handling
//
// Revision 1.6 2002/10/18 21:56:28 klaus
// completed functional features, untested
//
// Revision 1.5 2002/10/18 21:56:28 klaus
// completed functional features, untested
//
// Revision 1.4 2002/10/17 21:16:03 klaus
// filled function bodies
//
// Revision 1.3 2002/10/17 21:16:03 klaus
// filled function bodies
//
// Revision 1.2 2002/10/17 19:05:03 klaus
// VME access is working through test to lib to driver
//
// Revision 1.1 2002/10/12 22:04:44 klaus
// first work done
//
// what who when
// first steps AR 17.11.1999
// VMEerror new AR 07.01.2000
// made LINUX shared library from windows template AR 12.10.2002
//
//-------------------------------------------------------------------------------------------
// INCLUDES
//
#define BOOLEAN int
#if !defined(TRUE) && !defined(FALSE)
#define FALSE 0
#define TRUE 1
#endif
//-------------------------------------------------------------------------------------------
// PROTOTYPES
//
#ifdef __cplusplus
extern "C"
{
#endif
int VMEopen(const char *cszDeviceName, unsigned char ubAddressModifier, ptrdiff_t *pnHandle);
int VMEinit(const char *cszDeviceName, unsigned short nVMEMM, unsigned char ubAddressModifier, ptrdiff_t *pnHandle);
int setAccessProperties(ptrdiff_t nHandle, unsigned char bModifier, unsigned char bAccessType);
int VMEread(ptrdiff_t 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);
int VMEaccessVIC(ptrdiff_t nHandle, unsigned char ubAccessMode, unsigned short uwAddress, unsigned char *ubContent);
int VMEreset(ptrdiff_t nHandle);
int VMETAS(ptrdiff_t nHandle, unsigned long ulAddress, unsigned char *ubResult);
int VMEcontrolInterrupt(ptrdiff_t nHandle, BOOLEAN *bEnable);
int VMEinterrupt(ptrdiff_t nHandle, unsigned char *ubVector);
int VMEsysfailGet(ptrdiff_t nHandle, BOOLEAN *bResult);
int VMEsysfailSet(ptrdiff_t nHandle, BOOLEAN bForce);
int VMEerror(ptrdiff_t nHandle);
int VMEclose(ptrdiff_t nHandle);
int GetLastError(ptrdiff_t nHandle);
#ifdef __cplusplus
}
#endif
#endif /* __PCIVME_NI_H__ */