reactos/drivers/hid/hidusb/hidusb.h
Hermès Bélusca-Maïto e1ef078741 Create this branch to work on loading of different Kernel-Debugger DLL providers, and see whether it is possible to move KDBG from ntoskrnl to a new DLL called, say, KDROSDBG.DLL.
The idea then would be to have the following behaviour (when specifying the following options in the kernel command line):

/DEBUGPORT=COMi --> load KDCOM.DLL and use COMi port (i == 1,2,3,4) if possible.
/DEBUGPORT=FOO  --> load KDFOO.DLL (useful for KDUSB.DLL, KD1394.DLL, KDBAZIS.DLL for VirtualKD, etc...)
/DEBUGPORT=ROSDBG:[COMi|SCREEN|FILE|GDB|...] --> load KDROSDBG.DLL which contains the ROS kernel debugger, and use COMi or SCREEN or... as output port.

svn path=/branches/kd++/; revision=58883
2013-04-28 13:26:45 +00:00

90 lines
1.5 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>
#include <hidport.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);
#define USB_SET_IDLE_REQUEST 0xA
#define USB_GET_PROTOCOL_REQUEST 0x3