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

📄 usbdobj.hpp

📁 cayman提供的PXA270 wince下的bsp源码包
💻 HPP
字号:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
/*++
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.

Module Name:  

usbdobj.hpp

Abstract:  

Notes: 

--*/
#ifndef __USBDOBJ_HPP__
#define __USBDOBJ_HPP__

struct SNotifyList
{
    LPDEVICE_NOTIFY_ROUTINE lpNotifyRoutine;
    LPVOID                  lpvNotifyParameter;

    SNotifyList *           pNext;
};

struct SWait
{
    HANDLE              hEvent;

};

struct SDriverLibs
{
    HINSTANCE           hDriver;

    SDriverLibs *       pNext;
};

struct SDevice;
struct SHcd
{
    LPVOID              pvHcd;

    LPCHCD_FUNCS        pHcdFuncs;

    SDevice *           pFrameControlOwner;
    CRITICAL_SECTION    csFrameLengthControl;
};

struct SPipe;
struct SDevice
{
    DWORD               dwSig;        // For Structure validation
#define VALID_DEVICE_SIG  0x76654453  // "SDev"
    SHcd *              pHcd;

    CRITICAL_SECTION    csPipeLock;
    SPipe *             apPipes[gcMaxPipes];

    SPipe *             pFreePipeList;

    UINT                iDevice;
    LPCUSB_DEVICE       pDeviceInfo;

    CRITICAL_SECTION    csSerializeNotifyRoutine;
    SNotifyList *       pNotifyList;

    CRITICAL_SECTION    csLibList;
    SDriverLibs *       pDriverLibs;
};

struct STransfer;
struct SPipe
{
    DWORD               dwSig;         // For structure validation
#define VALID_PIPE_SIG   0x70695053    // "SPip"
#define FREE_PIPE_SIG    0xDEADDEAD    // Set to this when on free list
#define CLOSING_PIPE_SIG 0xAAAABBBB    // Set to this when pipe is being closed
    SPipe *             pNext;         // For linkage on free lists
    UINT                iRefCnt;
    SDevice *           pDevice;
    WORD                wMaxPktSize;  // cached from the EP descriptor

    STransfer *         pFreeTransferList;

    CRITICAL_SECTION    csTransferLock;
    UINT                cAllocatedTransfers;
    STransfer * *       apTransfers;

    UINT                iEndpointIndex;
};

struct STransfer
{
    DWORD               dwSig;         // For structure validation
#define VALID_TRANSFER_SIG  0x6E725453 // "STrn"
#define FREE_TRANSFER_SIG   0xDEADDEAD // Set to this when on free list
    STransfer *         pNext;         // For linkage on free lists
    UINT                iRefCnt;
    SPipe *             pPipe;
    UINT                iTransfer;
    LPVOID              pvBuffer;

    SWait *             pWait;         // Used to synchronize aborts
    CRITICAL_SECTION    csWaitObject;

    DWORD               cFrames;
    LPDWORD             adwIsochErrors;
    LPDWORD             adwIsochLengths;
    BOOL                fComplete;
    DWORD               dwBytesTransfered;
    DWORD               dwError;
};

#endif

⌨️ 快捷键说明

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