Subversion Repositories f9daq

Rev

Rev 82 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. #ifndef _WIVUSB_DLL_H
  2. #define _WIVUSB_DLL_H
  3.  
  4. typedef unsigned short ADDRESS_MODIFIER;
  5.  
  6. #define Std_Sup_Data        (ADDRESS_MODIFIER)0x3d
  7. #define Std_Sup_Prog        (ADDRESS_MODIFIER)0x3e
  8. #define Std_NoPriv_Data     (ADDRESS_MODIFIER)0x39
  9. #define Std_NoPriv_Prog     (ADDRESS_MODIFIER)0x3a
  10.  
  11. #define Short_Sup           (ADDRESS_MODIFIER)0x2d
  12. #define Short_NoPriv        (ADDRESS_MODIFIER)0x29
  13.  
  14. #define Ext_Sup_Data        (ADDRESS_MODIFIER)0x0d
  15. #define Ext_Sup_Prog        (ADDRESS_MODIFIER)0x0e
  16. #define Ext_NoPriv_Data     (ADDRESS_MODIFIER)0x09
  17. #define Ext_NoPriv_Prog     (ADDRESS_MODIFIER)0x0a
  18.  
  19. struct xxusb_device_typ
  20. {
  21.   struct usb_device *usbdev;
  22.   char SerialString[7];
  23. };
  24.  
  25.  
  26. typedef struct xxusb_device_typ xxusb_device_type;
  27.  
  28. #define  xxusb_register_read       (*xxusb_register_read_Ptr)
  29. #define  xxusb_stack_read          (*xxusb_stack_read_Ptr)
  30. #define  xxusb_stack_write         (*xxusb_stack_write_Ptr)
  31. #define  xxusb_stack_execute       (*xxusb_stack_execute_Ptr)
  32. #define  xxusb_longstack_execute   (*xxusb_longstack_execute_Ptr)
  33. #define  xxusb_register_write      (*xxusb_register_write_Ptr)
  34. #define  xxusb_usbfifo_read        (*xxusb_usbfifo_read_Ptr)
  35. #define  xxusb_bulk_read               (*xxusb_bulk_read_Ptr)
  36. #define  xxusb_bulk_write          (*xxusb_bulk_write_Ptr)
  37. #define  xxusb_reset_toggle        (*xxusb_reset_toggle_Ptr)
  38.  
  39. #define  xxusb_devices_find                (*xxusb_devices_find_Ptr)
  40. #define  xxusb_device_close                (*xxusb_device_close_Ptr)
  41. #define  xxusb_device_open                 (*xxusb_device_open_Ptr)
  42. #define  xxusb_flash_program       (*xxusb_flash_program_Ptr)
  43. #define  xxusb_flashblock_program  (*xxusb_flashblock_program_Ptr)
  44. #define  xxusb_serial_open                 (*xxusb_serial_open_Ptr)
  45.  
  46. #define  VME_register_write                (*VME_register_write_Ptr)
  47. #define  VME_register_read                 (*VME_register_read_Ptr)
  48. #define  VME_LED_settings                  (*VME_LED_settings_Ptr)
  49. #define  VME_DGG                                   (*VME_DGG_Ptr)
  50. #define  VME_Output_settings       (*VME_Output_settings_Ptr)
  51. #define  VME_read_16                       (*VME_read_16_Ptr)
  52. #define  VME_read_32                       (*VME_read_32_Ptr)
  53. #define  VME_BLT_read_32                   (*VME_BLT_read_32_Ptr)
  54. #define  VME_write_16                      (*VME_write_16_Ptr)
  55. #define  VME_write_32                      (*VME_write_32_Ptr)
  56.  
  57. extern short __stdcall xxusb_register_read(usb_dev_handle *hDev, short RegAddr, long *RegData);
  58. extern short __stdcall xxusb_stack_read(usb_dev_handle *hDev, short StackAddr, long *StackData);
  59. extern short __stdcall xxusb_stack_write(usb_dev_handle *hDev, short StackAddr, long *StackData);
  60. extern short __stdcall xxusb_stack_execute(usb_dev_handle *hDev, long *StackData);
  61. extern short __stdcall xxusb_longstack_execute(usb_dev_handle *hDev, void *DataBuffer, int lDataLen, int timeout);
  62. extern short __stdcall xxusb_register_write(usb_dev_handle *hDev, short RegAddr, long RegData);
  63. extern short __stdcall xxusb_usbfifo_read(usb_dev_handle *hDev, long *DataBuffer, short lDataLen, int timeout);
  64. extern short __stdcall xxusb_bulk_read(usb_dev_handle *hDev, char *DataBuffer, short lDataLen, int timeout);
  65. extern short __stdcall xxusb_bulk_write(usb_dev_handle *hDev, char *DataBuffer, short lDataLen, int timeout);
  66. extern short __stdcall xxusb_reset_toggle(usb_dev_handle *hDev);
  67.  
  68. extern short __stdcall xxusb_devices_find(xxusb_device_type *xxusbDev);
  69. extern short __stdcall xxusb_device_close(usb_dev_handle *hDev);
  70. extern usb_dev_handle* __stdcall xxusb_device_open(struct usb_device *dev);
  71. extern short __stdcall xxusb_flash_program(usb_dev_handle *hDev, char *config, short nsect);
  72. extern short __stdcall xxusb_flashblock_program(usb_dev_handle *hDev, UCHAR *config);
  73. extern usb_dev_handle* __stdcall xxusb_serial_open(char *SerialString);
  74.  
  75. extern short __stdcall VME_register_write(usb_dev_handle *hdev, long VME_Address, long Data);
  76. extern short __stdcall VME_register_read(usb_dev_handle *hdev, long VME_Address, long *Data);
  77. extern short __stdcall VME_LED_settings(usb_dev_handle *hdev, int LED, int code, int invert, int latch);
  78.  
  79. extern short __stdcall VME_DGG(usb_dev_handle *hdev, unsigned short channel, unsigned short trigger,unsigned short output, long delay, unsigned short gate, unsigned short invert, unsigned short latch);
  80.  
  81. extern short __stdcall VME_Output_settings(usb_dev_handle *hdev, int Channel, int code, int invert, int latch);
  82.  
  83. extern short __stdcall VME_read_16(usb_dev_handle *hdev,short Address_Modifier, long VME_Address, long *Data);
  84. extern short __stdcall VME_read_32(usb_dev_handle *hdev, short Address_Modifier, long VME_Address, long *Data);
  85. extern short __stdcall VME_BLT_read_32(usb_dev_handle *hdev, short Address_Modifier, int count, long VME_Address, long Data[]);
  86. extern short __stdcall VME_write_16(usb_dev_handle *hdev, short Address_Modifier, long VME_Address, long Data);
  87. extern short __stdcall VME_write_32(usb_dev_handle *hdev, short Address_Modifier, long VME_Address, long Data);
  88.  
  89. #endif
  90.