4 struct _OHCI_ENDPOINT_DESCRIPTOR
;
5 struct IDMAMemoryManager
;
8 //=========================================================================================
10 // class IUSBHardwareDevice
12 // Description: This class provides access to the usb hardware controller
16 #define DEFINE_ABSTRACT_USBOHCIHARDWARE() \
17 STDMETHOD_(VOID, GetBulkHeadEndpointDescriptor)( THIS_ \
18 IN struct _OHCI_ENDPOINT_DESCRIPTOR ** OutDescriptor) PURE; \
20 STDMETHOD_(VOID, GetControlHeadEndpointDescriptor)( THIS_ \
21 IN struct _OHCI_ENDPOINT_DESCRIPTOR ** OutDescriptor) PURE; \
23 STDMETHOD_(VOID, GetIsochronousHeadEndpointDescriptor)( THIS_ \
24 IN struct _OHCI_ENDPOINT_DESCRIPTOR ** OutDescriptor) PURE; \
26 STDMETHOD_(VOID, GetInterruptEndpointDescriptors)( THIS_ \
27 IN struct _OHCI_ENDPOINT_DESCRIPTOR *** OutDescriptor) PURE; \
29 STDMETHOD_(VOID, HeadEndpointDescriptorModified)( THIS_ \
30 IN ULONG Type) PURE; \
32 STDMETHOD_(VOID, GetCurrentFrameNumber)( THIS_ \
33 IN PULONG FrameNumber) PURE;
35 #define IMP_IUSBOHCIHARDWAREDEVICE \
36 STDMETHODIMP_(VOID) GetBulkHeadEndpointDescriptor( \
37 IN struct _OHCI_ENDPOINT_DESCRIPTOR ** OutDescriptor); \
39 STDMETHODIMP_(VOID) GetControlHeadEndpointDescriptor( \
40 IN struct _OHCI_ENDPOINT_DESCRIPTOR ** OutDescriptor); \
42 STDMETHODIMP_(VOID) GetIsochronousHeadEndpointDescriptor( \
43 IN struct _OHCI_ENDPOINT_DESCRIPTOR ** OutDescriptor); \
45 STDMETHODIMP_(VOID) GetInterruptEndpointDescriptors( \
46 IN struct _OHCI_ENDPOINT_DESCRIPTOR *** OutDescriptor); \
48 STDMETHODIMP_(VOID) HeadEndpointDescriptorModified( \
51 STDMETHODIMP_(VOID) GetCurrentFrameNumber( \
52 OUT PULONG FrameNumber);
54 DECLARE_INTERFACE_(IOHCIHardwareDevice
, IUSBHardwareDevice
)
56 DEFINE_ABSTRACT_UNKNOWN()
57 DEFINE_ABSTRACT_USBHARDWAREDEVICE()
58 DEFINE_ABSTRACT_USBOHCIHARDWARE()
61 typedef IOHCIHardwareDevice
*POHCIHARDWAREDEVICE
;
64 //=========================================================================================
68 // Description: This class is used to issue request to usb controller. The class is
69 // initialized using InitializeXXX methods. You also need to call SetEndpoint to define the endpoint
70 // In addition you can call SetCompletionDetails if you need to wait for the end of
71 // the request or want to complete an irp. You call AddUSBRequest to add the request to the queue.
72 // Once the request is completed the CompletionCallback is invoked. The CompletionCallback
73 // will take care of any completion details which have been set. If the request is cancelled, the
74 // CancelCallback routine is invoked.
78 #define DEFINE_ABSTRACT_USBOHCIREQUEST() \
79 STDMETHOD_(NTSTATUS, GetEndpointDescriptor)( THIS_ \
80 IN struct _OHCI_ENDPOINT_DESCRIPTOR ** OutDescriptor) PURE; \
82 STDMETHOD_(VOID, CompletionCallback)( THIS) PURE; \
84 STDMETHOD_(VOID, FreeEndpointDescriptor)( THIS_ \
85 IN struct _OHCI_ENDPOINT_DESCRIPTOR * OutDescriptor) PURE; \
87 STDMETHOD_(UCHAR, GetInterval)( THIS) PURE;
90 #define IMP_IOHCIREQUEST \
91 STDMETHODIMP_(NTSTATUS) GetEndpointDescriptor( \
92 IN struct _OHCI_ENDPOINT_DESCRIPTOR ** OutDescriptor); \
94 STDMETHODIMP_(VOID) CompletionCallback(); \
96 STDMETHODIMP_(VOID) FreeEndpointDescriptor( \
97 IN struct _OHCI_ENDPOINT_DESCRIPTOR * OutDescriptor); \
99 STDMETHODIMP_(UCHAR) GetInterval();
101 DECLARE_INTERFACE_(IOHCIRequest
, IUSBRequest
)
103 DEFINE_ABSTRACT_UNKNOWN()
104 DEFINE_ABSTRACT_USBREQUEST()
105 DEFINE_ABSTRACT_USBOHCIREQUEST()
108 typedef IOHCIRequest
*POHCIREQUEST
;
110 //=========================================================================================
114 // Description: This class manages pending requests
117 #define DEFINE_ABSTRACT_USBOHCIQUEUE() \
118 STDMETHOD_(VOID, TransferDescriptorCompletionCallback)( THIS_ \
119 IN ULONG TransferDescriptorLogicalAddress) PURE;
121 #define IMP_IUSBOHCIQUEUE \
122 STDMETHODIMP_(VOID) TransferDescriptorCompletionCallback( \
123 IN ULONG TransferDescriptorLogicalAddress);
125 DECLARE_INTERFACE_(IOHCIQueue
, IUSBQueue
)
127 DEFINE_ABSTRACT_UNKNOWN()
128 DEFINE_ABSTRACT_USBQUEUE()
129 DEFINE_ABSTRACT_USBOHCIQUEUE()
132 typedef IOHCIQueue
*POHCIQUEUE
;
134 #endif /* INTERFACES_HPP */