[USBOHCI]
[reactos.git] / drivers / usb / usbohci / usbohci.h
1 #ifndef USBOHCI_H__
2 #define USBOHCI_H__
3
4 #include <ntddk.h>
5 #define NDEBUG
6 #include <debug.h>
7 #include <hubbusif.h>
8 #include <usbbusif.h>
9 #include <usbioctl.h>
10 #include <usb100.h>
11
12 extern
13 "C"
14 {
15 #include <usbdlib.h>
16 }
17
18 //
19 // FIXME:
20 // #include <usbprotocoldefs.h>
21 //
22 #include <usb.h>
23 #include <stdio.h>
24 #include <wdmguid.h>
25
26 //
27 // FIXME:
28 // the following includes are required to get kcom to compile
29 //
30 #include <portcls.h>
31 #include <dmusicks.h>
32 #include <kcom.h>
33
34 #include "interfaces.h"
35
36 //
37 // flags for handling USB_REQUEST_SET_FEATURE / USB_REQUEST_GET_FEATURE
38 //
39 #define PORT_ENABLE 1
40 #define PORT_SUSPEND 2
41 #define PORT_OVER_CURRENT 3
42 #define PORT_RESET 4
43 #define PORT_POWER 8
44 #define C_PORT_CONNECTION 16
45 #define C_PORT_ENABLE 17
46 #define C_PORT_SUSPEND 18
47 #define C_PORT_OVER_CURRENT 19
48 #define C_PORT_RESET 20
49
50 typedef struct
51 {
52 BOOLEAN IsFDO; // is device a FDO or PDO
53 BOOLEAN IsHub; // is device a hub / child - not yet used
54 PDISPATCHIRP Dispatcher; // dispatches the code
55 }COMMON_DEVICE_EXTENSION, *PCOMMON_DEVICE_EXTENSION;
56
57 //
58 // tag for allocations
59 //
60 #define TAG_USBOHCI 'ICHO'
61
62 //
63 // assert for c++ - taken from portcls
64 //
65 #define PC_ASSERT(exp) \
66 (VOID)((!(exp)) ? \
67 RtlAssert((PVOID) #exp, (PVOID)__FILE__, __LINE__, NULL ), FALSE : TRUE)
68
69 //
70 // hcd_controller.cpp
71 //
72 NTSTATUS CreateHCDController(PHCDCONTROLLER *HcdController);
73
74 //
75 // hardware.cpp
76 //
77 NTSTATUS CreateUSBHardware(PUSBHARDWAREDEVICE *OutHardware);
78
79 //
80 // misc.cpp
81 //
82 NTSTATUS NTAPI SyncForwardIrp(PDEVICE_OBJECT DeviceObject, PIRP Irp);
83 NTSTATUS NTAPI GetBusInterface(PDEVICE_OBJECT DeviceObject, PBUS_INTERFACE_STANDARD busInterface);
84
85 //
86 // root_hub_controller.cpp
87 //
88 NTSTATUS CreateHubController(PHUBCONTROLLER * OutHubController);
89
90 //
91 // memory_manager.cpp
92 //
93 NTSTATUS CreateDMAMemoryManager(PDMAMEMORYMANAGER *OutMemoryManager);
94
95
96 //
97 // usb_device.cpp
98 //
99 NTSTATUS CreateUSBDevice(PUSBDEVICE *OutDevice);
100
101 //
102 // usb_queue.cpp
103 //
104 NTSTATUS CreateUSBQueue(PUSBQUEUE *OutUsbQueue);
105
106 //
107 // usb_request.cpp
108 //
109 NTSTATUS InternalCreateUSBRequest(PUSBREQUEST *OutRequest);
110
111 #endif