75b56fd4d2c409a7d350af8a5c74e0323059cedb
[reactos.git] / reactos / drivers / usb / miniport / usb_wrapper.h
1 //#include <stdlib.h>
2 //#include <ntos/types.h>
3 //#include <ddk/extypes.h>
4
5 /*
6 TODO: Do a major cleanup of this file!
7 Lots of definitions should go to corresponding files
8 */
9
10 #include <ddk/ntddk.h>
11 #include <ddk/kbdmou.h>
12 #include <debug.h>
13
14 #define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
15
16 void wait_ms(int mils);
17 void my_udelay(int us);
18
19 // For now this is needed only for correct operation of embedded keyboard and mouse drvs
20 typedef struct _USBPORT_INTERFACE
21 {
22 PCONNECT_DATA KbdConnectData;
23 PCONNECT_DATA MouseConnectData;
24 } USBPORT_INTERFACE, *PUSBPORT_INTERFACE;
25
26 // Register in usbcore.sys
27 void STDCALL RegisterPortDriver(PDRIVER_OBJECT, PUSBPORT_INTERFACE);
28
29 #ifndef _snprintf
30 int _snprintf(char * buf, size_t cnt, const char *fmt, ...);
31 #endif
32 #ifndef sprintf
33 int sprintf(char * buf, const char *fmt, ...);
34 #endif
35 #ifndef swprintf
36 int swprintf(wchar_t *buf, const wchar_t *fmt, ...);
37 #endif
38
39 #undef interface
40
41 #include "linux/linux_wrapper.h"
42 #define __KERNEL__
43 #undef CONFIG_PCI
44 #define CONFIG_PCI
45
46 #include "linux/usb.h"
47 #include "linux/pci_ids.h"
48
49 #define IOCTL_INTERNAL_USB_GET_ROOT_USB_DEVICE \
50 CTL_CODE(FILE_DEVICE_USB, 4000, METHOD_BUFFERED, FILE_ANY_ACCESS)