Rev 21 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
21 | f9daq | 1 | #ifndef __LIBCC32_NT_H__ |
2 | #define __LIBCC32_NT_H__ |
||
3 | |||
4 | /* |
||
5 | libcc32_NT.h -- header for a simple access library (WINNT) for the |
||
6 | PCICC32 PCI to CAMAC Interface from ARW Elektronik |
||
7 | |||
8 | (c) 2000 ARW Elektronik |
||
9 | |||
10 | this source code is published under GPL (Open Source). You can use, redistrubute and |
||
11 | modify it unless this header is not modified or deleted. No warranty is given that |
||
12 | this software will work like expected. |
||
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. |
||
15 | |||
16 | Please announce changes and hints to ARW Elektronik |
||
17 | |||
18 | first steps AR 30.07.2000 |
||
19 | added buffer, UNTIL_NOT_Q and AUTOREAD functionality AR 17.03.2001 |
||
20 | added interrupt handling AR 08.06.2002 |
||
21 | */ |
||
22 | |||
23 | |||
24 | /* open a path to a device. E.g. "/dev/pcicc32_1" */ |
||
25 | int cc32_open_NT(char *cszPath, int nModuleNumber, void **handle); |
||
26 | |||
27 | /* close the opened path */ |
||
28 | int cc32_close_NT(void *handle); |
||
29 | |||
30 | /* read only a word - 16 bits - from a address made out of N,A,F */ |
||
31 | unsigned short cc32_read_word_NT(void *handle, unsigned int N, unsigned int A, unsigned int F); |
||
32 | |||
33 | /* read a long - 32 bits - from a address made out of N,A,F and get the result Q and X */ |
||
34 | unsigned long cc32_read_long_NT(void *handle, unsigned int N, unsigned int A, unsigned int F, char *Q, char *X); |
||
35 | |||
36 | /* read a long - 32 bits - without any interpretaion */ |
||
37 | unsigned long cc32_read_long_all_NT(void *handle, unsigned int N, unsigned int A, unsigned int F); |
||
38 | |||
39 | /* write a word - 16 bits - to a destination made out of N,A,F */ |
||
40 | void cc32_write_word_NT(void *handle, unsigned int N, unsigned int A, unsigned int F, unsigned short uwData); |
||
41 | |||
42 | /* write a long - 32 bits - uninterpreted to a destination made out of N,A,F */ |
||
43 | void cc32_write_long_NT(void *handle, unsigned int N, unsigned int A, unsigned int F, unsigned long ulData); |
||
44 | |||
45 | /* poll the state of the timeout line and the LAM state. The timeout line is cleared if it was set */ |
||
46 | int cc32_poll_error_NT(void *handle, char *nTimeout, char *nLam); |
||
47 | |||
48 | /* read words until not Q or *pdwLen data into a buffer */ |
||
49 | int cc32_read_word_buffer_NT(void * handle, unsigned int N, unsigned int A, unsigned int F, |
||
50 | unsigned short *pwBuffer, unsigned long *pdwLen); |
||
51 | |||
52 | /* read longs until not Q or *pdwLen data into a buffer */ |
||
53 | int cc32_read_long_buffer_NT(void * handle, unsigned int N, unsigned int A, unsigned int F, |
||
54 | unsigned long *pdwBuffer, unsigned long *pdwLen); |
||
55 | |||
56 | /* read longs until not Q or *pdwLen data and don't interpret Q and X information into a buffer */ |
||
57 | int cc32_read_long_all_buffer_NT(void * handle, unsigned int N, unsigned int A, unsigned int F, |
||
58 | unsigned long *pdwBuffer, unsigned long *pdwLen); |
||
59 | |||
60 | /* switch UNTIL_NOT_Q or AUTOREAD on or off */ |
||
61 | int cc32_access_switch_NT(void *handle, unsigned short uwSwitch); |
||
62 | |||
63 | /* switch interrupts on */ |
||
64 | int cc32_enable_interrupt_NT(void *handle); |
||
65 | |||
66 | /* switch interrupts off */ |
||
67 | int cc32_disable_interrupt_NT(void *handle); |
||
68 | |||
69 | /* wait blocking for the next interrupt */ |
||
70 | int cc32_get_interrupt_NT(void *handle, unsigned long *dwStatus); |
||
71 | |||
72 | #endif // __LIBCC32_NT_H__ |