reactos/drivers/hid/hidusb/hidusb.h
Johannes Anderwald 842fe995ce [USB-BRINGUP]
- Fake status success for unimplemented IRP_MN_REMOVE_DEVICE
- Fix tons of bugs in the read report completion routine
- Implement function to re-use a complete report irp
- Use correct device object when invoking the mini driver's dispatch routine in the read function
- silence a few traces
- Mouse now works with with ReactOS USB stack + ReactOS HID stack (TBD: implement hidparse.sys)

svn path=/branches/usb-bringup/; revision=54806
2012-01-01 22:48:08 +00:00

83 lines
1.4 KiB
C

#pragma once
#define _HIDPI_
#define _HIDPI_NO_FUNCTION_MACROS_
#define NDEBUG
#include <ntddk.h>
#include <hidport.h>
#include <debug.h>
#include <hubbusif.h>
#include <usbbusif.h>
#include <usbioctl.h>
#include <usb.h>
#include <usbdlib.h>
typedef struct
{
//
// event for completion
//
KEVENT Event;
//
// device descriptor
//
PUSB_DEVICE_DESCRIPTOR DeviceDescriptor;
//
// configuration descriptor
//
PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor;
//
// interface information
//
PUSBD_INTERFACE_INFORMATION InterfaceInfo;
//
// configuration handle
//
USBD_CONFIGURATION_HANDLE ConfigurationHandle;
//
// hid descriptor
//
PHID_DESCRIPTOR HidDescriptor;
}HID_USB_DEVICE_EXTENSION, *PHID_USB_DEVICE_EXTENSION;
typedef struct
{
//
// request irp
//
PIRP Irp;
//
// work item
//
PIO_WORKITEM WorkItem;
//
// device object
//
PDEVICE_OBJECT DeviceObject;
}HID_USB_RESET_CONTEXT, *PHID_USB_RESET_CONTEXT;
NTSTATUS
Hid_GetDescriptor(
IN PDEVICE_OBJECT DeviceObject,
IN USHORT UrbFunction,
IN USHORT UrbLength,
IN OUT PVOID *UrbBuffer,
IN OUT PULONG UrbBufferLength,
IN UCHAR DescriptorType,
IN UCHAR Index,
IN USHORT LanguageIndex);
NTSTATUS
Hid_DispatchUrb(
IN PDEVICE_OBJECT DeviceObject,
IN PURB Urb);