4#ifndef __FX_USB_UTIL_H__
5#define __FX_USB_UTIL_H__
34 bit = (
UCHAR) (1 << (BitNumber %
sizeof(
UCHAR)) );
36 if ((BitArray[
index] & bit) == 0x0) {
40 BitArray[
index] |= bit;
69 bit = (
UCHAR) (1 << (BitNumber %
sizeof(
UCHAR)) );
71 BitArray[
index] &= ~bit;
81 USBD_HANDLE UsbdHandle
93 USBD_HANDLE UsbdHandle
138 __in size_t SizeToValidate,
140 __in ULONG MaximumNumDescriptorsToValidate
143#if (FX_CORE_MODE == FX_CORE_USER_MODE)
148 __in IWudfFile* HostFile,
155 __in WINUSB_INTERFACE_HANDLE WinUsbHandle,
164 __in WINUSB_INTERFACE_HANDLE WinUsbHandle,
172 __in WINUSB_INTERFACE_HANDLE WinUsbHandle,
#define __drv_when(cond, annotes)
return pRequest Reuse(ReuseParams)
enum _FX_URB_TYPE FX_URB_TYPE
#define __inout_xcount(size)
#define __in_xcount(size)
_In_ ULONG _In_ PVOID _In_ LONG DescriptorType
_In_ PUSBD_INTERFACE_LIST_ENTRY InterfaceList
_In_ PVOID _In_ LONG _In_ LONG AlternateSetting
_In_ PVOID _In_ LONG InterfaceNumber
PUSB_COMMON_DESCRIPTOR FxUsbFindDescriptorType(__in PVOID Buffer, __in size_t BufferLength, __in PVOID Start, __in LONG DescriptorType)
VOID __inline FxBitArrayClear(__inout_xcount((BitNumber/sizeof(UCHAR))+1) PUCHAR BitArray, __in UCHAR BitNumber)
FxUsbValidateDescriptorOp
@ FxUsbValidateDescriptorOpAtLeast
@ FxUsbValidateDescriptorOpEqual
NTSTATUS FxUsbValidateDescriptorType(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PUSB_CONFIGURATION_DESCRIPTOR ConfigDescriptor, __in PVOID Start, __in PVOID End, __in LONG DescriptorType, __in size_t SizeToValidate, __in FxUsbValidateDescriptorOp Op, __in ULONG MaximumNumDescriptorsToValidate)
VOID FxUsbUmInitInformationUrb(__inout PUMURB UmUrb, __in WINUSB_INTERFACE_HANDLE WinUsbHandle, __in ULONG BufferLength, __in PVOID Buffer)
NTSTATUS FxFormatUrbRequest(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxIoTarget *Target, __in FxRequestBase *Request, __in FxRequestBuffer *Buffer, __in FX_URB_TYPE FxUrbType, __drv_when(FxUrbType==FxUrbTypeUsbdAllocated, __in) __drv_when(FxUrbType !=FxUrbTypeUsbdAllocated, __in_opt) USBD_HANDLE UsbdHandle)
VOID FxUsbUmInitDescriptorUrb(__inout PUMURB UmUrb, __in WINUSB_INTERFACE_HANDLE WinUsbHandle, __in UCHAR DescriptorType, __in ULONG BufferLength, __in PVOID Buffer)
NTSTATUS FxUsbValidateConfigDescriptorHeaders(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PUSB_CONFIGURATION_DESCRIPTOR ConfigDescriptor, __in size_t ConfigDescriptorLength)
PUSB_INTERFACE_DESCRIPTOR FxUsbParseConfigurationDescriptor(__in PUSB_CONFIGURATION_DESCRIPTOR ConfigDesc, __in UCHAR InterfaceNumber=-1, __in UCHAR AlternateSetting=1)
PURB FxUsbCreateConfigRequest(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PUSB_CONFIGURATION_DESCRIPTOR ConfigDesc, __in PUSBD_INTERFACE_LIST_ENTRY InterfaceList, __in ULONG DefaultMaxPacketSize)
VOID FxUsbUmFormatRequest(__in FxRequestBase *Request, __in_xcount(Urb->Length) PUMURB_HEADER Urb, __in IWudfFile *HostFile, __in BOOLEAN Reuse=FALSE)
VOID FxFormatUsbRequest(__in FxRequestBase *Request, __in PURB Urb, __in FX_URB_TYPE FxUrbType, __drv_when(FxUrbType==FxUrbTypeUsbdAllocated, __in) __drv_when(FxUrbType !=FxUrbTypeUsbdAllocated, __in_opt) USBD_HANDLE UsbdHandle)
BOOLEAN __inline FxBitArraySet(__inout_xcount((BitNumber/sizeof(UCHAR))+1) PUCHAR BitArray, __in UCHAR BitNumber)
VOID FxUsbUmInitControlTransferUrb(__inout PUMURB UmUrb, __in WINUSB_INTERFACE_HANDLE WinUsbHandle, __in ULONG BufferLength, __in PVOID Buffer)
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
_Must_inspect_result_ _In_ WDFUSBDEVICE _Out_writes_bytes_to_opt_ ConfigDescriptorLength PVOID ConfigDescriptor
_Must_inspect_result_ _In_ WDFUSBDEVICE _Out_writes_bytes_to_opt_ ConfigDescriptorLength PVOID _Inout_ PUSHORT ConfigDescriptorLength