📄 isofunc.h
字号:
/*----------------------------------------------------------------------------
* Copyright (c) 2001 by National Semiconductor Corporation
* National Semiconductor Corporation
* 2900 Semiconductor Drive
* Santa Clara, California 95051
*
* All rights reserved
*
*<<<-------------------------------------------------------------------------
* File Contents:
* IsoFunc.h
*
* Project: USB Demo Application
* Author : Yan Nosovitsky
* Date : Dec 2001
*----------------------------------------------------------------------->>>*/
// IsoFunc.h: interface for the IsoFunc class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_ISOFUNC_H__A677DDD3_055F_11D4_915B_0060972A7504__INCLUDED_)
#define AFX_ISOFUNC_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 IsoFunc
{
public:
IsoFunc(CDialog *curIsoTab );
~IsoFunc();
bool ProcessOneDirTest(int pipeNum,int dataSize, BYTE data, BOOL useDMA);
bool ProcessLoopTestFile(CString fileName, int pipeNumToDMA);
bool ProcessLoopTestData(int dataSize, int pipeNumToDMA);
CString GetDetails();
void StopLastProcess();
int CheckPipes();
CString getPipeInfo(int num);
private:
static UINT ReadIsoThread(LPVOID);
static UINT WriteIsoThread(LPVOID);
static UINT ProcessIsoThread(LPVOID);
IsochCommand command;
int dataSize;
int restToRead;
int readTime;
int writeTime;
int restToWrite;
int numOfErrors;
int wasTransferred;
BYTE hexByte;
CDialog *isoTab;
CStdioFile dataFile;
BOOL readThreadRun;
BOOL writeThreadRun;
BOOL testRun;
CWinThread* processThread;
CWinThread* readThread;
CWinThread* writeThread;
BYTE *writeBuff;
BYTE *readBuff;
int numOfPipe;
int readPipe;
int writePipe;
WD_USB_PIPE_INFO Pipe[WD_USB_MAX_PIPE_NUMBER];
};
#endif // !defined(AFX_ISOFUNC_H__A677DDD3_055F_11D4_915B_0060972A7504__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -