Rev 135 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 78 | f9daq | 1 | #ifndef _WIENVME_DLL_H |
| 2 | #define _WIENVME_DLL_H |
||
| 3 | |||
| 100 | f9daq | 4 | #ifdef _CVI_ |
| 135 | f9daq | 5 | #include <windows.h> |
| 78 | f9daq | 6 | #include <ansi_c.h> |
| 7 | #include <stdint.h> |
||
| 8 | #include <cvidef.h> |
||
| 100 | f9daq | 9 | #endif |
| 78 | f9daq | 10 | |
| 11 | extern int hHandle24, hHandle32; |
||
| 12 | |||
| 13 | void WIENVME_load (char*); |
||
| 14 | int WIENVME_open (int*, unsigned char, char*, unsigned short); |
||
| 15 | int WIENVME_open24 (void); |
||
| 16 | int WIENVME_open32 (void); |
||
| 17 | int WIENVME_start (char*); |
||
| 18 | void WIENVME_unload (void); |
||
| 19 | int WIENVME_close (int); |
||
| 20 | int WIENVME_close24 (void); |
||
| 21 | int WIENVME_close32 (void); |
||
| 22 | int WIENVME_stop (void); |
||
| 23 | int WIENVME_reset (void); |
||
| 24 | |||
| 25 | int WIENVME_read8 (int, unsigned long, unsigned long, void*); |
||
| 26 | int WIENVME_read16 (int, unsigned long, unsigned long, void*); |
||
| 27 | int WIENVME_read32 (int, unsigned long, unsigned long, void*); |
||
| 28 | int WIENVME_write8 (int, unsigned long, unsigned long, void*); |
||
| 29 | int WIENVME_write16 (int, unsigned long, unsigned long, void*); |
||
| 30 | int WIENVME_write32 (int, unsigned long, unsigned long, void*); |
||
| 31 | |||
| 32 | #define WIENVME_VME_START(NODE) WIENVME_start((NODE)) |
||
| 33 | #define WIENVME_VME_STOP() WIENVME_stop() |
||
| 34 | #define WIENVME_VME_RESET() WIENVME_reset() |
||
| 35 | #define WIENVME_VME_A24D8_R(VME,DATA) WIENVME_read8(hHandle24, 1, (VME), (DATA)) |
||
| 36 | #define WIENVME_VME_A24D16_R(VME,DATA) WIENVME_read16(hHandle24, 1, (VME), (DATA)) |
||
| 37 | #define WIENVME_VME_A24D32_R(VME,DATA) WIENVME_read32(hHandle24, 1, (VME), (DATA)) |
||
| 38 | #define WIENVME_VME_A24D8_W(VME,DATA) WIENVME_write8(hHandle24, 1, (VME), (DATA)) |
||
| 39 | #define WIENVME_VME_A24D16_W(VME,DATA) WIENVME_write16(hHandle24, 1, (VME), (DATA)) |
||
| 40 | #define WIENVME_VME_A24D32_W(VME,DATA) WIENVME_write32(hHandle24, 1, (VME), (DATA)) |
||
| 41 | #define WIENVME_VME_A32D8_R(VME,DATA) WIENVME_read8(hHandle32, 1, (VME), (DATA)) |
||
| 42 | #define WIENVME_VME_A32D16_R(VME,DATA) WIENVME_read16(hHandle32, 1, (VME), (DATA)) |
||
| 43 | #define WIENVME_VME_A32D32_R(VME,DATA) WIENVME_read32(hHandle32, 1, (VME), (DATA)) |
||
| 44 | #define WIENVME_VME_A32D8_W(VME,DATA) WIENVME_write8(hHandle32, 1, (VME), (DATA)) |
||
| 45 | #define WIENVME_VME_A32D16_W(VME,DATA) WIENVME_write16(hHandle32, 1, (VME), (DATA)) |
||
| 46 | #define WIENVME_VME_A32D32_W(VME,DATA) WIENVME_write32(hHandle32, 1, (VME), (DATA)) |
||
| 47 | |||
| 48 | |||
| 49 | short __stdcall WIENVME_VME_R( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t *Data); |
||
| 50 | short __stdcall WIENVME_VME_W( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t Data); |
||
| 51 | |||
| 52 | short __stdcall WIENVME_VME_MW( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t Data); |
||
| 53 | short __stdcall WIENVME_VME_MWRST( void ); |
||
| 54 | short __stdcall WIENVME_VME_MWEXEC( void ); |
||
| 55 | |||
| 56 | short __stdcall WIENVME_VME_MR( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t *Data); |
||
| 57 | short __stdcall WIENVME_VME_MRRST( void ); |
||
| 58 | short __stdcall WIENVME_VME_MREXEC( uint32_t *Data ); |
||
| 59 | |||
| 60 | typedef unsigned short ADDRESS_MODIFIER; |
||
| 61 | |||
| 62 | #define Std_Sup_Data (ADDRESS_MODIFIER)0x3d |
||
| 63 | #define Std_Sup_Prog (ADDRESS_MODIFIER)0x3e |
||
| 64 | #define Std_NoPriv_Data (ADDRESS_MODIFIER)0x39 |
||
| 65 | #define Std_NoPriv_Prog (ADDRESS_MODIFIER)0x3a |
||
| 66 | |||
| 67 | #define Short_Sup (ADDRESS_MODIFIER)0x2d |
||
| 68 | #define Short_NoPriv (ADDRESS_MODIFIER)0x29 |
||
| 69 | |||
| 70 | #define Ext_Sup_Data (ADDRESS_MODIFIER)0x0d |
||
| 71 | #define Ext_Sup_Prog (ADDRESS_MODIFIER)0x0e |
||
| 72 | #define Ext_NoPriv_Data (ADDRESS_MODIFIER)0x09 |
||
| 73 | #define Ext_NoPriv_Prog (ADDRESS_MODIFIER)0x0a |
||
| 74 | |||
| 75 | #endif |