📄 pwusbflash.h
字号:
//---------------------------------------------------------------------------
// Pixelworks Inc. Company Confidential Strictly Private
//
// $Archive: $
// $Revision: 1.1.1.1 $
// $Author: KevinM $
// $Date: 2003/09/29 18:19:04 $
//
// --------------------------------------------------------------------------
// >>>>>>>>>>>>>>>>>>>>>>>>> COPYRIGHT NOTICE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// --------------------------------------------------------------------------
// Copyright 1997-2003 (c) Pixelworks Inc.
//
// Pixelworks owns the sole copyright to this software. Under international
// copyright laws you (1) may not make a copy of this software except for
// the purposes of maintaining a single archive copy, (2) may not derive
// works herefrom, (3) may not distribute this work to others. These rights
// are provided for information clarification, other restrictions of rights
// may apply as well.
//
// This is an unpublished work.
// --------------------------------------------------------------------------
// >>>>>>>>>>>>>>>>>>>>>>>>>>>> WARRANTEE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// --------------------------------------------------------------------------
// Pixelworks Inc. MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THE USE OF
// THIS SOFTWARE, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
// PURPOSE.
// --------------------------------------------------------------------------
//
// PWUsb.h: interface for the CPWUsb class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_PWUSB_H__D1AD0C63_987D_11D4_A299_005004D11692__INCLUDED_)
#define AFX_PWUSB_H__D1AD0C63_987D_11D4_A299_005004D11692__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "UsbIo.h"
#include "UsbIoPipe.h"
#include "UsbReader.h"
#include "UsbWriter.h"
// GUID for Pixelworks USB driver
// {FD229B22-9856-11d4-A299-005004D11692}
//DEFINE_GUID(PWUSB_IID, 0xfd229b22, 0x9856, 0x11d4, 0xa2, 0x99, 0x0, 0x50, 0x4, 0xd1, 0x16, 0x92);
#define PWUSB_IID_STR "{FD229B22-9856-11d4-A299-005004D11692}"
#define PWUSB_IID_STR_W L"{FD229B22-9856-11d4-A299-005004D11692}"
#define PWUSB_IID {0xfd229b22, 0x9856, 0x11d4, {0xa2, 0x99, 0x0, 0x50, 0x4, 0xd1, 0x16, 0x92}}
extern const GUID g_GUID;
extern HDEVINFO g_DevList;
#define MAX_USB_BUFFER_SIZE 512
class CPWUsb
{
public:
CPWUsb();
virtual ~CPWUsb();
BOOL Initialize(int nTimeoutSec = 0);
bool SendData(LPBYTE pByte, int nCount = 1);
BOOL WaitRead( LPBYTE pByte, int nCount )
{ return (Read(pByte, nCount)!=0); };
int Read(LPBYTE szBuff, int nCount, BYTE cMarker = 0x00);
int GetDataSize();
bool SetupInPipe();
bool SetupOutPipe();
protected:
CUsbWriter m_Writer;
CUsbReader m_InPipe;
bool m_bWriterRunning;
bool m_bReaderRunning;
bool DoSetConfiguration();
int m_nDeviceNumber;
int m_nEndpoint;
int m_nInterface;
int m_nConfiguration;
};
#endif // !defined(AFX_PWUSB_H__D1AD0C63_987D_11D4_A299_005004D11692__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -