⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usb_diag_lib.h

📁 采用windriver提供的API开发的D12应用程序源码
💻 H
字号:
//////////////////////////////////////////////////////////////////////
// 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -