Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

165 lines
3.1 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. USBDLIBI.H
  5. Abstract:
  6. Services exported by USBD for use by USB port drivers and
  7. the usb hub driver.
  8. Environment:
  9. Kernel & user mode
  10. Revision History:
  11. 01-27-96 : created
  12. --*/
  13. #ifndef __USBDLIBI_H__
  14. #define __USBDLIBI_H__
  15. #pragma message ("warning: using obsolete header file usbdlibi.h")
  16. #define USBD_KEEP_DEVICE_DATA 0x01
  17. #define USBD_MARK_DEVICE_BUSY 0x02
  18. #ifndef USBD
  19. typedef PVOID PUSBD_DEVICE_DATA;
  20. //
  21. // Services exported by USBD
  22. //
  23. DECLSPEC_IMPORT
  24. VOID
  25. USBD_RegisterHostController(
  26. IN PDEVICE_OBJECT PhysicalDeviceObject,
  27. IN PDEVICE_OBJECT HcdDeviceObject,
  28. IN PDEVICE_OBJECT HcdTopOfPdoStackDeviceObject,
  29. IN PDRIVER_OBJECT HcdDriverObject,
  30. IN HCD_DEFFERED_START_FUNCTION *HcdDeffreredStart,
  31. IN HCD_SET_DEVICE_POWER_STATE *HcdSetDevicePowerState,
  32. IN HCD_GET_CURRENT_FRAME *HcdGetCurrentFrame,
  33. IN HCD_GET_CONSUMED_BW *HcdGetConsumedBW,
  34. IN HCD_SUBMIT_ISO_URB *HcdSubmitIsoUrb,
  35. IN ULONG HcdDeviceNameHandle
  36. );
  37. DECLSPEC_IMPORT
  38. BOOLEAN
  39. USBD_Dispatch(
  40. PDEVICE_OBJECT DeviceObject,
  41. PIRP Irp,
  42. PDEVICE_OBJECT *HcdDeviceObject,
  43. NTSTATUS *NtStatus
  44. );
  45. DECLSPEC_IMPORT
  46. VOID
  47. USBD_CompleteRequest(
  48. PIRP Irp,
  49. CCHAR PriorityBoost
  50. );
  51. DECLSPEC_IMPORT
  52. NTSTATUS
  53. USBD_CreateDevice(
  54. IN OUT PUSBD_DEVICE_DATA *DeviceData,
  55. IN PDEVICE_OBJECT DeviceObject,
  56. IN BOOLEAN DeviceIsLowSpeed,
  57. IN ULONG MaxPacketSize_Endpoint0,
  58. IN OUT PULONG NonCompliantDevice
  59. );
  60. DECLSPEC_IMPORT
  61. NTSTATUS
  62. USBD_InitializeDevice(
  63. IN PUSBD_DEVICE_DATA DeviceData,
  64. IN PDEVICE_OBJECT DeviceObject,
  65. IN OUT PUSB_DEVICE_DESCRIPTOR DeviceDescriptor,
  66. IN ULONG DeviceDescriptorLength,
  67. IN OUT PUSB_CONFIGURATION_DESCRIPTOR ConfigDescriptor,
  68. IN ULONG ConfigDescriptorLength
  69. );
  70. DECLSPEC_IMPORT
  71. NTSTATUS
  72. USBD_RemoveDevice(
  73. IN PUSBD_DEVICE_DATA DeviceData,
  74. IN PDEVICE_OBJECT DeviceObject,
  75. IN UCHAR Flags
  76. );
  77. DECLSPEC_IMPORT
  78. NTSTATUS
  79. USBD_RestoreDevice(
  80. IN OUT PUSBD_DEVICE_DATA OldDeviceData,
  81. IN OUT PUSBD_DEVICE_DATA NewDeviceData,
  82. IN PDEVICE_OBJECT DeviceObject
  83. );
  84. DECLSPEC_IMPORT
  85. ULONG
  86. USBD_AllocateDeviceName(
  87. PUNICODE_STRING DeviceNameUnicodeString
  88. );
  89. DECLSPEC_IMPORT
  90. VOID
  91. USBD_FreeDeviceName(
  92. ULONG DeviceNameHandle
  93. );
  94. DECLSPEC_IMPORT
  95. VOID
  96. USBD_WaitDeviceMutex(
  97. PDEVICE_OBJECT RootHubPDO
  98. );
  99. DECLSPEC_IMPORT
  100. VOID
  101. USBD_FreeDeviceMutex(
  102. PDEVICE_OBJECT RootHubPDO
  103. );
  104. DECLSPEC_IMPORT
  105. NTSTATUS
  106. USBD_GetDeviceInformation(
  107. IN PUSB_NODE_CONNECTION_INFORMATION DeviceInformation,
  108. IN ULONG DeviceInformationLength,
  109. IN PUSBD_DEVICE_DATA DeviceData
  110. );
  111. DECLSPEC_IMPORT
  112. NTSTATUS
  113. USBD_MakePdoName(
  114. IN OUT PUNICODE_STRING PdoNameUnicodeString,
  115. IN ULONG Index
  116. );
  117. DECLSPEC_IMPORT
  118. VOID
  119. USBD_RegisterHcDeviceCapabilities(
  120. PDEVICE_OBJECT DeviceObject,
  121. PDEVICE_CAPABILITIES DeviceCapabilities,
  122. ROOT_HUB_POWER_FUNCTION *RootHubPower
  123. );
  124. DECLSPEC_IMPORT
  125. ULONG
  126. USBD_CalculateUsbBandwidth(
  127. ULONG MaxPacketSize,
  128. UCHAR EndpointType,
  129. BOOLEAN LowSpeed
  130. );
  131. #endif
  132. #endif /* __USBDLIBI_H__ */