mirror of
https://github.com/reactos/reactos.git
synced 2025-04-05 05:01:03 +00:00
[USB-BRINGUP]
- Partly implement IRP_MN_START_DEVICE for PDO - PDO now completely initializes - Remaining IOCTL to implement IRP_MJ_CREATE, IRP_MJ_CLOSE, IRP_MJ_FLUSH, IRP_MJ_READ for partial mouse support in hidclass svn path=/branches/usb-bringup/; revision=54792
This commit is contained in:
parent
a64411cfbf
commit
d5ab604853
3 changed files with 32 additions and 6 deletions
|
@ -128,6 +128,8 @@ HidClass_Create(
|
|||
{
|
||||
UNIMPLEMENTED
|
||||
ASSERT(FALSE);
|
||||
Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED;
|
||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
@ -139,6 +141,8 @@ HidClass_Close(
|
|||
{
|
||||
UNIMPLEMENTED
|
||||
ASSERT(FALSE);
|
||||
Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED;
|
||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
@ -150,6 +154,8 @@ HidClass_Read(
|
|||
{
|
||||
UNIMPLEMENTED
|
||||
ASSERT(FALSE);
|
||||
Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED;
|
||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
@ -161,6 +167,8 @@ HidClass_Write(
|
|||
{
|
||||
UNIMPLEMENTED
|
||||
ASSERT(FALSE);
|
||||
Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED;
|
||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
|
|
@ -422,13 +422,27 @@ HidClassPDO_PnP(
|
|||
}
|
||||
case IRP_MN_START_DEVICE:
|
||||
{
|
||||
DPRINT1("[HIDCLASS] PDO PnP not implemented %x\n", IoStack->MinorFunction);
|
||||
ASSERT(FALSE);
|
||||
//
|
||||
// FIXME: support polled devices
|
||||
//
|
||||
ASSERT(PDODeviceExtension->Common.DriverExtension->DevicesArePolled == FALSE);
|
||||
|
||||
//
|
||||
// do nothing
|
||||
// now register the device interface
|
||||
//
|
||||
Status = IoRegisterDeviceInterface(PDODeviceExtension->Common.HidDeviceExtension.PhysicalDeviceObject, &GUID_DEVINTERFACE_HID, NULL, &PDODeviceExtension->DeviceInterface);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
//
|
||||
// enable device interface
|
||||
//
|
||||
Status = IoSetDeviceInterfaceState(&PDODeviceExtension->DeviceInterface, TRUE);
|
||||
}
|
||||
ASSERT(Status == STATUS_SUCCESS);
|
||||
|
||||
//
|
||||
// break
|
||||
//
|
||||
Status = Irp->IoStatus.Status;
|
||||
break;
|
||||
}
|
||||
case IRP_MN_REMOVE_DEVICE:
|
||||
|
@ -528,7 +542,7 @@ HidClassPDO_CreatePDO(
|
|||
//
|
||||
PDODeviceExtension->Common.HidDeviceExtension.MiniDeviceExtension = FDODeviceExtension->Common.HidDeviceExtension.MiniDeviceExtension;
|
||||
PDODeviceExtension->Common.HidDeviceExtension.NextDeviceObject = FDODeviceExtension->Common.HidDeviceExtension.NextDeviceObject;
|
||||
PDODeviceExtension->Common.HidDeviceExtension.PhysicalDeviceObject = NULL;
|
||||
PDODeviceExtension->Common.HidDeviceExtension.PhysicalDeviceObject = FDODeviceExtension->Common.HidDeviceExtension.PhysicalDeviceObject;
|
||||
PDODeviceExtension->Common.IsFDO = FALSE;
|
||||
PDODeviceExtension->Common.DriverExtension = FDODeviceExtension->Common.DriverExtension;
|
||||
RtlCopyMemory(&PDODeviceExtension->Attributes, &FDODeviceExtension->Attributes, sizeof(HID_DEVICE_ATTRIBUTES));
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
#define _HIDPI_NO_FUNCTION_MACROS_
|
||||
#include <ntddk.h>
|
||||
#include <initguid.h>
|
||||
#include <hidport.h>
|
||||
#include <hidpddi.h>
|
||||
#include <stdio.h>
|
||||
#include <initguid.h>
|
||||
#include <wdmguid.h>
|
||||
#include <debug.h>
|
||||
|
||||
|
@ -108,6 +108,10 @@ typedef struct
|
|||
//
|
||||
ULONG CollectionIndex;
|
||||
|
||||
//
|
||||
// device interface
|
||||
//
|
||||
UNICODE_STRING DeviceInterface;
|
||||
}HIDCLASS_PDO_DEVICE_EXTENSION, *PHIDCLASS_PDO_DEVICE_EXTENSION;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue