usb_diag_lib.h

来自「VC下USB的驱动代码,及其相关操作检测。」· C头文件 代码 · 共 60 行

H
60
字号
//////////////////////////////////////////////////////////////////////
// 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

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?