2012-02-23 01:27:19 +00:00
|
|
|
#ifndef USBUHCI_H__
|
|
|
|
#define USBUHCI_H__
|
2012-02-21 15:49:08 +00:00
|
|
|
|
|
|
|
#include <ntddk.h>
|
2012-02-22 23:24:53 +00:00
|
|
|
#define NDEBUG
|
2012-02-21 15:49:08 +00:00
|
|
|
#include <debug.h>
|
|
|
|
#include <hubbusif.h>
|
|
|
|
#include <usbbusif.h>
|
|
|
|
#include <usbioctl.h>
|
|
|
|
|
|
|
|
extern
|
|
|
|
"C"
|
|
|
|
{
|
|
|
|
#include <usbdlib.h>
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// FIXME:
|
|
|
|
// #include <usbprotocoldefs.h>
|
|
|
|
//
|
|
|
|
#include <usb.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <wdmguid.h>
|
|
|
|
|
|
|
|
//
|
|
|
|
// FIXME:
|
|
|
|
// the following includes are required to get kcom to compile
|
|
|
|
//
|
|
|
|
#include <portcls.h>
|
|
|
|
#include <dmusicks.h>
|
|
|
|
#include <kcom.h>
|
|
|
|
|
|
|
|
#include "interfaces.h"
|
|
|
|
|
|
|
|
//
|
|
|
|
// flags for handling USB_REQUEST_SET_FEATURE / USB_REQUEST_GET_FEATURE
|
|
|
|
//
|
|
|
|
#define PORT_ENABLE 1
|
|
|
|
#define PORT_SUSPEND 2
|
|
|
|
#define PORT_OVER_CURRENT 3
|
|
|
|
#define PORT_RESET 4
|
|
|
|
#define PORT_POWER 8
|
|
|
|
#define C_PORT_CONNECTION 16
|
|
|
|
#define C_PORT_ENABLE 17
|
|
|
|
#define C_PORT_SUSPEND 18
|
|
|
|
#define C_PORT_OVER_CURRENT 19
|
|
|
|
#define C_PORT_RESET 20
|
|
|
|
|
|
|
|
//
|
|
|
|
// tag for allocations
|
|
|
|
//
|
2012-02-28 22:09:57 +00:00
|
|
|
#define TAG_USBUHCI 'ICHU'
|
2012-02-21 15:49:08 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// assert for c++ - taken from portcls
|
|
|
|
//
|
|
|
|
#define PC_ASSERT(exp) \
|
|
|
|
(VOID)((!(exp)) ? \
|
|
|
|
RtlAssert((PVOID) #exp, (PVOID)__FILE__, __LINE__, NULL ), FALSE : TRUE)
|
|
|
|
|
|
|
|
//
|
|
|
|
// hardware.cpp
|
|
|
|
//
|
|
|
|
NTSTATUS CreateUSBHardware(PUSBHARDWAREDEVICE *OutHardware);
|
|
|
|
|
|
|
|
//
|
|
|
|
// usb_queue.cpp
|
|
|
|
//
|
|
|
|
NTSTATUS CreateUSBQueue(PUSBQUEUE *OutUsbQueue);
|
|
|
|
|
|
|
|
//
|
|
|
|
// usb_request.cpp
|
|
|
|
//
|
|
|
|
NTSTATUS InternalCreateUSBRequest(PUSBREQUEST *OutRequest);
|
|
|
|
|
|
|
|
#endif
|