[USBOHCI]
[reactos.git] / drivers / usb / usbohci / interfaces.h
1
2 #ifndef INTERFACES_HPP
3 #define INTERFACES_HPP
4
5 //---------------------------------------------------------------------------
6 //
7 // Object Hierachy
8 // --------------------------------------------------------------------
9 // | IRootHCDController |
10 // | IHCDController Intel USB Universal Host Controller - 3A37 |
11 // | IHCDController - Intel USB Universal HostController - 3A38 |
12 // | IHCDController - Intel USB Universal HostController - 3A38 |
13 // |------------------------------------------------------------------|
14 //
15 //
16 // IHCDController Intel USB Universal Host Controller - 3A37
17 // IHubController
18 // IUSBHardwareDevice
19 // IDMAMemoryManager
20 // IUSBQueue <- interacts with -> IUSBRequest
21 //
22 //
23 // Each IHCDController creates an IUSBHardwareDevice class upon initialization. The
24 // IUSBHardwardeDevice class is used to abstract usb controller specifics. The IHubController
25 // manages all attached devices and handles hub control ioctl requests.
26 //
27 // Each IUSBHardwareDevice has one IDMAMemoryManager and one IUSBQueue. The IDMAMemoryManager
28 // is used to handle dma memory allocations. The IUSBQueue manages requests which are send to the
29 // usb hardware. See IUSBRequest class for details.
30 //
31
32
33 //=========================================================================================
34 //
35 // class IRootHCDController
36 //
37 // Description: This class serves as the root host controller. The host controller mantains
38 // a list of registered controllers and provides support functions for the host controllers
39
40 struct IHCDController;
41
42 DECLARE_INTERFACE_(IRootHCDController, IUnknown)
43 {
44 DEFINE_ABSTRACT_UNKNOWN()
45
46 //-----------------------------------------------------------------------------------------
47 //
48 // Initialize
49 //
50 // Description: This function initializes the root host controller. It allocates the resources
51 // required to manage the registered controllers
52
53 virtual NTSTATUS Initialize() = 0;
54
55 //-----------------------------------------------------------------------------------------
56 //
57 // RegisterHCD
58 //
59 // Description: this function registers a host controller with the root host controller
60
61 virtual NTSTATUS RegisterHCD(struct IHCDController * Controller) = 0;
62
63 //-----------------------------------------------------------------------------------------
64 //
65 // UnregisterHCD
66 //
67 // Description: this function unregistes a host controller
68
69 virtual NTSTATUS UnregisterHCD(struct IHCDController * Controller) = 0;
70
71 //-----------------------------------------------------------------------------------------
72 //
73 // GetControllerCount
74 //
75 // Description: returns the number of host controllers registered
76
77 virtual ULONG GetControllerCount() = 0;
78
79 };
80
81 typedef IRootHCDController *PROOTHDCCONTROLLER;
82
83 //=========================================================================================
84 //
85 // class IHCDController
86 //
87 // Description: This class is used to manage a single USB host controller
88 //
89
90 DECLARE_INTERFACE_(IHCDController, IUnknown)
91 {
92 DEFINE_ABSTRACT_UNKNOWN()
93
94 //-----------------------------------------------------------------------------------------
95 //
96 // Initialize
97 //
98 // Description: This function initializes the IHCDController implementation.
99 // It creates an IUSBHardwareDevice object and initializes it. It also registeres itself with
100 // the IRootHCDController
101 //
102 virtual NTSTATUS Initialize(IN PROOTHDCCONTROLLER RootHCDController,
103 IN PDRIVER_OBJECT DriverObject,
104 IN PDEVICE_OBJECT PhysicalDeviceObject) = 0;
105
106 };
107
108 typedef IHCDController *PHCDCONTROLLER;
109
110 struct _OHCI_ENDPOINT_DESCRIPTOR;
111 //=========================================================================================
112 //
113 // class IUSBHardwareDevice
114 //
115 // Description: This class provides access to the usb hardware controller
116 //
117
118 struct IDMAMemoryManager;
119 struct IUSBQueue;
120
121 DECLARE_INTERFACE_(IUSBHardwareDevice, IUnknown)
122 {
123 DEFINE_ABSTRACT_UNKNOWN()
124
125 //-----------------------------------------------------------------------------------------
126 //
127 // Initialize
128 //
129 // Description: Initializes the usb device controller
130
131 virtual NTSTATUS Initialize(PDRIVER_OBJECT DriverObject,
132 PDEVICE_OBJECT FunctionalDeviceObject,
133 PDEVICE_OBJECT PhysicalDeviceObject,
134 PDEVICE_OBJECT LowerDeviceObject) = 0;
135
136 //-----------------------------------------------------------------------------------------
137 //
138 // PnpStart
139 //
140 // Description: handles pnp start request from device. It registeres the interrupt,
141 // sets up the ports and prepares the device. It then starts the controller
142
143 virtual NTSTATUS PnpStart(PCM_RESOURCE_LIST RawResources,
144 PCM_RESOURCE_LIST TranslatedResources) = 0;
145
146 //-----------------------------------------------------------------------------------------
147 //
148 // PnpStop
149 //
150 // Description: handles pnp stop request from device. It unregisteres the interrupt, releases ports and dma object.
151
152 virtual NTSTATUS PnpStop(void) = 0;
153
154 //-----------------------------------------------------------------------------------------
155 //
156 // GetDeviceDetails
157 //
158 // Description: returns the device details such as vendor id, device id, number of ports and speed
159
160 virtual NTSTATUS GetDeviceDetails(OUT OPTIONAL PUSHORT VendorId,
161 OUT OPTIONAL PUSHORT DeviceId,
162 OUT OPTIONAL PULONG NumberOfPorts,
163 OUT OPTIONAL PULONG Speed) = 0;
164
165 //-----------------------------------------------------------------------------------------
166 //
167 // GetUSBQueue
168 //
169 // Description: returns interface to internal IUSBQueue
170 // Interface is reference counted, you need to call release method when you are done with it
171 // Do not call Initialize on IUSBQueue, the object is already initialized
172
173 virtual NTSTATUS GetUSBQueue(OUT struct IUSBQueue **OutUsbQueue) = 0;
174
175 //-----------------------------------------------------------------------------------------
176 //
177 // GetBulkHeadEndpointDescriptor
178 //
179 // Description: returns the bulk head endpoint descriptor
180
181 virtual NTSTATUS GetBulkHeadEndpointDescriptor(struct _OHCI_ENDPOINT_DESCRIPTOR ** OutDescriptor) = 0;
182
183 //-----------------------------------------------------------------------------------------
184 //
185 // GetControlHeadEndpointDescriptor
186 //
187 // Description: returns the control head endpoint descriptor
188
189 virtual NTSTATUS GetControlHeadEndpointDescriptor(struct _OHCI_ENDPOINT_DESCRIPTOR ** OutDescriptor) = 0;
190
191 //-----------------------------------------------------------------------------------------
192 //
193 // GetInterruptEndpointDescriptors
194 //
195 // Description: returns interrupt endpoint descriptors
196
197 virtual NTSTATUS GetInterruptEndpointDescriptors(struct _OHCI_ENDPOINT_DESCRIPTOR *** OutDescriptorArray) = 0;
198
199 //-----------------------------------------------------------------------------------------
200 //
201 // HeadEndpointDescriptorModified
202 //
203 // Description: notifies the hardware that an endpoint descriptor was added to head endpoint descriptor
204
205 virtual VOID HeadEndpointDescriptorModified(ULONG HeadType) = 0;
206
207
208
209
210 //-----------------------------------------------------------------------------------------
211 //
212 // GetDMA
213 //
214 // Description: returns the DMA object which can be used to allocate memory from the common buffer
215
216 virtual NTSTATUS GetDMA(OUT struct IDMAMemoryManager **OutDMAMemoryManager) = 0;
217
218
219 //-----------------------------------------------------------------------------------------
220 //
221 // ResetController()
222 //
223 // Description: this function resets the controller
224 // Returns STATUS_SUCCESS when the controller was successfully reset
225
226 virtual NTSTATUS ResetController() = 0;
227
228 //-----------------------------------------------------------------------------------------
229 //
230 // StartController
231 //
232 // Description: this functions starts controller allowing interrupts for device connects/removal, and execution of
233 // Periodic and Asynchronous Schedules.
234 //
235
236 virtual NTSTATUS StartController() = 0;
237
238 //-----------------------------------------------------------------------------------------
239 //
240 // StopController
241 //
242 // Description: this functions stops controller disabling interrupts for device connects/removal, and execution of
243 // Periodic and Asynchronous Schedules.
244 //
245
246 virtual NTSTATUS StopController() = 0;
247
248 //-----------------------------------------------------------------------------------------
249 //
250 // ResetPort
251 //
252 // Description: this functions resets the port on the controller
253 //
254
255 virtual NTSTATUS ResetPort(ULONG PortNumber) = 0;
256
257 //-----------------------------------------------------------------------------------------
258 //
259 // GetPortStatus
260 //
261 // Description: this functions return status and change state of port
262 //
263 virtual NTSTATUS GetPortStatus(ULONG PortId, OUT USHORT *PortStatus, OUT USHORT *PortChange) = 0;
264
265 //-----------------------------------------------------------------------------------------
266 //
267 // ClearPortStatus
268 //
269 // Description: Clears Status of Port, for example Connection, Enable and Reset
270 //
271 virtual NTSTATUS ClearPortStatus(ULONG PortId, ULONG Status) = 0;
272
273 //-----------------------------------------------------------------------------------------
274 //
275 // SetPortFeature
276 //
277 // Description: this functions Sets Feature on Port, for example Enable, Power and Reset
278 //
279 virtual NTSTATUS SetPortFeature(ULONG PortId, ULONG Feature) = 0;
280
281 //-----------------------------------------------------------------------------------------
282 //
283 // SetStatusChangeEndpointCallBack
284 //
285 // Description: Used to callback to the hub controller when SCE detected
286 //
287 virtual VOID SetStatusChangeEndpointCallBack(PVOID CallBack,PVOID Context) = 0;
288
289 //-----------------------------------------------------------------------------------------
290 //
291 // AcquireDeviceLock
292 //
293 // Description: acquires the device lock
294
295 virtual KIRQL AcquireDeviceLock(void) = 0;
296
297 //-----------------------------------------------------------------------------------------
298 //
299 // ReleaseLock
300 //
301 // Description: releases the device lock
302
303 virtual void ReleaseDeviceLock(KIRQL OldLevel) = 0;
304 };
305
306 typedef IUSBHardwareDevice *PUSBHARDWAREDEVICE;
307
308
309 //=========================================================================================
310 //
311 // class IDMAMemoryManager
312 //
313 // Description: This class provides access to the dma buffer. It provides methods to
314 // allocate and free from the dma buffer
315 //
316
317 DECLARE_INTERFACE_(IDMAMemoryManager, IUnknown)
318 {
319 DEFINE_ABSTRACT_UNKNOWN()
320
321 //-----------------------------------------------------------------------------------------
322 //
323 // Initialize
324 //
325 // Description: initializes the memory manager
326
327 virtual NTSTATUS Initialize(IN PUSBHARDWAREDEVICE Device,
328 IN PKSPIN_LOCK Lock,
329 IN ULONG DmaBufferSize,
330 IN PVOID VirtualBase,
331 IN PHYSICAL_ADDRESS PhysicalAddress,
332 IN ULONG DefaultBlockSize) = 0;
333
334 //-----------------------------------------------------------------------------------------
335 //
336 // Allocate
337 //
338 // Description: allocates block of memory from allocator
339
340 virtual NTSTATUS Allocate(IN ULONG Size,
341 OUT PVOID *OutVirtualBase,
342 OUT PPHYSICAL_ADDRESS OutPhysicalAddress) = 0;
343
344
345 //-----------------------------------------------------------------------------------------
346 //
347 // Free
348 //
349 // Description: releases memory block
350
351 virtual NTSTATUS Release(IN PVOID VirtualBase,
352 IN ULONG Size) = 0;
353
354 };
355
356 typedef IDMAMemoryManager *PDMAMEMORYMANAGER;
357
358
359 //=========================================================================================
360 //
361 // class IUSBRequest
362 //
363 // Description: This class is used to issue request to usb controller. The class is
364 // initialized using InitializeXXX methods. You also need to call SetEndpoint to define the endpoint
365 // In addition you can call SetCompletionDetails if you need to wait for the end of
366 // the request or want to complete an irp. You call AddUSBRequest to add the request to the queue.
367 // Once the request is completed the CompletionCallback is invoked. The CompletionCallback
368 // will take care of any completion details which have been set. If the request is cancelled, the
369 // CancelCallback routine is invoked.
370 //
371
372 DECLARE_INTERFACE_(IUSBRequest, IUnknown)
373 {
374 DEFINE_ABSTRACT_UNKNOWN()
375
376 //-----------------------------------------------------------------------------------------
377 //
378 // InitializeWithSetupPacket
379 //
380 // Description: initializes the request packet with an setup packet
381 // If there is a TransferBuffer, the TransferBufferLength contains the length of the buffer
382
383
384 virtual NTSTATUS InitializeWithSetupPacket(IN PDMAMEMORYMANAGER DmaManager,
385 IN PUSB_DEFAULT_PIPE_SETUP_PACKET SetupPacket,
386 IN UCHAR DeviceAddress,
387 IN OPTIONAL PUSB_ENDPOINT_DESCRIPTOR EndpointDescriptor,
388 IN OUT ULONG TransferBufferLength,
389 IN OUT PMDL TransferBuffer) = 0;
390
391 //-----------------------------------------------------------------------------------------
392 //
393 // InitializeWithIrp
394 //
395 // Description: initializes the request with an IRP
396 // The irp contains an URB block which contains all necessary information
397
398 virtual NTSTATUS InitializeWithIrp(IN PDMAMEMORYMANAGER DmaManager,
399 IN OUT PIRP Irp) = 0;
400
401 //-----------------------------------------------------------------------------------------
402 //
403 // IsRequestComplete
404 //
405 // Description: returns true when the request has been completed
406 // Should be called after the CompletionCallback has been invoked
407 // This function is called by IUSBQueue after queue head has been completed
408 // If the function returns true, IUSBQueue will then call ShouldReleaseRequestAfterCompletion
409 // If that function returns also true, it calls Release() to delete the IUSBRequest
410
411 virtual BOOLEAN IsRequestComplete() = 0;
412
413 //-----------------------------------------------------------------------------------------
414 //
415 // GetTransferType
416 //
417 // Description: returns the type of the request: control, bulk, iso, interrupt
418
419 virtual ULONG GetTransferType() = 0;
420
421 //-----------------------------------------------------------------------------------------
422 //
423 // GetEndpointDescriptor
424 //
425 // Description: returns the general transfer descriptor
426
427 virtual NTSTATUS GetEndpointDescriptor(struct _OHCI_ENDPOINT_DESCRIPTOR ** OutDescriptor) = 0;
428
429 //-----------------------------------------------------------------------------------------
430 //
431 // GetResultStatus
432 //
433 // Description: returns the status code of the result
434 // Note: this function will block the caller untill the request has been completed
435
436 virtual VOID GetResultStatus(OUT OPTIONAL NTSTATUS * NtStatusCode,
437 OUT OPTIONAL PULONG UrbStatusCode) = 0;
438
439 //-----------------------------------------------------------------------------------------
440 //
441 // IsRequestInitialized
442 //
443 // Description: returns true when the request has been successfully initialized using InitializeXXX methods
444
445 virtual BOOLEAN IsRequestInitialized() = 0;
446
447 //-----------------------------------------------------------------------------------------
448 //
449 // CompletionCallback
450 //
451 // Description: notifies request that the endpoint descriptor is complete
452
453 virtual VOID CompletionCallback(struct _OHCI_ENDPOINT_DESCRIPTOR * OutDescriptor) = 0;
454
455 //-----------------------------------------------------------------------------------------
456 //
457 // FreeEndpointDescriptor
458 //
459 // Description: frees the associated endpoint descriptor and its general descriptors
460
461 virtual VOID FreeEndpointDescriptor(struct _OHCI_ENDPOINT_DESCRIPTOR * OutDescriptor) = 0;
462
463 //-----------------------------------------------------------------------------------------
464 //
465 // GetInterruptInterval
466 //
467 // Description: returns interval of the iso / interrupt
468
469 virtual UCHAR GetInterval() = 0;
470
471 };
472
473
474 typedef IUSBRequest *PUSBREQUEST;
475
476 //=========================================================================================
477 //
478 // class IUSBQueue
479 //
480 // Description: This class manages pending requests
481 //
482
483 DECLARE_INTERFACE_(IUSBQueue, IUnknown)
484 {
485 DEFINE_ABSTRACT_UNKNOWN()
486
487 //-----------------------------------------------------------------------------------------
488 //
489 // Initialize
490 //
491 // Description: initializes the object
492
493 virtual NTSTATUS Initialize(IN PUSBHARDWAREDEVICE Hardware,
494 IN PDMA_ADAPTER AdapterObject,
495 IN PDMAMEMORYMANAGER MemManager,
496 IN OPTIONAL PKSPIN_LOCK Lock) = 0;
497
498 //-----------------------------------------------------------------------------------------
499 //
500 // GetPendingRequestCount
501 //
502 // Description: returns the number of pending requests true from IsRequestComplete
503
504 virtual ULONG GetPendingRequestCount() = 0;
505
506 //-----------------------------------------------------------------------------------------
507 //
508 // AddUSBRequest
509 //
510 // Description: adds an usb request to the queue.
511 // Returns status success when successful
512
513 virtual NTSTATUS AddUSBRequest(IUSBRequest * Request) = 0;
514
515 //-----------------------------------------------------------------------------------------
516 //
517 // CancelRequests()
518 //
519 // Description: cancels all requests
520
521 virtual NTSTATUS CancelRequests() = 0;
522
523 //-----------------------------------------------------------------------------------------
524 //
525 // CreateUSBRequest
526 //
527 // Description: creates an usb request
528
529 virtual NTSTATUS CreateUSBRequest(IUSBRequest **OutRequest) = 0;
530
531 //-----------------------------------------------------------------------------------------
532 //
533 // TransferDescriptorCompletionCallback
534 //
535 // Description: notifies the queue that a transfer was completed
536
537 virtual VOID TransferDescriptorCompletionCallback(ULONG TransferDescriptorLogicalAddress) = 0;
538
539 };
540
541 typedef IUSBQueue *PUSBQUEUE;
542
543 //=========================================================================================
544 //
545 // class IHubController
546 //
547 // Description: This class implements a hub controller
548 //
549
550 DECLARE_INTERFACE_(IHubController, IUnknown)
551 {
552 DEFINE_ABSTRACT_UNKNOWN()
553
554 //----------------------------------------------------------------------------------------
555 //
556 // Initialize
557 //
558 // Description: Initializes the hub controller
559
560 virtual NTSTATUS Initialize(IN PDRIVER_OBJECT DriverObject,
561 IN PHCDCONTROLLER Controller,
562 IN PUSBHARDWAREDEVICE Device,
563 IN BOOLEAN IsRootHubDevice,
564 IN ULONG DeviceAddress) = 0;
565
566 //----------------------------------------------------------------------------------------
567 //
568 // GetHubControllerDeviceObject
569 //
570 // Description: Returns the hub controller device object
571
572 virtual NTSTATUS GetHubControllerDeviceObject(PDEVICE_OBJECT * HubDeviceObject) = 0;
573
574 //----------------------------------------------------------------------------------------
575 //
576 // GetHubControllerSymbolicLink
577 //
578 // Description: Returns the symbolic link of the root hub
579
580 virtual NTSTATUS GetHubControllerSymbolicLink(ULONG BufferLength, PVOID Buffer, PULONG RequiredLength) = 0;
581
582
583 };
584
585 typedef IHubController *PHUBCONTROLLER;
586
587 //=========================================================================================
588 //
589 // class IDispatchIrp
590 //
591 // Description: This class is used to handle irp dispatch requests
592 //
593
594 DECLARE_INTERFACE_(IDispatchIrp, IUnknown)
595 {
596 DEFINE_ABSTRACT_UNKNOWN()
597
598 //-----------------------------------------------------------------------------------------
599 //
600 // HandlePnp
601 //
602 // Description: This function handles all pnp requests
603
604 virtual NTSTATUS HandlePnp(IN PDEVICE_OBJECT DeviceObject,
605 IN OUT PIRP Irp) = 0;
606
607 //-----------------------------------------------------------------------------------------
608 //
609 // HandlePower
610 //
611 // Description: This function handles all power pnp requests
612 //
613 virtual NTSTATUS HandlePower(IN PDEVICE_OBJECT DeviceObject,
614 IN OUT PIRP Irp) = 0;
615
616 //-----------------------------------------------------------------------------------------
617 //
618 // HandleDeviceControl
619 //
620 // Description: handles device io control requests
621
622 virtual NTSTATUS HandleDeviceControl(IN PDEVICE_OBJECT DeviceObject,
623 IN OUT PIRP Irp) = 0;
624 };
625
626 typedef IDispatchIrp *PDISPATCHIRP;
627
628 //=========================================================================================
629 //
630 // class IUSBDevice
631 //
632 // Description: This class is used to abstract details of a usb device
633 //
634
635 DECLARE_INTERFACE_(IUSBDevice, IUnknown)
636 {
637 DEFINE_ABSTRACT_UNKNOWN()
638
639 //----------------------------------------------------------------------------------------
640 //
641 // Initialize
642 //
643 // Description: Initializes the usb device
644
645 virtual NTSTATUS Initialize(IN PHUBCONTROLLER HubController,
646 IN PUSBHARDWAREDEVICE Device,
647 IN PVOID Parent,
648 IN ULONG Port,
649 IN ULONG PortStatus) = 0;
650
651 //-----------------------------------------------------------------------------------------
652 //
653 // IsHub
654 //
655 // Description: returns true when device is a hub
656
657 virtual BOOLEAN IsHub() = 0;
658
659 //-----------------------------------------------------------------------------------------
660 //
661 // GetParent
662 //
663 // Description: gets the parent device of the this device
664
665 virtual NTSTATUS GetParent(PVOID * Parent) = 0;
666
667 //-----------------------------------------------------------------------------------------
668 //
669 // GetDeviceAddress
670 //
671 // Description: gets the device address of the this device
672
673 virtual UCHAR GetDeviceAddress() = 0;
674
675
676 //-----------------------------------------------------------------------------------------
677 //
678 // GetPort
679 //
680 // Description: gets the port to which this device is connected
681
682 virtual ULONG GetPort() = 0;
683
684 //-----------------------------------------------------------------------------------------
685 //
686 // GetSpeed
687 //
688 // Description: gets the speed of the device
689
690 virtual USB_DEVICE_SPEED GetSpeed() = 0;
691
692 //-----------------------------------------------------------------------------------------
693 //
694 // GetType
695 //
696 // Description: gets the type of the device, either 1.1 or 2.0 device
697
698 virtual USB_DEVICE_TYPE GetType() = 0;
699
700 //-----------------------------------------------------------------------------------------
701 //
702 // GetState
703 //
704 // Description: gets the device state
705
706 virtual ULONG GetState() = 0;
707
708 //-----------------------------------------------------------------------------------------
709 //
710 // SetDeviceHandleData
711 //
712 // Description: sets device handle data
713
714 virtual void SetDeviceHandleData(PVOID Data) = 0;
715
716 //-----------------------------------------------------------------------------------------
717 //
718 // SetDeviceAddress
719 //
720 // Description: sets device handle data
721
722 virtual NTSTATUS SetDeviceAddress(UCHAR DeviceAddress) = 0;
723
724 //-----------------------------------------------------------------------------------------
725 //
726 // GetDeviceDescriptor
727 //
728 // Description: sets device handle data
729
730 virtual void GetDeviceDescriptor(PUSB_DEVICE_DESCRIPTOR DeviceDescriptor) = 0;
731
732 //-----------------------------------------------------------------------------------------
733 //
734 // GetConfigurationValue
735 //
736 // Description: gets current selected configuration index
737
738 virtual UCHAR GetConfigurationValue() = 0;
739
740 //-----------------------------------------------------------------------------------------
741 //
742 // SubmitIrp
743 //
744 // Description: submits an irp containing an urb
745
746 virtual NTSTATUS SubmitIrp(PIRP Irp) = 0;
747
748 //-----------------------------------------------------------------------------------------
749 //
750 // GetConfigurationDescriptors
751 //
752 // Description: returns one or more configuration descriptors
753
754 virtual VOID GetConfigurationDescriptors(IN PUSB_CONFIGURATION_DESCRIPTOR ConfigDescriptorBuffer,
755 IN ULONG BufferLength,
756 OUT PULONG OutBufferLength) = 0;
757
758 //-----------------------------------------------------------------------------------------
759 //
760 // Description: returns length of configuration descriptors
761 //
762 virtual ULONG GetConfigurationDescriptorsLength() = 0;
763
764 //-----------------------------------------------------------------------------------------
765 //
766 // SubmitSetupPacket
767 //
768 // Description: submits an setup packet. The usb device will then create an usb request from it and submit it to the queue
769
770 virtual NTSTATUS SubmitSetupPacket(IN PUSB_DEFAULT_PIPE_SETUP_PACKET SetupPacket,
771 IN OUT ULONG BufferLength,
772 OUT PVOID Buffer) = 0;
773
774 //-----------------------------------------------------------------------------------------
775 //
776 // SelectConfiguration
777 //
778 // Description: selects a configuration
779
780 virtual NTSTATUS SelectConfiguration(IN PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor,
781 IN PUSBD_INTERFACE_INFORMATION Interface,
782 OUT USBD_CONFIGURATION_HANDLE *ConfigurationHandle) = 0;
783
784 //-----------------------------------------------------------------------------------------
785 //
786 // SelectConfiguration
787 //
788 // Description: selects a interface of an configuration
789
790 virtual NTSTATUS SelectInterface(IN USBD_CONFIGURATION_HANDLE ConfigurationHandle,
791 IN OUT PUSBD_INTERFACE_INFORMATION Interface) = 0;
792 };
793
794 typedef IUSBDevice *PUSBDEVICE;
795
796 #endif