2012-02-23 01:27:19 +00:00
|
|
|
#ifndef USBUHCI_H__
|
|
|
|
#define USBUHCI_H__
|
2012-02-21 15:49:08 +00:00
|
|
|
|
2014-01-03 19:20:35 +00:00
|
|
|
#include <libusb.h>
|
2012-02-21 15:49:08 +00:00
|
|
|
|
2013-12-24 20:54:29 +00:00
|
|
|
#include "hardware.h"
|
2012-02-21 15:49:08 +00:00
|
|
|
#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
|
|
|
|
//
|
2012-02-29 16:15:05 +00:00
|
|
|
NTSTATUS NTAPI CreateUSBHardware(PUSBHARDWAREDEVICE *OutHardware);
|
2012-02-21 15:49:08 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// usb_queue.cpp
|
|
|
|
//
|
2012-02-29 16:15:05 +00:00
|
|
|
NTSTATUS NTAPI CreateUSBQueue(PUSBQUEUE *OutUsbQueue);
|
2012-02-21 15:49:08 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// usb_request.cpp
|
|
|
|
//
|
2012-02-29 16:15:05 +00:00
|
|
|
NTSTATUS NTAPI InternalCreateUSBRequest(PUSBREQUEST *OutRequest);
|
2012-02-21 15:49:08 +00:00
|
|
|
|
|
|
|
#endif
|