Subversion Repositories f9daq

Rev

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

  1. #ifndef _VME_H_
  2. #define _VME_H_
  3.  
  4. #include <stdint.h>
  5.  
  6. #define CAEN_V1718   0
  7. #define WIENER_VMEMM 1
  8. #define WIENER_VMUSB 2
  9.  
  10.  
  11. short VME_START( int interface );
  12. short VME_STOP();
  13. int VME_CONNECTED();
  14.  
  15. #define VME_A16 0x29
  16. #define VME_A24 0x39
  17. #define VME_A32 0x9
  18.  
  19. #define VME_D8  0x1
  20. #define VME_D16 0x2
  21. #define VME_D32 0x4
  22.  
  23. #define VME_A16D8_R(VME,DATA)  VME_R( VME_A16, VME_D8  , (VME), (DATA) )
  24. #define VME_A16D16_R(VME,DATA) VME_R( VME_A16, VME_D16 , (VME), (DATA) )
  25. #define VME_A16D32_R(VME,DATA) VME_R( VME_A16, VME_D32 , (VME), (DATA) )
  26.  
  27. #define VME_A24D8_R(VME,DATA)  VME_R( VME_A24, VME_D8  , (VME), (DATA) )
  28. #define VME_A24D16_R(VME,DATA) VME_R( VME_A24, VME_D16 , (VME), (DATA) )
  29. #define VME_A24D32_R(VME,DATA) VME_R( VME_A24, VME_D32 , (VME), (DATA) )
  30.  
  31. #define VME_A32D8_R(VME,DATA)  VME_R( VME_A32, VME_D8  , (VME), (DATA) )
  32. #define VME_A32D16_R(VME,DATA) VME_R( VME_A32, VME_D16 , (VME), (DATA) )
  33. #define VME_A32D32_R(VME,DATA) VME_R( VME_A32, VME_D32 , (VME), (DATA) )
  34.  
  35. #define VME_A16D8_W(VME,DATA)  VME_W( VME_A16, VME_D8  , (VME), (DATA) )
  36. #define VME_A16D16_W(VME,DATA) VME_W( VME_A16, VME_D16 , (VME), (DATA) )
  37. #define VME_A16D32_W(VME,DATA) VME_W( VME_A16, VME_D32 , (VME), (DATA) )
  38.  
  39. #define VME_A24D8_W(VME,DATA)  VME_W( VME_A24, VME_D8  , (VME), (DATA) )
  40. #define VME_A24D16_W(VME,DATA) VME_W( VME_A24, VME_D16 , (VME), (DATA) )
  41. #define VME_A24D32_W(VME,DATA) VME_W( VME_A24, VME_D32 , (VME), (DATA) )
  42.  
  43. #define VME_A32D8_W(VME,DATA)  VME_W( VME_A32, VME_D8  , (VME), (DATA) )
  44. #define VME_A32D16_W(VME,DATA) VME_W( VME_A32, VME_D16 , (VME), (DATA) )
  45. #define VME_A32D32_W(VME,DATA) VME_W( VME_A32, VME_D32 , (VME), (DATA) )
  46.  
  47.  
  48. #define  VME_R         (*VME_R_Ptr)
  49. #define  VME_W         (*VME_W_Ptr)
  50. #define  VME_MW        (*VME_MW_Ptr)
  51. #define  VME_MWRST     (*VME_MWRST_Ptr)
  52. #define  VME_MWEXEC    (*VME_MWEXEC_Ptr)
  53.  
  54. #define  VME_MR        (*VME_MR_Ptr)
  55. #define  VME_MRRST     (*VME_MRRST_Ptr)
  56. #define  VME_MREXEC    (*VME_MREXEC_Ptr)
  57.  
  58.  
  59. short __stdcall VME_R( uint16_t AM, uint16_t DW,  uint32_t VME_Address, uint32_t *Data);
  60.  
  61. short __stdcall VME_W( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t Data);
  62.  
  63. short __stdcall VME_MW( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t Data);
  64. short __stdcall VME_MWRST( void );
  65. short __stdcall VME_MWEXEC( void );
  66.  
  67. short __stdcall VME_MR( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t *Data);
  68. short __stdcall VME_MRRST( void );
  69. short __stdcall VME_MREXEC(  uint32_t *Data  );
  70.  
  71. #endif
  72.  
  73.