mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 21:41:39 +00:00

- We proudly merge the first charge of the usb-bringup branch. We do want to stress hardware support is still under heavy development and testing in real hardware is experimental - Merge the Human Interface Device Stack(HID) which is used for mice / keyboards and other devices which use the USB interface, consisting of hidusb, hidparse, hidclass, mouhid, kbdhid - Merge the composite driver, supports USB composite devices, laid out in usbccgp - Merge the generic hub driver, which supports the USB root hub and in future USB hubs. Driver is usbhub - Merge the Open Host Controller Interface driver (ohci) - Merge the Enhanced Host Controller Interface driver (ehci) - Merge the many fixes in other areas of ReactOS needed for USB to work (ntoskrnl, pci, inf, umpnpmgr, usetup) - Special thanks goes the Haiku team, whose excellent code has provided a great base for the development of the new ReactOS USB / HID stack - The development of the USB stack has shown the great potential when ReactOS developers team up together to achieve a common goal. The involved developers are here, listed alphabetically: Alex Ionescu Amine Khaldi Cameron Gutman Johannes Anderwald Michel Martin Thomas Faber Thomas Lotz(Haiku) Let's start the ReactOS revolution svn path=/trunk/; revision=55555
88 lines
1.5 KiB
C
88 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
|
|
|