www.pudn.com > Usb_Project.rar > usb_diag_lib.h


////////////////////////////////////////////////////////////////////// 
// File - USB_DIAG_LIB.H 
// 
// Library for USB diagnostics and samples, using WinDriver functions. 
//  
// Copyright (c) 2003 - 2004 Jungo Ltd.  http://www.jungo.com 
//  
////////////////////////////////////////////////////////////////////// 
 
#ifndef _USB_DIAG_LIB_H_ 
#define _USB_DIAG_LIB_H_ 
 
#ifdef __cplusplus 
extern "C" { 
#endif 
 
enum {MAX_BUFFER_SIZE = 4096}; 
 
// Function: PrintHexBuffer() 
//   Print a buffer in HEX format 
void PrintHexBuffer(PVOID pBuffer, DWORD dwBytes); 
 
// Function: GetHexBuffer() 
//   Get hex buffer from user 
DWORD GetHexBuffer(PVOID pBuffer, DWORD dwBytes); 
 
// Function: pipeType2Str() 
//   Returns a string identifying the pipe type 
char *pipeType2Str(ULONG pipeType); 
 
// Function: PrintPipesInfo() 
//   Prints the pipes information for the specified alternate setting 
void PrintPipesInfo(WDU_ALTERNATE_SETTING *pAltSet); 
 
// Function: PrintDeviceConfigurations() 
//   Prints the device's configurations information 
void PrintDeviceConfigurations(HANDLE hDevice); 
 
// Function: ReadWritePipesMenu() 
//   Displays menu to read/write from the device's pipes 
void ReadWritePipesMenu(HANDLE hDevice); 
 
void SetDeviceHandler(HANDLE hDevice); 
 
HANDLE GetDeviceHandler(void); 
 
int USB_Diag_LibInit(const char * flog, HANDLE hDevice); 
int USB_Diag_LibUninit(void); 
 
typedef int (* RF_USB_RTS_FUNC)(void); 
 
RF_USB_RTS_FUNC RF_USB_RTS; 
 
 
#ifdef __cplusplus 
} 
#endif 
 
#endif