Subversion Repositories f9daq

Rev

Rev 135 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

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