Reactos
1/*
2 * PROJECT: ReactOS Universal Serial Bus Bulk Enhanced Host Controller Interface
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: drivers/usb/hidparse/hidparse.c
5 * PURPOSE: HID Parser
6 * PROGRAMMERS:
7 * Michael Martin (michael.martin@reactos.org)
8 * Johannes Anderwald (johannes.anderwald@reactos.org)
9 */
10
11#include "hidparse.h"
12#include "hidp.h"
13
14#define NDEBUG
15#include <debug.h>
16
17PVOID
18NTAPI
19AllocFunction(
20 IN ULONG ItemSize)
21{
22 PVOID Item = ExAllocatePoolWithTag(NonPagedPool, ItemSize, HIDPARSE_TAG);
23 if (Item)
24 {
25 //
26 // zero item
27 //
28 RtlZeroMemory(Item, ItemSize);
29 }
30
31 //
32 // done
33 //
34 return Item;
35}
36
37VOID
38NTAPI
39FreeFunction(
40 IN PVOID Item)
41{
42 //
43 // free item
44 //
45 ExFreePoolWithTag(Item, HIDPARSE_TAG);
46}
47
48VOID
49NTAPI
50ZeroFunction(
51 IN PVOID Item,
52 IN ULONG ItemSize)
53{
54 //
55 // zero item
56 //
57 RtlZeroMemory(Item, ItemSize);
58}
59
60VOID
61NTAPI
62CopyFunction(
63 IN PVOID Target,
64 IN PVOID Source,
65 IN ULONG Length)
66{
67 //
68 // copy item
69 //
70 RtlCopyMemory(Target, Source, Length);
71}
72
73VOID
74__cdecl
75DebugFunction(
76 IN LPCSTR FormatStr, ...)
77{
78#if HID_DBG
79 va_list args;
80 char printbuffer[1024];
81
82 va_start(args, FormatStr);
83 vsprintf(printbuffer, FormatStr, args);
84 va_end(args);
85
86 DbgPrint(printbuffer);
87#endif
88}
89
90NTSTATUS
91NTAPI
92DriverEntry(
93 IN PDRIVER_OBJECT DriverObject,
94 IN PUNICODE_STRING RegPath)
95{
96 DPRINT("********* HID PARSE *********\n");
97 return STATUS_SUCCESS;
98}