usb_diag_lib.h

来自「采用windriver提供的API开发的D12应用程序源码」· C头文件 代码 · 共 71 行

H
71
字号
//////////////////////////////////////////////////////////////////////
// File - USB_DIAG_LIB.H
//
// Library for USB diagnostics and samples, using WinDriver functions.
// 
// Copyright (c) 2003 - 2006 Jungo Ltd.  http://www.jungo.com
// 
//////////////////////////////////////////////////////////////////////

#ifndef _USB_DIAG_LIB_H_
#define _USB_DIAG_LIB_H_

#ifdef __cplusplus
extern "C" {
#endif

#include "windrvr.h"
#include "diag_lib.h"

enum {MAX_BUFFER_SIZE = 4096};
//
extern DWORD dwSize;
extern DWORD dwPipeNum;
extern DWORD cmd;

typedef struct  
{
    HANDLE hDevice;
    WDU_PIPE_INFO *pPipe;
    PVOID pContext;
    BOOL fStopped;
    HANDLE hThread;
    DWORD dwError;
} USB_LISTEN_PIPE;
extern USB_LISTEN_PIPE listenPipe;
void CloseListening(USB_LISTEN_PIPE *pListenPipe);
//my adder

// 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: PrintPipe0Info()
// Prints the pipes information for the specified alternate setting
void PrintPipe0Info(WDU_DEVICE *pDevice);

// 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 ReadPipes(HANDLE hDevice);
void ReadPipesadder(HANDLE hDevice);
// The following are defined for backwards compatibility with v6.2x and below
#define PrintHexBuffer(pBuffer, dwBytes) \
    DIAG_PrintHexBuffer(pBuffer, dwBytes, TRUE)
#define GetHexBuffer(pBuffer, dwBytes) \
    DIAG_GetHexBuffer(pBuffer, dwBytes)
        
#ifdef __cplusplus
}
#endif

#endif

⌨️ 快捷键说明

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