Rev 9 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 9 | Rev 362 | ||
|---|---|---|---|
| 1 | #ifndef __PCIVME_NI_H__ |
1 | #ifndef __PCIVME_NI_H__ |
| 2 | #define __PCIVME_NI_H__ |
2 | #define __PCIVME_NI_H__ |
| 3 | - | ||
| - | 3 | #include <stddef.h> |
|
| 4 | //------------------------------------------------------------------------------------------- |
4 | //------------------------------------------------------------------------------------------- |
| 5 | // pcivme_ni.h - header for ni-labview shared library or dll for ARW pcivme interface |
5 | // pcivme_ni.h - header for ni-labview shared library or dll for ARW pcivme interface |
| 6 | // this library can also be used for other purposes aside from labview |
6 | // this library can also be used for other purposes aside from labview |
| 7 | // |
7 | // |
| 8 | // Copyright (C) 2002-2004 ARW Elektronik Germany |
8 | // Copyright (C) 2002-2004 ARW Elektronik Germany |
| 9 | // |
9 | // |
| 10 | // this source code is published under LGPL (Open Source). You can use, redistrubute and |
10 | // this source code is published under LGPL (Open Source). You can use, redistrubute and |
| 11 | // modify it unless this header is not modified or deleted. No warranty is given that |
11 | // modify it unless this header is not modified or deleted. No warranty is given that |
| 12 | // this software will work like expected. |
12 | // this software will work like expected. |
| 13 | // This product is not authorized for use as critical component in life support systems |
13 | // This product is not authorized for use as critical component in life support systems |
| 14 | // wihout the express written approval of ARW Elektronik Germany. |
14 | // wihout the express written approval of ARW Elektronik Germany. |
| 15 | // |
15 | // |
| 16 | // Please announce changes and hints to ARW Elektronik |
16 | // Please announce changes and hints to ARW Elektronik |
| 17 | // |
17 | // |
| 18 | // $Log: pcivme_ni.h,v $ |
18 | // $Log: pcivme_ni.h,v $ |
| 19 | // Revision 1.8 2004/08/13 19:23:45 klaus |
19 | // Revision 1.8 2004/08/13 19:23:45 klaus |
| 20 | // conversion to kernel-version 2.6, released version 3.0 |
20 | // conversion to kernel-version 2.6, released version 3.0 |
| 21 | // |
21 | // |
| 22 | // Revision 1.7 2002/10/20 18:07:18 klaus |
22 | // Revision 1.7 2002/10/20 18:07:18 klaus |
| 23 | // changed error handling |
23 | // changed error handling |
| 24 | // |
24 | // |
| 25 | // Revision 1.6 2002/10/18 21:56:28 klaus |
25 | // Revision 1.6 2002/10/18 21:56:28 klaus |
| 26 | // completed functional features, untested |
26 | // completed functional features, untested |
| 27 | // |
27 | // |
| 28 | // Revision 1.5 2002/10/18 21:56:28 klaus |
28 | // Revision 1.5 2002/10/18 21:56:28 klaus |
| 29 | // completed functional features, untested |
29 | // completed functional features, untested |
| 30 | // |
30 | // |
| 31 | // Revision 1.4 2002/10/17 21:16:03 klaus |
31 | // Revision 1.4 2002/10/17 21:16:03 klaus |
| 32 | // filled function bodies |
32 | // filled function bodies |
| 33 | // |
33 | // |
| 34 | // Revision 1.3 2002/10/17 21:16:03 klaus |
34 | // Revision 1.3 2002/10/17 21:16:03 klaus |
| 35 | // filled function bodies |
35 | // filled function bodies |
| 36 | // |
36 | // |
| 37 | // Revision 1.2 2002/10/17 19:05:03 klaus |
37 | // Revision 1.2 2002/10/17 19:05:03 klaus |
| 38 | // VME access is working through test to lib to driver |
38 | // VME access is working through test to lib to driver |
| 39 | // |
39 | // |
| 40 | // Revision 1.1 2002/10/12 22:04:44 klaus |
40 | // Revision 1.1 2002/10/12 22:04:44 klaus |
| 41 | // first work done |
41 | // first work done |
| 42 | // |
42 | // |
| 43 | // what who when |
43 | // what who when |
| 44 | // first steps AR 17.11.1999 |
44 | // first steps AR 17.11.1999 |
| 45 | // VMEerror new AR 07.01.2000 |
45 | // VMEerror new AR 07.01.2000 |
| 46 | // made LINUX shared library from windows template AR 12.10.2002 |
46 | // made LINUX shared library from windows template AR 12.10.2002 |
| 47 | // |
47 | // |
| 48 | 48 | ||
| 49 | //------------------------------------------------------------------------------------------- |
49 | //------------------------------------------------------------------------------------------- |
| 50 | // INCLUDES |
50 | // INCLUDES |
| 51 | // |
51 | // |
| 52 | #define BOOLEAN int |
52 | #define BOOLEAN int |
| 53 | #if !defined(TRUE) && !defined(FALSE) |
53 | #if !defined(TRUE) && !defined(FALSE) |
| 54 | #define FALSE 0 |
54 | #define FALSE 0 |
| 55 | #define TRUE 1 |
55 | #define TRUE 1 |
| 56 | #endif |
56 | #endif |
| 57 | 57 | ||
| 58 | //------------------------------------------------------------------------------------------- |
58 | //------------------------------------------------------------------------------------------- |
| 59 | // PROTOTYPES |
59 | // PROTOTYPES |
| 60 | // |
60 | // |
| 61 | #ifdef __cplusplus |
61 | #ifdef __cplusplus |
| 62 | extern "C" |
62 | extern "C" |
| 63 | { |
63 | { |
| 64 | #endif |
64 | #endif |
| 65 | int VMEopen(const char *cszDeviceName, unsigned char ubAddressModifier, |
65 | int VMEopen(const char *cszDeviceName, unsigned char ubAddressModifier, ptrdiff_t *pnHandle); |
| 66 | int VMEinit(const char *cszDeviceName, unsigned short nVMEMM, unsigned char ubAddressModifier, |
66 | int VMEinit(const char *cszDeviceName, unsigned short nVMEMM, unsigned char ubAddressModifier, ptrdiff_t *pnHandle); |
| 67 | int setAccessProperties( |
67 | int setAccessProperties(ptrdiff_t nHandle, unsigned char bModifier, unsigned char bAccessType); |
| 68 | int VMEread( |
68 | int VMEread(ptrdiff_t nHandle, unsigned long ulAddress, unsigned char ubAccessWidth, unsigned long ulElementCount, void *pvBuffer); |
| 69 | int VMEwrite( |
69 | int VMEwrite(ptrdiff_t nHandle, unsigned long ulAddress, unsigned char ubAccessWidth, unsigned long ulElementCount, void *pvBuffer); |
| 70 | int VMEaccessVIC( |
70 | int VMEaccessVIC(ptrdiff_t nHandle, unsigned char ubAccessMode, unsigned short uwAddress, unsigned char *ubContent); |
| 71 | int VMEreset( |
71 | int VMEreset(ptrdiff_t nHandle); |
| 72 | int VMETAS( |
72 | int VMETAS(ptrdiff_t nHandle, unsigned long ulAddress, unsigned char *ubResult); |
| 73 | int VMEcontrolInterrupt( |
73 | int VMEcontrolInterrupt(ptrdiff_t nHandle, BOOLEAN *bEnable); |
| 74 | int VMEinterrupt( |
74 | int VMEinterrupt(ptrdiff_t nHandle, unsigned char *ubVector); |
| 75 | int VMEsysfailGet( |
75 | int VMEsysfailGet(ptrdiff_t nHandle, BOOLEAN *bResult); |
| 76 | int VMEsysfailSet( |
76 | int VMEsysfailSet(ptrdiff_t nHandle, BOOLEAN bForce); |
| 77 | int VMEerror( |
77 | int VMEerror(ptrdiff_t nHandle); |
| 78 | int VMEclose( |
78 | int VMEclose(ptrdiff_t nHandle); |
| 79 | int GetLastError( |
79 | int GetLastError(ptrdiff_t nHandle); |
| 80 | #ifdef __cplusplus |
80 | #ifdef __cplusplus |
| 81 | } |
81 | } |
| 82 | #endif |
82 | #endif |
| 83 | 83 | ||
| 84 | #endif /* __PCIVME_NI_H__ */ |
84 | #endif /* __PCIVME_NI_H__ */ |
| 85 | 85 | ||