/ICFA/uklon/uklon.cdb |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/ICFA/uklon/usb.h |
---|
0,0 → 1,373 |
#ifndef __USB_H__ |
#define __USB_H__ |
#include <stdlib.h> |
/* |
* 'interface' is defined somewhere in the Windows header files. This macro |
* is deleted here to avoid conflicts and compile errors. |
*/ |
#ifdef interface |
#undef interface |
#endif |
/* |
* PATH_MAX from limits.h can't be used on Windows if the dll and |
* import libraries are build/used by different compilers |
*/ |
#define LIBUSB_PATH_MAX 512 |
/* |
* USB spec information |
* |
* This is all stuff grabbed from various USB specs and is pretty much |
* not subject to change |
*/ |
/* |
* Device and/or Interface Class codes |
*/ |
#define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */ |
#define USB_CLASS_AUDIO 1 |
#define USB_CLASS_COMM 2 |
#define USB_CLASS_HID 3 |
#define USB_CLASS_PRINTER 7 |
#define USB_CLASS_MASS_STORAGE 8 |
#define USB_CLASS_HUB 9 |
#define USB_CLASS_DATA 10 |
#define USB_CLASS_VENDOR_SPEC 0xff |
/* |
* Descriptor types |
*/ |
#define USB_DT_DEVICE 0x01 |
#define USB_DT_CONFIG 0x02 |
#define USB_DT_STRING 0x03 |
#define USB_DT_INTERFACE 0x04 |
#define USB_DT_ENDPOINT 0x05 |
#define USB_DT_HID 0x21 |
#define USB_DT_REPORT 0x22 |
#define USB_DT_PHYSICAL 0x23 |
#define USB_DT_HUB 0x29 |
/* |
* Descriptor sizes per descriptor type |
*/ |
#define USB_DT_DEVICE_SIZE 18 |
#define USB_DT_CONFIG_SIZE 9 |
#define USB_DT_INTERFACE_SIZE 9 |
#define USB_DT_ENDPOINT_SIZE 7 |
#define USB_DT_ENDPOINT_AUDIO_SIZE 9 /* Audio extension */ |
#define USB_DT_HUB_NONVAR_SIZE 7 |
/* ensure byte-packed structures */ |
#include <pshpack1.h> |
/* All standard descriptors have these 2 fields in common */ |
struct usb_descriptor_header { |
unsigned char bLength; |
unsigned char bDescriptorType; |
}; |
/* String descriptor */ |
struct usb_string_descriptor { |
unsigned char bLength; |
unsigned char bDescriptorType; |
unsigned short wData[1]; |
}; |
/* HID descriptor */ |
struct usb_hid_descriptor { |
unsigned char bLength; |
unsigned char bDescriptorType; |
unsigned short bcdHID; |
unsigned char bCountryCode; |
unsigned char bNumDescriptors; |
}; |
/* Endpoint descriptor */ |
#define USB_MAXENDPOINTS 32 |
struct usb_endpoint_descriptor { |
unsigned char bLength; |
unsigned char bDescriptorType; |
unsigned char bEndpointAddress; |
unsigned char bmAttributes; |
unsigned short wMaxPacketSize; |
unsigned char bInterval; |
unsigned char bRefresh; |
unsigned char bSynchAddress; |
unsigned char *extra; /* Extra descriptors */ |
int extralen; |
}; |
#define USB_ENDPOINT_ADDRESS_MASK 0x0f /* in bEndpointAddress */ |
#define USB_ENDPOINT_DIR_MASK 0x80 |
#define USB_ENDPOINT_TYPE_MASK 0x03 /* in bmAttributes */ |
#define USB_ENDPOINT_TYPE_CONTROL 0 |
#define USB_ENDPOINT_TYPE_ISOCHRONOUS 1 |
#define USB_ENDPOINT_TYPE_BULK 2 |
#define USB_ENDPOINT_TYPE_INTERRUPT 3 |
/* Interface descriptor */ |
#define USB_MAXINTERFACES 32 |
struct usb_interface_descriptor { |
unsigned char bLength; |
unsigned char bDescriptorType; |
unsigned char bInterfaceNumber; |
unsigned char bAlternateSetting; |
unsigned char bNumEndpoints; |
unsigned char bInterfaceClass; |
unsigned char bInterfaceSubClass; |
unsigned char bInterfaceProtocol; |
unsigned char iInterface; |
struct usb_endpoint_descriptor *endpoint; |
unsigned char *extra; /* Extra descriptors */ |
int extralen; |
}; |
#define USB_MAXALTSETTING 128 /* Hard limit */ |
struct usb_interface { |
struct usb_interface_descriptor *altsetting; |
int num_altsetting; |
}; |
/* Configuration descriptor information.. */ |
#define USB_MAXCONFIG 8 |
struct usb_config_descriptor { |
unsigned char bLength; |
unsigned char bDescriptorType; |
unsigned short wTotalLength; |
unsigned char bNumInterfaces; |
unsigned char bConfigurationValue; |
unsigned char iConfiguration; |
unsigned char bmAttributes; |
unsigned char MaxPower; |
struct usb_interface *interface; |
unsigned char *extra; /* Extra descriptors */ |
int extralen; |
}; |
/* Device descriptor */ |
struct usb_device_descriptor { |
unsigned char bLength; |
unsigned char bDescriptorType; |
unsigned short bcdUSB; |
unsigned char bDeviceClass; |
unsigned char bDeviceSubClass; |
unsigned char bDeviceProtocol; |
unsigned char bMaxPacketSize0; |
unsigned short idVendor; |
unsigned short idProduct; |
unsigned short bcdDevice; |
unsigned char iManufacturer; |
unsigned char iProduct; |
unsigned char iSerialNumber; |
unsigned char bNumConfigurations; |
}; |
struct usb_ctrl_setup { |
unsigned char bRequestType; |
unsigned char bRequest; |
unsigned short wValue; |
unsigned short wIndex; |
unsigned short wLength; |
}; |
/* |
* Standard requests |
*/ |
#define USB_REQ_GET_STATUS 0x00 |
#define USB_REQ_CLEAR_FEATURE 0x01 |
/* 0x02 is reserved */ |
#define USB_REQ_SET_FEATURE 0x03 |
/* 0x04 is reserved */ |
#define USB_REQ_SET_ADDRESS 0x05 |
#define USB_REQ_GET_DESCRIPTOR 0x06 |
#define USB_REQ_SET_DESCRIPTOR 0x07 |
#define USB_REQ_GET_CONFIGURATION 0x08 |
#define USB_REQ_SET_CONFIGURATION 0x09 |
#define USB_REQ_GET_INTERFACE 0x0A |
#define USB_REQ_SET_INTERFACE 0x0B |
#define USB_REQ_SYNCH_FRAME 0x0C |
#define USB_TYPE_STANDARD (0x00 << 5) |
#define USB_TYPE_CLASS (0x01 << 5) |
#define USB_TYPE_VENDOR (0x02 << 5) |
#define USB_TYPE_RESERVED (0x03 << 5) |
#define USB_RECIP_DEVICE 0x00 |
#define USB_RECIP_INTERFACE 0x01 |
#define USB_RECIP_ENDPOINT 0x02 |
#define USB_RECIP_OTHER 0x03 |
/* |
* Various libusb API related stuff |
*/ |
#define USB_ENDPOINT_IN 0x80 |
#define USB_ENDPOINT_OUT 0x00 |
/* Error codes */ |
#define USB_ERROR_BEGIN 500000 |
/* |
* This is supposed to look weird. This file is generated from autoconf |
* and I didn't want to make this too complicated. |
*/ |
#define USB_LE16_TO_CPU(x) |
/* Data types */ |
/* struct usb_device; */ |
/* struct usb_bus; */ |
struct usb_device { |
struct usb_device *next, *prev; |
char filename[LIBUSB_PATH_MAX]; |
struct usb_bus *bus; |
struct usb_device_descriptor descriptor; |
struct usb_config_descriptor *config; |
void *dev; /* Darwin support */ |
unsigned char devnum; |
unsigned char num_children; |
struct usb_device **children; |
}; |
struct usb_bus { |
struct usb_bus *next, *prev; |
char dirname[LIBUSB_PATH_MAX]; |
struct usb_device *devices; |
unsigned long location; |
struct usb_device *root_dev; |
}; |
/* Version information, Windows specific */ |
struct usb_version { |
struct { |
int major; |
int minor; |
int micro; |
int nano; |
} dll; |
struct { |
int major; |
int minor; |
int micro; |
int nano; |
} driver; |
}; |
struct usb_dev_handle; |
typedef struct usb_dev_handle usb_dev_handle; |
/* Variables */ |
struct usb_bus *usb_busses; |
#include <poppack.h> |
#ifdef __cplusplus |
extern "C" { |
#endif |
/* Function prototypes */ |
/* usb.c */ |
usb_dev_handle *usb_open(struct usb_device *dev); |
int usb_close(usb_dev_handle *dev); |
int usb_get_string(usb_dev_handle *dev, int index, int langid, char *buf, |
size_t buflen); |
int usb_get_string_simple(usb_dev_handle *dev, int index, char *buf, |
size_t buflen); |
/* descriptors.c */ |
int usb_get_descriptor_by_endpoint(usb_dev_handle *udev, int ep, |
unsigned char type, unsigned char index, |
void *buf, int size); |
int usb_get_descriptor(usb_dev_handle *udev, unsigned char type, |
unsigned char index, void *buf, int size); |
/* <arch>.c */ |
int usb_bulk_write(usb_dev_handle *dev, int ep, char *bytes, int size, |
int timeout); |
int usb_bulk_read(usb_dev_handle *dev, int ep, char *bytes, int size, |
int timeout); |
int usb_interrupt_write(usb_dev_handle *dev, int ep, char *bytes, int size, |
int timeout); |
int usb_interrupt_read(usb_dev_handle *dev, int ep, char *bytes, int size, |
int timeout); |
int usb_control_msg(usb_dev_handle *dev, int requesttype, int request, |
int value, int index, char *bytes, int size, |
int timeout); |
int usb_set_configuration(usb_dev_handle *dev, int configuration); |
int usb_claim_interface(usb_dev_handle *dev, int interface); |
int usb_release_interface(usb_dev_handle *dev, int interface); |
int usb_set_altinterface(usb_dev_handle *dev, int alternate); |
int usb_resetep(usb_dev_handle *dev, unsigned int ep); |
int usb_clear_halt(usb_dev_handle *dev, unsigned int ep); |
int usb_reset(usb_dev_handle *dev); |
char *usb_strerror(void); |
void usb_init(void); |
void usb_set_debug(int level); |
int usb_find_busses(void); |
int usb_find_devices(void); |
struct usb_device *usb_device(usb_dev_handle *dev); |
struct usb_bus *usb_get_busses(void); |
/* Windows specific functions */ |
#define LIBUSB_HAS_INSTALL_SERVICE_NP 1 |
int usb_install_service_np(void); |
#define LIBUSB_HAS_UNINSTALL_SERVICE_NP 1 |
int usb_uninstall_service_np(void); |
#define LIBUSB_HAS_INSTALL_DRIVER_NP 1 |
int usb_install_driver_np(const char *inf_file); |
const struct usb_version *usb_get_version(void); |
int usb_isochronous_setup_async(usb_dev_handle *dev, void **context, |
unsigned char ep, int pktsize); |
int usb_bulk_setup_async(usb_dev_handle *dev, void **context, |
unsigned char ep); |
int usb_interrupt_setup_async(usb_dev_handle *dev, void **context, |
unsigned char ep); |
int usb_submit_async(void *context, char *bytes, int size); |
int usb_reap_async(void *context, int timeout); |
int usb_free_async(void **context); |
#ifdef __cplusplus |
} |
#endif |
#endif /* __USB_H__ */ |
/ICFA/uklon/uklon.prj |
---|
0,0 → 1,214 |
[Project Header] |
Version = 551 |
Platform Code = 4 |
Pathname = "/c/ICFA/2014/uklon/uklon.prj" |
CVI Dir = "/c/measurementstudio/cvi" |
VXIplug&play Framework Dir = "/C/VXIPNP/winnt" |
Number of Files = 5 |
Sort Type = "No Sort" |
Target Type = "Executable" |
Build Configuration = "Debug" |
Warn User If Debugging Release = 1 |
Flags = 17 |
Drag Bar Left = 351 |
Window Top = 351 |
Window Left = 452 |
Window Bottom = 733 |
Window Right = 1090 |
[File 0001] |
File Type = "User Interface Resource" |
Path = "/c/ICFA/2014/uklon/uklon_ui.uir" |
Res Id = 1 |
Exclude = False |
Disk Date = 3493093712 |
Project Flags = 0 |
Window Top = 124 |
Window Left = 151 |
Window Height = 854 |
Window Width = 951 |
[File 0002] |
File Type = "CSource" |
Path = "/c/ICFA/2014/uklon/uklon.c" |
Res Id = 2 |
Exclude = False |
Disk Date = 3493185577 |
Project Flags = 0 |
Compile Into Object File = False |
Object Format = "Win32-MSVC" |
ForceCompile_Debug = False |
ForceCompile_Release = True |
Window Top = 244 |
Window Left = 358 |
Window Height = 0 |
Window Width = 0 |
Source Window State = "1,278,278,278,9,12,13,0,0,107,0,3,0,3,0,41,171,0,207,92," |
Header Dependencies Line0001 = "2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,3" |
Header Dependencies Line0002 = "1,32,33,34,35,36,37,38,39,40,41,42,49,50,51,52,53,54," |
[File 0003] |
File Type = "Include" |
Path = "/c/ICFA/2014/uklon/xxusbdll.h" |
Res Id = 3 |
Exclude = False |
Disk Date = 3309558690 |
Project Flags = 0 |
Window Top = 478 |
Window Left = 497 |
Window Height = 0 |
Window Width = 0 |
Source Window State = "1,105,105,105,22,25,26,0,0,80,0,0,0,0,0,29,84,0,103,72," |
[File 0004] |
File Type = "Include" |
Path = "/c/ICFA/2014/uklon/usb.h" |
Res Id = 4 |
Exclude = False |
Disk Date = 3201897964 |
Project Flags = 0 |
Window Top = 602 |
Window Left = 310 |
Window Height = 0 |
Window Width = 0 |
Source Window State = "1,0,0,0,0,0,0,0,0,80,0,0,0,0,0,25,0,0,0,0," |
[File 0005] |
File Type = "Library" |
Path = "/c/ICFA/2014/uklon/libxxusb.lib" |
Res Id = 5 |
Exclude = False |
Disk Date = 3428770810 |
Project Flags = 0 |
Window Top = 0 |
Window Left = 0 |
Window Height = 0 |
Window Width = 0 |
[SCC Options] |
Use global settings = True |
SCC Provider = "" |
SCC Project = "" |
Local Path = "" |
Auxiliary Path = "" |
Perform Same Action For .h File As For .uir File = "Ask" |
Comment = "" |
Username = "" |
Use Default Comment = False |
Use Default Username = False |
Do Not Include PRJ File in Actions = True |
Suppress CVI Error Messages = False |
[Compiler Options] |
Default Calling Convention = "cdecl" |
Max Number Of Errors = 10 |
Require Prototypes = True |
Require Return Values = True |
Enable Pointer Mismatch Warning = False |
Enable Unreachable Code Warning = False |
Track Include File Dependencies = True |
Prompt For Missing Includes = True |
Stop On First Error File = False |
Bring Up Err Win For Warnings = True |
Show Build Dialog = False |
O Option Compatible With 5.0 = False |
[Run Options] |
Stack Size = 250000 |
Debugging Level = "Standard" |
Save Changes Before Running = "Ask" |
Break On Library Errors = True |
Break On First Chance Exceptions = False |
Hide Windows = False |
Break At First Statement = False |
[Compiler Defines] |
Compiler Defines = "/DWIN32_LEAN_AND_MEAN" |
[Command Line Args] |
Command Line Args = "" |
[Included Headers] |
Header 0054 = "/c/ICFA/2014/uklon/xxusbdll.h" |
Header 0052 = "/c/ICFA/2014/uklon/usb.h" |
Header 0002 = "/c/MeasurementStudio/cvi/include/ansi_c.h" |
Header 0003 = "/c/MeasurementStudio/cvi/include/ansi/assert.h" |
Header 0004 = "/c/MeasurementStudio/cvi/include/cvidef.h" |
Header 0005 = "/c/MeasurementStudio/cvi/include/cvirte.h" |
Header 0006 = "/c/MeasurementStudio/cvi/include/ansi/ctype.h" |
Header 0007 = "/c/MeasurementStudio/cvi/include/ansi/errno.h" |
Header 0008 = "/c/MeasurementStudio/cvi/include/ansi/float.h" |
Header 0009 = "/c/MeasurementStudio/cvi/include/ansi/limits.h" |
Header 0010 = "/c/MeasurementStudio/cvi/include/ansi/locale.h" |
Header 0011 = "/c/MeasurementStudio/cvi/include/ansi/math.h" |
Header 0012 = "/c/MeasurementStudio/cvi/include/ansi/setjmp.h" |
Header 0013 = "/c/MeasurementStudio/cvi/include/ansi/signal.h" |
Header 0014 = "/c/MeasurementStudio/cvi/include/ansi/stdarg.h" |
Header 0015 = "/c/MeasurementStudio/cvi/include/ansi/stddef.h" |
Header 0016 = "/c/MeasurementStudio/cvi/include/ansi/stdio.h" |
Header 0017 = "/c/MeasurementStudio/cvi/include/ansi/stdlib.h" |
Header 0018 = "/c/MeasurementStudio/cvi/include/ansi/string.h" |
Header 0019 = "/c/MeasurementStudio/cvi/include/ansi/time.h" |
Header 0020 = "/c/MeasurementStudio/cvi/sdk/include/windows.h" |
Header 0021 = "/c/MeasurementStudio/cvi/sdk/include/windef.h" |
Header 0022 = "/c/MeasurementStudio/cvi/sdk/include/winnt.h" |
Header 0023 = "/c/MeasurementStudio/cvi/sdk/include/basetsd.h" |
Header 0024 = "/c/MeasurementStudio/cvi/sdk/include/Guiddef.h" |
Header 0025 = "/c/MeasurementStudio/cvi/sdk/include/pshpack4.h" |
Header 0026 = "/c/MeasurementStudio/cvi/sdk/include/poppack.h" |
Header 0027 = "/c/MeasurementStudio/cvi/sdk/include/pshpack2.h" |
Header 0028 = "/c/MeasurementStudio/cvi/sdk/include/pshpack8.h" |
Header 0029 = "/c/MeasurementStudio/cvi/sdk/include/winbase.h" |
Header 0030 = "/c/MeasurementStudio/cvi/sdk/include/winerror.h" |
Header 0031 = "/c/MeasurementStudio/cvi/sdk/include/wingdi.h" |
Header 0032 = "/c/MeasurementStudio/cvi/sdk/include/pshpack1.h" |
Header 0033 = "/c/MeasurementStudio/cvi/sdk/include/winuser.h" |
Header 0034 = "/c/MeasurementStudio/cvi/sdk/include/tvout.h" |
Header 0035 = "/c/MeasurementStudio/cvi/sdk/include/winnls.h" |
Header 0036 = "/c/MeasurementStudio/cvi/sdk/include/wincon.h" |
Header 0037 = "/c/MeasurementStudio/cvi/sdk/include/winver.h" |
Header 0038 = "/c/MeasurementStudio/cvi/sdk/include/winreg.h" |
Header 0039 = "/c/MeasurementStudio/cvi/sdk/include/winnetwk.h" |
Header 0040 = "/c/MeasurementStudio/cvi/sdk/include/winsvc.h" |
Header 0041 = "/c/MeasurementStudio/cvi/sdk/include/mcx.h" |
Header 0042 = "/c/MeasurementStudio/cvi/sdk/include/imm.h" |
Header 0049 = "/c/MeasurementStudio/cvi/include/formatio.h" |
Header 0050 = "/c/MeasurementStudio/cvi/include/userint.h" |
Header 0051 = "/c/MeasurementStudio/cvi/include/utility.h" |
Header 0053 = "/c/ICFA/2014/uklon/uklon_ui.h" |
Max Header Number = 54 |
[Create Executable] |
Executable File_Debug = "/c/ICFA/2014/uklon/uklon.exe" |
Target Creation Date_Debug = 3493185581 |
Force Creation of Target_Debug = False |
Executable File_Release = "/c/ICFA/2014/uklon/histo.exe" |
Target Creation Date_Release = 3106641546 |
Force Creation of Target_Release = True |
Icon File = "" |
Application Title = "PMT histo" |
DLL Exports = "Include File Symbols" |
DLL Import Library Choice = "Gen Lib For Current Mode" |
Use VXIPNP Subdirectories for Import Libraries = False |
Use Dflt Import Lib Base Name = True |
Where to Copy DLL = "Do not copy" |
Add Type Lib To DLL = False |
Include Type Lib Help Links = False |
Type Lib FP File = "" |
Type Lib Guid = "" |
Uses DataSocket = 0 |
Uses NIReports = 0 |
Uses DCom95 = 0 |
Instrument Driver Support Only = False |
[External Compiler Support] |
UIR Callbacks File Option = 0 |
Using LoadExternalModule = False |
Create Project Symbols File = True |
UIR Callbacks Obj File = "" |
Project Symbols H File = "" |
Project Symbols Obj File = "" |
[DLL Debugging Support] |
External Process Path = "" |
/ICFA/uklon/uklon_ui.uir |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/ICFA/uklon/libxxusb.lib |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/ICFA/uklon/uklon.exe |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/ICFA/uklon/uklon.c |
---|
0,0 → 1,424 |
#include <windows.h> |
#include <userint.h> |
#include <utility.h> |
#include <formatio.h> |
#include <ansi_c.h> |
#include "usb.h" |
#include "xxusbdll.h" |
#include <cvirte.h> /* Needed if linking in external compiler; harmless otherwise */ |
#include "uklon_ui.h" |
#define NDIS 21 |
#define NSCA 22 |
#define NTGG 23 |
int nc[]={P1_NC0, P1_NC1, P1_NC2, P1_NC3, |
P1_NC4, P1_NC5, P1_NC6, P1_NC7, |
P1_NC8, P1_NC9, P1_NC10,P1_NC11, |
P1_NC12,P1_NC13,P1_NC14,P1_NC15 } ; |
#define C_I CAMAC_I |
#define C_Z CAMAC_Z |
#define C_C CAMAC_C |
//#define C_write WUSBXX_CAMAC_write |
//#define C_read WUSBXX_CAMAC_read |
#define C_write CAMAC_write |
#define C_read CAMAC_read |
//******************************************************************** |
usb_dev_handle *udev; |
int Q; |
int X; |
static HINSTANCE DLLHandle; |
int WUSBXX_load (char* module_path) |
{ |
if (module_path == NULL) |
DLLHandle = LoadLibrary("libxxusb.dll"); |
else |
DLLHandle = LoadLibrary(module_path); |
if (!(xxusb_register_read_Ptr = (void*) GetProcAddress(DLLHandle,"xxusb_register_read"))) return __LINE__; |
if (!(xxusb_stack_read_Ptr = (void*) GetProcAddress(DLLHandle,"xxusb_stack_read"))) return __LINE__; |
if (!(xxusb_stack_write_Ptr = (void*) GetProcAddress(DLLHandle,"xxusb_stack_write"))) return __LINE__; |
if (!(xxusb_stack_execute_Ptr = (void*) GetProcAddress(DLLHandle,"xxusb_stack_execute"))) return __LINE__; |
if (!(xxusb_register_write_Ptr = (void*) GetProcAddress(DLLHandle,"xxusb_register_write"))) return __LINE__; |
if (!(xxusb_usbfifo_read_Ptr = (void*) GetProcAddress(DLLHandle,"xxusb_usbfifo_read"))) return __LINE__; |
if (!(xxusb_bulk_read_Ptr = (void*) GetProcAddress(DLLHandle,"xxusb_bulk_read"))) return __LINE__; |
if (!(xxusb_bulk_write_Ptr = (void*) GetProcAddress(DLLHandle,"xxusb_bulk_write"))) return __LINE__; |
if (!(xxusb_reset_toggle_Ptr = (void*) GetProcAddress(DLLHandle,"xxusb_reset_toggle"))) return __LINE__; |
if (!(xxusb_devices_find_Ptr = (void*) GetProcAddress(DLLHandle,"xxusb_devices_find"))) return __LINE__; |
if (!(xxusb_device_close_Ptr = (void*) GetProcAddress(DLLHandle,"xxusb_device_close"))) return __LINE__; |
if (!(xxusb_device_open_Ptr = (void*) GetProcAddress(DLLHandle,"xxusb_device_open"))) return __LINE__; |
if (!(xxusb_flash_program_Ptr = (void*) GetProcAddress(DLLHandle,"xxusb_flash_program"))) return __LINE__; |
if (!(xxusb_flashblock_program_Ptr = (void*) GetProcAddress(DLLHandle,"xxusb_flashblock_program"))) return __LINE__; |
if (!(xxusb_serial_open_Ptr = (void*) GetProcAddress(DLLHandle,"xxusb_serial_open"))) return __LINE__; |
if (!(VME_register_write_Ptr = (void*) GetProcAddress(DLLHandle,"VME_register_write"))) return __LINE__; |
if (!(VME_register_read_Ptr = (void*) GetProcAddress(DLLHandle,"VME_register_read"))) return __LINE__; |
if (!(VME_LED_settings_Ptr = (void*) GetProcAddress(DLLHandle,"VME_LED_settings"))) return __LINE__; |
if (!(VME_DGG_Ptr = (void*) GetProcAddress(DLLHandle,"VME_DGG"))) return __LINE__; |
if (!(VME_Output_settings_Ptr = (void*) GetProcAddress(DLLHandle,"VME_Output_settings"))) return __LINE__; |
if (!(VME_read_16_Ptr = (void*) GetProcAddress(DLLHandle,"VME_read_16"))) return __LINE__; |
if (!(VME_read_32_Ptr = (void*) GetProcAddress(DLLHandle,"VME_read_32"))) return __LINE__; |
if (!(VME_BLT_read_32_Ptr = (void*) GetProcAddress(DLLHandle,"VME_BLT_read_32"))) return __LINE__; |
if (!(VME_write_16_Ptr = (void*) GetProcAddress(DLLHandle,"VME_write_16"))) return __LINE__; |
if (!(VME_write_32_Ptr = (void*) GetProcAddress(DLLHandle,"VME_write_32"))) return __LINE__; |
if (!(CAMAC_DGG_Ptr = (void*) GetProcAddress(DLLHandle,"CAMAC_DGG"))) return __LINE__; |
if (!(CAMAC_register_read_Ptr = (void*) GetProcAddress(DLLHandle,"CAMAC_register_read"))) return __LINE__; |
if (!(CAMAC_register_write_Ptr = (void*) GetProcAddress(DLLHandle,"CAMAC_register_write"))) return __LINE__; |
if (!(CAMAC_LED_settings_Ptr = (void*) GetProcAddress(DLLHandle,"CAMAC_LED_settings"))) return __LINE__; |
if (!(CAMAC_Output_settings_Ptr = (void*) GetProcAddress(DLLHandle,"CAMAC_Output_settings"))) return __LINE__; |
if (!(CAMAC_read_LAM_mask_Ptr = (void*) GetProcAddress(DLLHandle,"CAMAC_read_LAM_mask"))) return __LINE__; |
if (!(CAMAC_write_LAM_mask_Ptr = (void*) GetProcAddress(DLLHandle,"CAMAC_write_LAM_mask"))) return __LINE__; |
if (!(CAMAC_write_Ptr = (void*) GetProcAddress(DLLHandle,"CAMAC_write"))) return __LINE__; |
if (!(CAMAC_read_Ptr = (void*) GetProcAddress(DLLHandle,"CAMAC_read"))) return __LINE__; |
if (!(CAMAC_Z_Ptr = (void*) GetProcAddress(DLLHandle,"CAMAC_Z"))) return __LINE__; |
if (!(CAMAC_C_Ptr = (void*) GetProcAddress(DLLHandle,"CAMAC_C"))) return __LINE__; |
if (!(CAMAC_I_Ptr = (void*) GetProcAddress(DLLHandle,"CAMAC_I"))) return __LINE__; |
return 0; |
} |
void WUSBXX_open (char *serial) |
{ |
if (serial != NULL) |
udev = xxusb_serial_open(serial); |
if (!udev) |
MessagePopup ("Error", "Cannot connect to USB. ! Check the connection!"); |
} |
void WUSBXX_close (void) |
{ |
if (udev) xxusb_device_close(udev); |
} |
int WUSBXX_CAMAC_write( usb_dev_handle *udev, int N, int A, int F, long Data, int *Q, int *X); |
int WUSBXX_CAMAC_read( usb_dev_handle *udev,int N, int A, int F, long *Data, int *Q, int *X); |
int WUSBXX_CAMAC_Z( usb_dev_handle *udev ); |
int WUSBXX_CAMAC_C( usb_dev_handle *udev ); |
int WUSBXX_CAMAC_I(usb_dev_handle *udev, int inhibit); |
int WUSBXX_CAMAC_write( usb_dev_handle *udev,int N, int A, int F, long Data, int *Q, int *X) |
{ |
long intbuf[4]; |
int ret; |
// CAMAC direct write function |
intbuf[0]=1; |
intbuf[1]=(long)(F+A*32+N*512 + 0x4000); |
if ((F > 15) && (F < 24)) // orig controla |
//if ((F > 15) && (F < 28)) // orig controla |
{ |
intbuf[0]=3; |
intbuf[2]=(Data & 0xffff); |
intbuf[3]=((Data >>16) & 255); |
ret = xxusb_stack_execute(udev, intbuf); |
*Q = (intbuf[0] & 1); |
*X = ((intbuf[0] >> 1) & 1); |
} else { |
printf("Error N%d A%d F%d",N,A,F); |
} |
return ret; |
} |
int WUSBXX_CAMAC_read( usb_dev_handle *udev,int N, int A, int F, long *Data, int *Q, int *X) |
{ |
long intbuf[4]; |
int ret; |
// CAMAC direct read function |
intbuf[0]=1; |
intbuf[1]=(long)(F+A*32+N*512 + 0x4000); |
// intbuf[1]=(long)(F+A*32+N*512); |
ret = xxusb_stack_execute(udev, intbuf); |
// printf ("ret = %d\n",ret); |
if (F < 16) // orig controla |
{ |
// *Data = intbuf[0]; //16-bit word |
*Data = intbuf[0] + (intbuf[1] & 0xFF) * 0x10000; //24-bit word |
*Q = ((intbuf[1] >> 8) & 1); |
*X = ((intbuf[1] >> 9) & 1); |
} |
// else { |
// printf("Error N%d A%d F%d",N,A,F); |
// } |
return ret; |
} |
int WUSBXX_CAMAC_Z(usb_dev_handle *udev) |
{ |
long intbuf[4]; |
int ret; |
// CAMAC Z = N(28) A(8) F(29) |
intbuf[0]=1; |
intbuf[1]=(long)(29+8*32+28*512 + 0x4000); |
ret = xxusb_stack_execute(udev, intbuf); |
return ret; |
} |
int WUSBXX_CAMAC_C(usb_dev_handle *udev) |
{ |
long intbuf[4]; |
int ret; |
// CAMAC C = N(28) A(9) F(29) |
intbuf[0]=1; |
intbuf[1]=(long)(29+9*32+28*512 + 0x4000); |
ret = xxusb_stack_execute( udev, intbuf); |
return ret; |
} |
int WUSBXX_CAMAC_I(usb_dev_handle *udev, int inhibit) |
{ |
long intbuf[4]; |
int ret; |
// Set Inhibit = N(29) A(9) F(24) |
// Clear Inhibit = N(29) A(9) F(26) |
intbuf[0]=1; |
if (inhibit) intbuf[1]=(long)(24+9*32+29*512 + 0x4000); |
else intbuf[1]=(long)(26+9*32+29*512 + 0x4000); |
ret = xxusb_stack_execute(udev, intbuf); |
return ret; |
} |
int init_CAMAC () { |
long dum; |
C_Z(udev); |
C_C(udev); |
C_I(udev,1); |
C_read ( udev,NTGG, 0 , 9, &dum, &Q,&X); /* init TGG */ |
C_write ( udev,NTGG, 0, 16, 1000, &Q,&X); /* Set preset counting value */ |
C_write ( udev,NTGG, 0 ,17, 0x2, &Q,&X); /* Set Load&Clock Modes */ |
C_write ( udev,NDIS, 0, 16, 0xffff, &Q,&X); /* enable all ch. */ |
C_read ( udev,NDIS, 0, 26, &dum, &Q, &X); |
C_I(udev, 0); |
return 0 ; |
} |
//******************************************************************** |
int plot_graph ( int p1h, int logsc, int data[16] ) { |
int max, max_I2 ; |
double plot_data[16], plot_max ; |
int ch ; |
max = 100 ; |
for ( ch=0 ; ch<16 ; ch ++ ) { |
if ( data[ch]>max ) max=data[ch] ; |
} |
DeleteGraphPlot (p1h, P1_HISTO, -1, VAL_IMMEDIATE_DRAW); |
max = ((max*1.2)/1000)*1000 ; |
GetCtrlVal (p1h, P1_I2, &max_I2 ) ; |
if ( max_I2>0 ) max=max_I2 ; |
if ( logsc ) { |
for ( ch=0 ; ch<16 ; ch ++ ) { |
plot_data[ch] = log10((double)data[ch]) ; |
plot_max = log10((double)max) ; |
} |
SetAxisScalingMode (p1h, P1_HISTO, VAL_LEFT_YAXIS, VAL_MANUAL, 0.0, plot_max); |
PlotY (p1h, P1_HISTO, plot_data, 16, VAL_DOUBLE, VAL_VERTICAL_BAR, |
VAL_NO_POINT, VAL_SOLID, 1, VAL_DK_BLUE); |
} else { |
SetAxisScalingMode (p1h, P1_HISTO, VAL_LEFT_YAXIS, VAL_MANUAL, 0.0, max); |
PlotY (p1h, P1_HISTO, data, 16, VAL_INTEGER, VAL_VERTICAL_BAR, |
VAL_NO_POINT, VAL_SOLID, 1, VAL_DK_BLUE); |
for ( ch=0; ch<16; ch++ ) { |
SetCtrlVal (p1h, nc[ch], data[ch] ) ; |
} |
} |
return 0 ; |
} |
//******************************************************************** |
//******************************************************************** |
int __stdcall WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, |
LPSTR lpszCmdLine, int nCmdShow) |
{ |
int rph, rID, p1h, p2h ; |
int data[16], sum, max, max_I2=0 ; |
long val, dum; |
double plot_data[16], splot_data[10][32], plot_max ; |
int thr_set, time_set; |
int ch, i, j,ii; |
FILE *fp ; |
char filename[256] ; |
int logscale ; |
int os[10]={-1,-1,-1,-1,-1,-1,-1,-1,-1,-1} ; |
logscale = 0 ; |
if (InitCVIRTE (hInstance, 0, 0) == 0) /* Needed if linking in external compiler; harmless otherwise */ |
return -1; /* out of memory */ |
for ( i=0; i<16; data[i++]=0 ) ; |
dum=WUSBXX_load (NULL); |
if (dum) MessagePopup ("Error", "Cannot load dll!"); |
WUSBXX_open ("CC0130"); |
//ii=80000000/i-40; |
//if (ii<72) ii=72; |
//CAMAC_DGG(udev,0,7,0,ii,40,0,0); |
//CAMAC_DGG(udev,1,1,1,12,8,0,0); |
init_CAMAC(); |
p1h = LoadPanel (0, "uklon_ui.uir", P1); |
// p2h = LoadPanel (0, "uklon_ui.uir", P2); |
DisplayPanel (p1h); |
// DisplayPanel (p2h); |
GetUserEvent (1, &rph, &rID); |
while ((rID!=P1_QUIT)||(rph!=p1h)) |
{ |
if ( rph == p1h ) { |
if ( rID==P1_START ) { |
GetCtrlVal (p1h, P1_THR, &thr_set ) ; /* read desired thr. */ |
C_write ( udev, NDIS, 0, 17, thr_set, &Q, &X); /* set the threshold */ |
C_write ( udev, NDIS, 1, 17, 0, &Q,&X); /* */ |
C_read ( udev, NSCA,0,9,&dum, &Q,&X); |
GetCtrlVal (p1h, P1_TIME, &time_set ) ; /* read time (ms) */ |
SetCtrlAttribute (p1h, P1_TIMER, ATTR_ENABLED, 0); |
C_write ( udev, NTGG, 0, 16, time_set, &Q,&X); |
C_read ( udev, NTGG, 0, 15, &dum, &Q,&X); |
SetCtrlVal (p1h, P1_LEDON,1); |
SetCtrlAttribute (p1h, P1_TIMER, ATTR_INTERVAL,time_set*0.001 ); |
SetCtrlAttribute (p1h, P1_TIMER, ATTR_ENABLED, 1); |
ResetTimer (p1h, P1_TIMER); |
Delay (0.1+(time_set/1000.)); |
} |
if ( rID==P1_COUNT ) { |
sum = 0 ; |
max = 100 ; |
C_I(udev, 1); |
for ( ch=0 ; ch<16 ; ch ++ ) { |
Delay(0.01); |
C_read ( udev, NSCA, ch, 0, &val, &Q,&X); |
C_read ( udev, NSCA, ch, 0, &val, &Q,&X); |
data[ch]=val; |
if (data[ch] > 0) data[ch]--; |
// if (data[ch] && 0x80000000) { |
// data[ch] &= 0x00FFFFFF; |
//} |
sum += data[ch] ; |
} |
C_I(udev, 0); |
SetCtrlVal (p1h, P1_I1, sum ) ; |
plot_graph ( p1h, logscale, data ) ; |
} |
if ( rID==P1_INIT ) { |
init_CAMAC ( ) ; |
} |
if ( rID==P1_SAVE ) { |
if ( ( fp = fopen ( "scaler.txt", "w+" ) ) == NULL ) printf ( "ERROR" ) ; |
for ( ch=0; ch<16 ; ch++ ) { |
fprintf ( fp, "%d\t%d\n", ch, data[ch] ) ; |
} |
fclose ( fp ) ; |
} |
if ( rID==P1_APPEND ) { |
GetCtrlVal (p1h, P1_APFILE, filename); |
if ( ( fp = fopen ( filename, "a" ) ) == NULL ) printf ( "ERROR" ) ; |
for ( ch=0; ch<16 ; ch++ ) { |
fprintf ( fp, "%d\t", data[ch] ) ; |
} |
fprintf ( fp, "\n" ) ; |
fclose ( fp ) ; |
} |
if ( rID==P1_REPLOT ) { |
plot_graph ( p1h, logscale, data ) ; |
} |
if ( rID == P1_PRINT ) { |
SetCtrlVal (p1h, P1_L1,1); |
PrintPanel (p1h, "", 1, VAL_VISIBLE_AREA, 1); |
SetCtrlVal (p1h, P1_L1,0); |
} |
if ( rID == P1_LOG_SCALE ) { |
GetCtrlVal (p1h, P1_LOG_SCALE, &logscale) ; |
plot_graph ( p1h, logscale, data ) ; |
} |
} |
if ( rph == p2h ) { |
switch ( rID ) { |
case P2_OFS1: GetCtrlVal (p2h, P2_OFS1, &os[0] ) ; i=0 ; break ; |
case P2_OFS2: GetCtrlVal (p2h, P2_OFS2, &os[1] ) ; i=1 ; break ; |
case P2_OFS3: GetCtrlVal (p2h, P2_OFS3, &os[2] ) ; i=2 ; break ; |
case P2_OFS4: GetCtrlVal (p2h, P2_OFS4, &os[3] ) ; i=3 ; break ; |
case P2_OFS5: GetCtrlVal (p2h, P2_OFS5, &os[4] ) ; i=4 ; break ; |
case P2_OFS6: GetCtrlVal (p2h, P2_OFS6, &os[5] ) ; i=5 ; break ; |
case P2_OFS7: GetCtrlVal (p2h, P2_OFS7, &os[6] ) ; i=6 ; break ; |
case P2_OFS8: GetCtrlVal (p2h, P2_OFS8, &os[7] ) ; i=7 ; break ; |
case P2_OFS9: GetCtrlVal (p2h, P2_OFS9, &os[8] ) ; i=8 ; break ; |
case P2_OFS10: GetCtrlVal (p2h, P2_OFS10, &os[9] ) ; i=9 ; break ; |
} |
} |
GetUserEvent (1, &rph, &rID); |
} |
WUSBXX_close (); |
//lc8901a_close (hdev); |
return 0; |
} |
int CVICALLBACK TimerCB (int panel, int control, int event, |
void *callbackData, int eventData1, int eventData2) |
{ |
switch (event) |
{ |
case EVENT_TIMER_TICK: |
SetCtrlVal (panel, P1_LEDON,0); |
SetCtrlAttribute (panel, P1_TIMER, ATTR_ENABLED, 0); |
break; |
} |
return 0; |
} |
/ICFA/uklon/libxxusb.dll |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/ICFA/uklon/uklon_ui.h |
---|
0,0 → 1,79 |
/**************************************************************************/ |
/* LabWindows/CVI User Interface Resource (UIR) Include File */ |
/* Copyright (c) National Instruments 2014. All Rights Reserved. */ |
/* */ |
/* WARNING: Do not add to, delete from, or otherwise modify the contents */ |
/* of this include file. */ |
/**************************************************************************/ |
#include <userint.h> |
#ifdef __cplusplus |
extern "C" { |
#endif |
/* Panels and Controls: */ |
#define P1 1 |
#define P1_SAVE 2 |
#define P1_TIME 3 |
#define P1_THR 4 |
#define P1_I2 5 |
#define P1_NC9 6 |
#define P1_NC15 7 |
#define P1_NC14 8 |
#define P1_NC13 9 |
#define P1_NC12 10 |
#define P1_NC11 11 |
#define P1_NC10 12 |
#define P1_NC8 13 |
#define P1_NC7 14 |
#define P1_NC6 15 |
#define P1_NC1 16 |
#define P1_NC2 17 |
#define P1_NC3 18 |
#define P1_NC4 19 |
#define P1_NC5 20 |
#define P1_NC0 21 |
#define P1_I1 22 |
#define P1_HISTO 23 |
#define P1_L1 24 |
#define P1_LEDON 25 |
#define P1_APFILE 26 |
#define P1_LOG_SCALE 27 |
#define P1_QUIT 28 |
#define P1_PRINT 29 |
#define P1_APPEND 30 |
#define P1_REPLOT 31 |
#define P1_COUNT 32 |
#define P1_START 33 |
#define P1_INIT 34 |
#define P1_TIMER 35 /* callback function: TimerCB */ |
#define P2 2 |
#define P2_SUMMARY 2 |
#define P2_OFS10 3 |
#define P2_OFS9 4 |
#define P2_OFS8 5 |
#define P2_OFS7 6 |
#define P2_OFS6 7 |
#define P2_OFS5 8 |
#define P2_OFS4 9 |
#define P2_OFS3 10 |
#define P2_OFS2 11 |
#define P2_OFS1 12 |
/* Menu Bars, Menus, and Menu Items: */ |
/* (no menu bars in the resource file) */ |
/* Callback Prototypes: */ |
int CVICALLBACK TimerCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); |
#ifdef __cplusplus |
} |
#endif |
/ICFA/uklon/xxusbdll.h |
---|
0,0 → 1,112 |
#ifndef _XXUSB_DLL_H |
#define _XXUSB_DLL_H |
typedef unsigned short ADDRESS_MODIFIER; |
#define Std_Sup_Data (ADDRESS_MODIFIER)0x3d |
#define Std_Sup_Prog (ADDRESS_MODIFIER)0x3e |
#define Std_NoPriv_Data (ADDRESS_MODIFIER)0x39 |
#define Std_NoPriv_Prog (ADDRESS_MODIFIER)0x3a |
#define Short_Sup (ADDRESS_MODIFIER)0x2d |
#define Short_NoPriv (ADDRESS_MODIFIER)0x29 |
#define Ext_Sup_Data (ADDRESS_MODIFIER)0x0d |
#define Ext_Sup_Prog (ADDRESS_MODIFIER)0x0e |
#define Ext_NoPriv_Data (ADDRESS_MODIFIER)0x09 |
#define Ext_NoPriv_Prog (ADDRESS_MODIFIER)0x0a |
struct xxusb_device_typ |
{ |
struct usb_device *usbdev; |
char SerialString[7]; |
}; |
typedef struct xxusb_device_typ xxusb_device_type; |
#define xxusb_register_read (*xxusb_register_read_Ptr) |
#define xxusb_stack_read (*xxusb_stack_read_Ptr) |
#define xxusb_stack_write (*xxusb_stack_write_Ptr) |
#define xxusb_stack_execute (*xxusb_stack_execute_Ptr) |
#define xxusb_register_write (*xxusb_register_write_Ptr) |
#define xxusb_usbfifo_read (*xxusb_usbfifo_read_Ptr) |
#define xxusb_bulk_read (*xxusb_bulk_read_Ptr) |
#define xxusb_bulk_write (*xxusb_bulk_write_Ptr) |
#define xxusb_reset_toggle (*xxusb_reset_toggle_Ptr) |
#define xxusb_devices_find (*xxusb_devices_find_Ptr) |
#define xxusb_device_close (*xxusb_device_close_Ptr) |
#define xxusb_device_open (*xxusb_device_open_Ptr) |
#define xxusb_flash_program (*xxusb_flash_program_Ptr) |
#define xxusb_flashblock_program (*xxusb_flashblock_program_Ptr) |
#define xxusb_serial_open (*xxusb_serial_open_Ptr) |
#define VME_register_write (*VME_register_write_Ptr) |
#define VME_register_read (*VME_register_read_Ptr) |
#define VME_LED_settings (*VME_LED_settings_Ptr) |
#define VME_DGG (*VME_DGG_Ptr) |
#define VME_Output_settings (*VME_Output_settings_Ptr) |
#define VME_read_16 (*VME_read_16_Ptr) |
#define VME_read_32 (*VME_read_32_Ptr) |
#define VME_BLT_read_32 (*VME_BLT_read_32_Ptr) |
#define VME_write_16 (*VME_write_16_Ptr) |
#define VME_write_32 (*VME_write_32_Ptr) |
#define CAMAC_DGG (*CAMAC_DGG_Ptr) |
#define CAMAC_register_read (*CAMAC_register_read_Ptr) |
#define CAMAC_register_write (*CAMAC_register_write_Ptr) |
#define CAMAC_LED_settings (*CAMAC_LED_settings_Ptr) |
#define CAMAC_Output_settings (*CAMAC_Output_settings_Ptr) |
#define CAMAC_read_LAM_mask (*CAMAC_read_LAM_mask_Ptr) |
#define CAMAC_write_LAM_mask (*CAMAC_write_LAM_mask_Ptr) |
#define CAMAC_write (*CAMAC_write_Ptr) |
#define CAMAC_read (*CAMAC_read_Ptr) |
#define CAMAC_Z (*CAMAC_Z_Ptr) |
#define CAMAC_C (*CAMAC_C_Ptr) |
#define CAMAC_I (*CAMAC_I_Ptr) |
short __stdcall xxusb_register_read(usb_dev_handle *hDev, short RegAddr, long *RegData); |
short __stdcall xxusb_stack_read(usb_dev_handle *hDev, short StackAddr, long *StackData); |
short __stdcall xxusb_stack_write(usb_dev_handle *hDev, short StackAddr, long *StackData); |
short __stdcall xxusb_stack_execute(usb_dev_handle *hDev, long *StackData); |
short __stdcall xxusb_register_write(usb_dev_handle *hDev, short RegAddr, long RegData); |
short __stdcall xxusb_usbfifo_read(usb_dev_handle *hDev, long *DataBuffer, short lDataLen, int timeout); |
short __stdcall xxusb_bulk_read(usb_dev_handle *hDev, char *DataBuffer, short lDataLen, int timeout); |
short __stdcall xxusb_bulk_write(usb_dev_handle *hDev, char *DataBuffer, short lDataLen, int timeout); |
short __stdcall xxusb_reset_toggle(usb_dev_handle *hDev); |
short __stdcall xxusb_devices_find(xxusb_device_type *xxusbDev); |
short __stdcall xxusb_device_close(usb_dev_handle *hDev); |
usb_dev_handle* __stdcall xxusb_device_open(struct usb_device *dev); |
short __stdcall xxusb_flash_program(usb_dev_handle *hDev, char *config, short nsect); |
short __stdcall xxusb_flashblock_program(usb_dev_handle *hDev, UCHAR *config); |
usb_dev_handle* __stdcall xxusb_serial_open(char *SerialString); |
short __stdcall VME_register_write(usb_dev_handle *hdev, long VME_Address, long Data); |
short __stdcall VME_register_read(usb_dev_handle *hdev, long VME_Address, long *Data); |
short __stdcall VME_LED_settings(usb_dev_handle *hdev, int LED, int code, int invert, int latch); |
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); |
short __stdcall VME_Output_settings(usb_dev_handle *hdev, int Channel, int code, int invert, int latch); |
short __stdcall VME_read_16(usb_dev_handle *hdev,short Address_Modifier, long VME_Address, long *Data); |
short __stdcall VME_read_32(usb_dev_handle *hdev, short Address_Modifier, long VME_Address, long *Data); |
short __stdcall VME_BLT_read_32(usb_dev_handle *hdev, short Address_Modifier, int count, long VME_Address, long Data[]); |
short __stdcall VME_write_16(usb_dev_handle *hdev, short Address_Modifier, long VME_Address, long Data); |
short __stdcall VME_write_32(usb_dev_handle *hdev, short Address_Modifier, long VME_Address, long Data); |
short __stdcall CAMAC_DGG(usb_dev_handle *hdev, short channel, short trigger, short output, int delay, int gate, short invert, short latch); |
short __stdcall CAMAC_register_read(usb_dev_handle *hdev, int A, long *Data); |
short __stdcall CAMAC_register_write(usb_dev_handle *hdev, int A, long Data); |
short __stdcall CAMAC_LED_settings(usb_dev_handle *hdev, int LED, int code, int invert, int latch); |
short __stdcall CAMAC_Output_settings(usb_dev_handle *hdev, int Channel, int code, int invert, int latch); |
short __stdcall CAMAC_read_LAM_mask(usb_dev_handle *hdev, long *Data); |
short __stdcall CAMAC_write_LAM_mask(usb_dev_handle *hdev, long Data); |
short __stdcall CAMAC_write(usb_dev_handle *hdev, int N, int A, int F, long Data, int *Q, int *X); |
short __stdcall CAMAC_read(usb_dev_handle *hdev, int N, int A, int F, long *Data, int *Q, int *X); |
short __stdcall CAMAC_Z(usb_dev_handle *hdev); |
short __stdcall CAMAC_C(usb_dev_handle *hdev); |
short __stdcall CAMAC_I(usb_dev_handle *hdev, int inhibit); |
#endif |