Rev 12 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 12 | Rev 52 | ||
---|---|---|---|
1 | #ifndef __PCIVME_NI_H__ |
1 | #ifndef __PCIVME_NI_H__ |
2 | #define __PCIVME_NI_H__ |
2 | #define __PCIVME_NI_H__ |
3 | 3 | ||
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, int *pnHandle); |
65 | int VMEopen(const char *cszDeviceName, unsigned char ubAddressModifier, int *pnHandle); |
66 | int VMEinit(const char *cszDeviceName, unsigned short nVMEMM, unsigned char ubAddressModifier, int *pnHandle); |
66 | int VMEinit(const char *cszDeviceName, unsigned short nVMEMM, unsigned char ubAddressModifier, int *pnHandle); |
67 | int setAccessProperties(int nHandle, unsigned char bModifier, unsigned char bAccessType); |
67 | int setAccessProperties(int nHandle, unsigned char bModifier, unsigned char bAccessType); |
68 | int VMEread(int nHandle, unsigned long ulAddress, unsigned char ubAccessWidth, unsigned long ulElementCount, void *pvBuffer); |
68 | int VMEread(int nHandle, unsigned long ulAddress, unsigned char ubAccessWidth, unsigned long ulElementCount, void *pvBuffer); |
69 | int VMEwrite(int nHandle, unsigned long ulAddress, unsigned char ubAccessWidth, unsigned long ulElementCount, void *pvBuffer); |
69 | int VMEwrite(int nHandle, unsigned long ulAddress, unsigned char ubAccessWidth, unsigned long ulElementCount, void *pvBuffer); |
70 | int VMEaccessVIC(int nHandle, unsigned char ubAccessMode, unsigned short uwAddress, unsigned char *ubContent); |
70 | int VMEaccessVIC(int nHandle, unsigned char ubAccessMode, unsigned short uwAddress, unsigned char *ubContent); |
71 | int VMEreset(int nHandle); |
71 | int VMEreset(int nHandle); |
72 | int VMETAS(int nHandle, unsigned long ulAddress, unsigned char *ubResult); |
72 | int VMETAS(int nHandle, unsigned long ulAddress, unsigned char *ubResult); |
73 | int VMEcontrolInterrupt(int nHandle, BOOLEAN *bEnable); |
73 | int VMEcontrolInterrupt(int nHandle, BOOLEAN *bEnable); |
74 | int VMEinterrupt(int nHandle, unsigned char *ubVector); |
74 | int VMEinterrupt(int nHandle, unsigned char *ubVector); |
75 | int VMEsysfailGet(int nHandle, BOOLEAN *bResult); |
75 | int VMEsysfailGet(int nHandle, BOOLEAN *bResult); |
76 | int VMEsysfailSet(int nHandle, BOOLEAN bForce); |
76 | int VMEsysfailSet(int nHandle, BOOLEAN bForce); |
77 | int VMEerror(int nHandle); |
77 | int VMEerror(int nHandle); |
78 | int VMEclose(int nHandle); |
78 | int VMEclose(int nHandle); |
79 | int GetLastError(int nHandle); |
79 | int GetLastError(int 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 |