Source file: /~heha/basteln/PC/oszi/adc2usb/adc2usb.zip/ADC2USB.H

//main.h

#define MAX_DRIVER_NAME 64
//#define DEVICE_DESCRIPTOR_SIZE 32 /* bigger than we need */
#define MAX_ITEMS_IN_LB 1024
//#define MAX_BUFFER_SIZE 512

// Clear out the first entry in the output box if the box has too many entries
#define MAINTAIN_OUTPUT_BOX(hO) \
 while (ListBox_GetCount(hO)>=MAX_ITEMS_IN_LB) ListBox_DeleteString(hO,0)

/*
#define GET_CONFIG_DESCRIPTOR_LENGTH(pv) \
    ((pUsb_Configuration_Descriptor)pv)->wTotalLength

typedef struct{
 UCHAR bLength;
 UCHAR bDescriptorType;
 USHORT bcdUSB;
 UCHAR bDeviceClass;
 UCHAR bDeviceSubClass;
 UCHAR bDeviceProtocol;
 UCHAR bMaxPacketSize0;
 USHORT idVendor;
 USHORT idProduct;
 USHORT bcdDevice;
 UCHAR iManufacturer;
 UCHAR iProduct;
 UCHAR iSerialNumber;
 UCHAR bNumConfigurations;
}Usb_Device_Descriptor, *pUsb_Device_Descriptor;

typedef struct{
 UCHAR bLength;
 UCHAR bDescriptorType;
 USHORT wTotalLength;
 UCHAR bNumInterfaces;
 UCHAR bConfigurationValue;
 UCHAR iConfiguration;
 UCHAR bmAttributes;
 UCHAR MaxPower;
}Usb_Configuration_Descriptor, *pUsb_Configuration_Descriptor;

typedef struct{
 UCHAR bLength;
 UCHAR bDescriptorType;
 UCHAR bInterfaceNumber;
 UCHAR bAlternateSetting;
 UCHAR bNumEndpoints;
 UCHAR bInterfaceClass;
 UCHAR bInterfaceSubClass;
 UCHAR bInterfaceProtocol;
 UCHAR iInterface;
}Usb_Interface_Descriptor, *pUsb_Interface_Descriptor;

typedef struct{
 UCHAR bLength;
 UCHAR bDescriptorType;
 UCHAR bEndpointAddress;
 UCHAR bmAttributes;
 USHORT wMaxPacketSize;
 UCHAR bInterval;
}Usb_Endpoint_Descriptor, *pUsb_Endpoint_Descriptor;

//
// Stuff copied fro USBDI.H
//

typedef PVOID USBD_PIPE_HANDLE;
typedef PVOID USBD_CONFIGURATION_HANDLE;
typedef PVOID USBD_INTERFACE_HANDLE;

typedef enum{
 UsbdPipeTypeControl,
 UsbdPipeTypeIsochronous,
 UsbdPipeTypeBulk,
 UsbdPipeTypeInterrupt
}USBD_PIPE_TYPE;

char PIPE_TYPE_STRINGS[4][4]={"CTL","ISO","BLK","INT"};
char PIPE_DIRECTION[2][4]={"OUT","IN"};

typedef struct{
// OUTPUT
// These fields are filled in by USBD
 USHORT MaximumPacketSize;	// Maximum packet size for this pipe
 UCHAR EndpointAddress;		// 8 bit USB endpoint address (includes direction)
				// taken from endpoint descriptor
 UCHAR Interval;		// Polling interval in ms if interrupt pipe 
 USBD_PIPE_TYPE PipeType;	// PipeType identifies type of transfer valid for this pipe
 USBD_PIPE_HANDLE PipeHandle;
// INPUT
// These fields are filled in by the client driver
 ULONG MaximumTransferSize;	// Maximum size for a single request in bytes.
 ULONG PipeFlags;                                   
}USBD_PIPE_INFORMATION, *PUSBD_PIPE_INFORMATION;


typedef struct _USBD_INTERFACE_INFORMATION {
 USHORT Length;	// Length of this structure, including all pipe information
// INPUT	// structures that follow.
// Interface number and Alternate setting this structure is associated with
 UCHAR InterfaceNumber;
 UCHAR AlternateSetting;
// OUTPUT
// These fields are filled in by USBD
 UCHAR Class;
 UCHAR SubClass;
 UCHAR Protocol;
 UCHAR Reserved;
 USBD_INTERFACE_HANDLE InterfaceHandle;
 ULONG NumberOfPipes; 
// INPUT/OUPUT
// see PIPE_INFORMATION
 USBD_PIPE_INFORMATION Pipes[0];
}USBD_INTERFACE_INFORMATION, *PUSBD_INTERFACE_INFORMATION;

*/
typedef LONG USBD_STATUS;

typedef struct{
 ULONG Offset;	// INPUT Offset of the packet from the beginning of the buffer.
 ULONG Length;	// OUTPUT length of data received (for in) 0 for OUT.
 USBD_STATUS Status;	// status code for this packet
}USBD_ISO_PACKET_DESCRIPTOR, *PUSBD_ISO_PACKET_DESCRIPTOR;
Detected encoding: ASCII (7 bit)2