bulkfunc.h
来自「嵌入式系统设计与开发实例详解--基于ARM的应用(采用ARM7TDMI内核的、三」· C头文件 代码 · 共 85 行
H
85 行
/*----------------------------------------------------------------------------
* Copyright (c) 2001 by National Semiconductor Corporation
* National Semiconductor Corporation
* 2900 Semiconductor Drive
* Santa Clara, California 95051
*
* All rights reserved
*
*<<<-------------------------------------------------------------------------
* File Contents:
* BulkFunc.h
*
* Project: USB Demo Application
* Author : Yan Nosovitsky
* Date : Dec 2001
*----------------------------------------------------------------------->>>*/
// BulkFunc.h: interface for the BulkFunc class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_BULKFUNC_H__A677DDD3_055F_11D4_915B_0060972A7504__INCLUDED_)
#define AFX_BULKFUNC_H__A677DDD3_055F_11D4_915B_0060972A7504__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "USBDriver.h"
#include "CommonDefines.h"
#include "command_api.h"
#define SIZE_LIM_DEL_TEST 2*1024
#define SIZE_LIM_ONE_DIR_TEST (20*1024*1024)
#define DATA_CHUNK_SIZE (SIZE_LIM_ONE_DIR_TEST/80)
class BulkFunc
{
public:
BulkFunc(CDialog *curIsoTab );
~BulkFunc();
bool ProcessOneDirTest(int pipeNum,int dataSize, BYTE data, BOOL useDMA);
bool ProcessLoopTestFile(LoopbackTest loopbackTestType,CString fileName, int pipeNumToDMA);
bool ProcessLoopTestData(int dataSize, LoopbackTest loopbackTestType, int pipeNumToDMA);
CString GetDetails();
void StopLastProcess();
int CheckPipes();
CString getPipeInfo(int num);
private:
static UINT ReadBulkThread(LPVOID);
static UINT WriteBulkThread(LPVOID);
static UINT ProcessBulkThread(LPVOID);
BulkCommand command;
int dataSize;
int restToRead;
int readTime;
int writeTime;
int restToWrite;
int numOfErrors;
int wasTransferred;
BYTE hexByte;
CDialog *bulkTab;
CStdioFile dataFile;
BOOL readThreadRun;
BOOL writeThreadRun;
BOOL testRun;
CWinThread* processThread;
CWinThread* readThread;
CWinThread* writeThread;
BYTE *writeBuff;
BYTE *readBuff;
int numOfPipes;
int readPipe;
int writePipe;
WD_USB_PIPE_INFO Pipe[WD_USB_MAX_PIPE_NUMBER];
};
#endif // !defined(AFX_USERINTERFACE_H__A677DDD3_055F_11D4_915B_0060972A7504__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?