ReactOS  0.4.14-dev-1338-g0d187f7
kbdhid.h File Reference
#include <ntddk.h>
#include <hidclass.h>
#include <hidpddi.h>
#include <hidpi.h>
#include <debug.h>
#include <kbdmou.h>
#include <ntddkbd.h>
Include dependency graph for kbdhid.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  KBDHID_DEVICE_EXTENSION
 

Macros

#define _HIDPI_NO_FUNCTION_MACROS_
 
#define NDEBUG
 
#define KEYBOARD_TYPEMATIC_RATE_MINIMUM   2
 
#define KEYBOARD_TYPEMATIC_RATE_MAXIMUM   30
 
#define KEYBOARD_TYPEMATIC_RATE_DEFAULT   30
 
#define KEYBOARD_TYPEMATIC_DELAY_MINIMUM   250
 
#define KEYBOARD_TYPEMATIC_DELAY_MAXIMUM   1000
 
#define KEYBOARD_TYPEMATIC_DELAY_DEFAULT   250
 
#define MICROSOFT_KBD_FUNC   12
 
#define KEYBOARD_TYPE_UNKNOWN   (0x51)
 
#define MICROSOFT_KBD_101_TYPE   0
 
#define KBDHID_TAG   'diHK'
 

Typedefs

typedef struct KBDHID_DEVICE_EXTENSIONPKBDHID_DEVICE_EXTENSION
 

Functions

NTSTATUS KbdHid_InitiateRead (IN PKBDHID_DEVICE_EXTENSION DeviceExtension)
 

Macro Definition Documentation

◆ _HIDPI_NO_FUNCTION_MACROS_

#define _HIDPI_NO_FUNCTION_MACROS_

Definition at line 3 of file kbdhid.h.

◆ KBDHID_TAG

#define KBDHID_TAG   'diHK'

Definition at line 148 of file kbdhid.h.

◆ KEYBOARD_TYPE_UNKNOWN

#define KEYBOARD_TYPE_UNKNOWN   (0x51)

Definition at line 140 of file kbdhid.h.

◆ KEYBOARD_TYPEMATIC_DELAY_DEFAULT

#define KEYBOARD_TYPEMATIC_DELAY_DEFAULT   250

Definition at line 136 of file kbdhid.h.

◆ KEYBOARD_TYPEMATIC_DELAY_MAXIMUM

#define KEYBOARD_TYPEMATIC_DELAY_MAXIMUM   1000

Definition at line 135 of file kbdhid.h.

◆ KEYBOARD_TYPEMATIC_DELAY_MINIMUM

#define KEYBOARD_TYPEMATIC_DELAY_MINIMUM   250

Definition at line 134 of file kbdhid.h.

◆ KEYBOARD_TYPEMATIC_RATE_DEFAULT

#define KEYBOARD_TYPEMATIC_RATE_DEFAULT   30

Definition at line 133 of file kbdhid.h.

◆ KEYBOARD_TYPEMATIC_RATE_MAXIMUM

#define KEYBOARD_TYPEMATIC_RATE_MAXIMUM   30

Definition at line 132 of file kbdhid.h.

◆ KEYBOARD_TYPEMATIC_RATE_MINIMUM

#define KEYBOARD_TYPEMATIC_RATE_MINIMUM   2

Definition at line 131 of file kbdhid.h.

◆ MICROSOFT_KBD_101_TYPE

#define MICROSOFT_KBD_101_TYPE   0

Definition at line 141 of file kbdhid.h.

◆ MICROSOFT_KBD_FUNC

#define MICROSOFT_KBD_FUNC   12

Definition at line 139 of file kbdhid.h.

◆ NDEBUG

#define NDEBUG

Definition at line 8 of file kbdhid.h.

Typedef Documentation

◆ PKBDHID_DEVICE_EXTENSION

Function Documentation

◆ KbdHid_InitiateRead()

NTSTATUS KbdHid_InitiateRead ( IN PKBDHID_DEVICE_EXTENSION  DeviceExtension)

Definition at line 189 of file kbdhid.c.

191 {
192  PIO_STACK_LOCATION IoStack;
194 
195  /* re-use irp */
196  IoReuseIrp(DeviceExtension->Irp, STATUS_SUCCESS);
197 
198  /* init irp */
199  DeviceExtension->Irp->MdlAddress = DeviceExtension->ReportMDL;
200 
201  /* get next stack location */
202  IoStack = IoGetNextIrpStackLocation(DeviceExtension->Irp);
203 
204  /* init stack location */
205  IoStack->Parameters.Read.Length = DeviceExtension->ReportLength;
206  IoStack->Parameters.Read.Key = 0;
207  IoStack->Parameters.Read.ByteOffset.QuadPart = 0LL;
208  IoStack->MajorFunction = IRP_MJ_READ;
209  IoStack->FileObject = DeviceExtension->FileObject;
210 
211  /* set completion routine */
212  IoSetCompletionRoutine(DeviceExtension->Irp, KbdHid_ReadCompletion, DeviceExtension, TRUE, TRUE, TRUE);
213 
214  /* read is active */
215  DeviceExtension->ReadReportActive = TRUE;
216 
217  /* start the read */
218  Status = IoCallDriver(DeviceExtension->NextDeviceObject, DeviceExtension->Irp);
219 
220  /* done */
221  return Status;
222 }
#define TRUE
Definition: types.h:120
#define LL
Definition: tui.h:84
VOID NTAPI IoReuseIrp(IN OUT PIRP Irp, IN NTSTATUS Status)
Definition: irp.c:1971
LONG NTSTATUS
Definition: precomp.h:26
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
Definition: irp.cpp:498
NTSTATUS NTAPI KbdHid_ReadCompletion(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID Context)
Definition: kbdhid.c:97
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2647
Status
Definition: gdiplustypes.h:24
PFILE_OBJECT FileObject
Definition: iotypes.h:2813
NTSTATUS NTAPI IoCallDriver(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: irp.c:1218
#define IRP_MJ_READ
Definition: rdpdr.c:46
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:2772
return STATUS_SUCCESS
Definition: btrfs.c:2938

Referenced by KbdHid_Create(), and KbdHid_ReadCompletion().