Rev 21 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line | 
|---|---|---|---|
| 21 | f9daq | 1 | |
| 2 | #ifndef __LIBCC32_95_H__ | 
        ||
| 3 | #define __LIBCC32_95_H__ | 
        ||
| 4 | |||
| 5 | /* | 
        ||
| 6 |    libcc32_95.h -- header for a simple access library (WIN95 + WIN98) for the | 
        ||
| 7 |                                      PCICC32 PCI to CAMAC Interface from ARW Elektronik | 
        ||
| 8 | |||
| 9 |    (c) 2000 ARW Elektronik | 
        ||
| 10 | |||
| 11 |    this source code is published under GPL (Open Source). You can use, redistrubute and | 
        ||
| 12 |    modify it unless this header   is not modified or deleted. No warranty is given that | 
        ||
| 13 |    this software will work like expected. | 
        ||
| 14 |    This product is not authorized for use as critical component in life support systems | 
        ||
| 15 |    wihout the express written approval of ARW Elektronik Germany. | 
        ||
| 16 | |||
| 17 |    Please announce changes and hints to ARW Elektronik | 
        ||
| 18 | |||
| 19 |    first steps                                                                                                                  AR   30.07.2000 | 
        ||
| 20 |    added buffer, UNTIL_NOT_Q and AUTOREAD functionality                 AR   17.03.2001 | 
        ||
| 21 |    added framework for interrupt handling                               AR   08.06.2002 | 
        ||
| 22 | */ | 
        ||
| 23 | |||
| 24 | /* open a path to a device. E.g. "/dev/pcicc32_1" */ | 
        ||
| 25 | int cc32_open_95(char *cszPath, int nModuleNumber, void **handle);  | 
        ||
| 26 | |||
| 27 | /* close the opened path */ | 
        ||
| 28 | int cc32_close_95(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_95(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_95(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_95(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_95(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_95(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_95(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_95(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_95(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_95(void * handle, unsigned int N, unsigned int A, unsigned int F,  | 
        ||
| 58 | unsigned long *pdwBuffer, unsigned long *pdwLen);  | 
        ||
| 59 | /* switch UNTIL_NOT_Q or AUTOREAD on or off */ | 
        ||
| 60 | int cc32_access_switch_95(void *handle, unsigned short uwSwitch);  | 
        ||
| 61 | |||
| 62 | /* switch interrupts on */ | 
        ||
| 63 | int cc32_enable_interrupt_95(void *handle);  | 
        ||
| 64 | |||
| 65 | /* switch interrupts off */ | 
        ||
| 66 | int cc32_disable_interrupt_95(void *handle);  | 
        ||
| 67 | |||
| 68 | /* wait blocking for the next interrupt */ | 
        ||
| 69 | int cc32_get_interrupt_95(void *handle, unsigned long *dwStatus);  | 
        ||
| 70 | |||
| 71 | #endif // __LIBCC32_95_H__ |