reactos/drivers/hid/mouhid/mouhid.h
Johannes Anderwald b27438e17d [USB-BRINGUP]
- Fix a few bugs & race condition in the read report routine
- mouhid initializes and is able to read input reports
- button press / wheel state change is detected
- mouse move detection not yet working

svn path=/branches/usb-bringup/; revision=54774
2011-12-28 16:35:41 +00:00

117 lines
1.7 KiB
C

#pragma once
#define _HIDPI_NO_FUNCTION_MACROS_
#include <ntddk.h>
#include <hidclass.h>
#include <hidpddi.h>
#include <hidpi.h>
#include <debug.h>
#include <ntddmou.h>
#include <kbdmou.h>
#include <debug.h>
typedef struct
{
//
// lower device object
//
PDEVICE_OBJECT NextDeviceObject;
//
// irp which is used for reading input reports
//
PIRP Irp;
//
// event
//
KEVENT ReadCompletionEvent;
//
// device object for class callback
//
PDEVICE_OBJECT ClassDeviceObject;
//
// class callback
//
PVOID ClassService;
//
// mouse type
//
USHORT MouseIdentifier;
//
// wheel usage page
//
USHORT WheelUsagePage;
//
// usage list length
//
USHORT UsageListLength;
//
// current usage list length
//
PUSAGE CurrentUsageList;
//
// previous usage list
//
PUSAGE PreviousUsageList;
//
// removed usage item list
//
PUSAGE BreakUsageList;
//
// new item usage list
//
PUSAGE MakeUsageList;
//
// preparsed data
//
PVOID PreparsedData;
//
// mdl for reading input report
//
PMDL ReportMDL;
//
// input report buffer
//
PUCHAR Report;
//
// input report length
//
ULONG ReportLength;
//
// file object the device is reading reports from
//
PFILE_OBJECT FileObject;
//
// report read is active
//
UCHAR ReadReportActive;
//
// stop reading flag
//
UCHAR StopReadReport;
}MOUHID_DEVICE_EXTENSION, *PMOUHID_DEVICE_EXTENSION;
NTSTATUS
MouHid_InitiateRead(
IN PMOUHID_DEVICE_EXTENSION DeviceExtension);