?? usbclient.h
字號:
//
// 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:
usbclient.c
Abstract:
Common USB Client Driver Interface
--*/
#ifndef _USBCLIENT_
#define _USBCLIENT_
#include <windows.h>
#include <usbdi.h>
#include "warning.h"
#define USB_ERROR DWORD
#define PUSB_ERROR LPDWORD
#define ONE_FRAME_PERIOD 1L // msec
// steal a debug zone for the client
#define ZONE_USBCLIENT DEBUGZONE(15)
#ifdef __cplusplus
extern "C" {
#endif
BOOL
AbortTransfer(
LPCUSB_FUNCS pUsbFuncs,
USB_TRANSFER hTransfer,
DWORD dwFlags
);
BOOL
CloseTransferHandle(
LPCUSB_FUNCS UsbFuncs,
USB_TRANSFER hTransfer
);
DWORD
ClearOrSetFeature(
LPCUSB_FUNCS UsbFuncs,
HANDLE hUsbDevice,
LPTRANSFER_NOTIFY_ROUTINE NotifyRoutine,
PVOID NotifyContext,
DWORD dwFlags,
WORD wFeature,
UCHAR bIndex,
DWORD dwTimeout,
BOOL bSet
);
DWORD
DefaultTransferComplete(
PVOID Context
);
DWORD
GetStatus(
LPCUSB_FUNCS pUsbFuncs,
HANDLE hUsbDevice,
LPTRANSFER_NOTIFY_ROUTINE NotifyRoutine,
PVOID NotifyContext,
DWORD dwFlags,
UCHAR bIndex,
LPWORD lpwStatus,
DWORD dwTimeout
);
BOOL
GetTransferStatus(
LPCUSB_FUNCS UsbFuncs,
USB_TRANSFER hTransfer,
LPDWORD pBytesTransferred,
PUSB_ERROR pUsbError
);
DWORD
IssueBulkTransfer(
LPCUSB_FUNCS UsbFuncs,
USB_PIPE hPipe,
LPTRANSFER_NOTIFY_ROUTINE NotifyRoutine,
PVOID NotifyContext,
DWORD Flags,
LPVOID pBuffer,
ULONG PhysAddr,
DWORD BufferLength,
LPDWORD pBytesTransferred,
DWORD dwTimeout,
PUSB_ERROR pUsbRc
);
DWORD
IssueInterruptTransfer(
LPCUSB_FUNCS UsbFuncs,
USB_PIPE hPipe,
LPTRANSFER_NOTIFY_ROUTINE NotifyRoutine,
PVOID NotifyContext,
DWORD Flags,
LPVOID pBuffer,
ULONG PhysAddr,
DWORD BufferLength,
LPDWORD pBytesTransferred,
DWORD dwTimeout,
PUSB_ERROR pUsbRc
);
DWORD
IssueVendorTransfer(
LPCUSB_FUNCS UsbFuncs,
HANDLE hUsbDevice,
LPTRANSFER_NOTIFY_ROUTINE NotifyRoutine,
PVOID NotifyContext,
DWORD Flags,
PUSB_DEVICE_REQUEST pControlHeader,
LPVOID pBuf,
ULONG PhysAddr,
LPDWORD pBytesTransferred,
DWORD dwTimeout,
PUSB_ERROR pUsbRc
);
DWORD
ResetDefaultEndpoint(
LPCUSB_FUNCS UsbFuncs,
HANDLE hUsbDevice
);
DWORD
ResetBulkEndpoint(
LPCUSB_FUNCS pUsbFuncs,
HANDLE hUsbDevice,
USB_PIPE hPipe,
LPTRANSFER_NOTIFY_ROUTINE NotifyRoutine,
PVOID NotifyContext,
UCHAR bIndex,
DWORD dwTimeout
);
BOOL
ResetPipe(
LPCUSB_FUNCS pUsbFuncs,
USB_PIPE hPipe,
DWORD dwFlags
);
#ifdef __cplusplus
}
#endif
#endif // _USBCLIENT_
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -