reactos/drivers/usb/usbohci/usbohci.h
Johannes Anderwald 2c6077dc50 [USBOHCI]
- Add glue code for supporting iso transfers
- Remove dead from Handle
- Remove broken asserts
- Add support for string descriptors
- Add support for class specific endpoint requests (Needs be ported to usbehci)
- Link to usbd driver
- Add support for retrieving string descriptor
- Rewrite configuration descriptor handling in IUSBDevice. New code is smaller, smarter and handles a lot more cases. Needs to be ported to usbehci
- Wrap usbdlib.h include in extern c macro, it has c linkage
- Control transfers should now work 
- Need to implement support for isochronous / bulk / interrupt transfers until functional
- Tested with Bluetooth USB Stick (multi function, interrupt / bulk / control / isochronous) / USB Microphone (isochronous & control) in XP SP3

svn path=/branches/usb-bringup/; revision=51900
2011-05-25 02:11:06 +00:00

111 lines
2.2 KiB
C

#ifndef USBOHCI_H__
#define USBOHCI_H__
#include <ntddk.h>
#define NDEBUG
#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
typedef struct
{
BOOLEAN IsFDO; // is device a FDO or PDO
BOOLEAN IsHub; // is device a hub / child - not yet used
PDISPATCHIRP Dispatcher; // dispatches the code
}COMMON_DEVICE_EXTENSION, *PCOMMON_DEVICE_EXTENSION;
//
// tag for allocations
//
#define TAG_USBOHCI 'ICHO'
//
// assert for c++ - taken from portcls
//
#define PC_ASSERT(exp) \
(VOID)((!(exp)) ? \
RtlAssert((PVOID) #exp, (PVOID)__FILE__, __LINE__, NULL ), FALSE : TRUE)
//
// hcd_controller.cpp
//
NTSTATUS CreateHCDController(PHCDCONTROLLER *HcdController);
//
// hardware.cpp
//
NTSTATUS CreateUSBHardware(PUSBHARDWAREDEVICE *OutHardware);
//
// misc.cpp
//
NTSTATUS NTAPI SyncForwardIrp(PDEVICE_OBJECT DeviceObject, PIRP Irp);
NTSTATUS NTAPI GetBusInterface(PDEVICE_OBJECT DeviceObject, PBUS_INTERFACE_STANDARD busInterface);
//
// root_hub_controller.cpp
//
NTSTATUS CreateHubController(PHUBCONTROLLER * OutHubController);
//
// memory_manager.cpp
//
NTSTATUS CreateDMAMemoryManager(PDMAMEMORYMANAGER *OutMemoryManager);
//
// usb_device.cpp
//
NTSTATUS CreateUSBDevice(PUSBDEVICE *OutDevice);
//
// usb_queue.cpp
//
NTSTATUS CreateUSBQueue(PUSBQUEUE *OutUsbQueue);
//
// usb_request.cpp
//
NTSTATUS InternalCreateUSBRequest(PUSBREQUEST *OutRequest);
#endif