<commit_before>/*++
 
Copyright (C) Microsoft Corporation, All Rights Reserved.

Module Name:

    Queue.cpp

Abstract:

    This module contains the implementation of the driver's
    queue callback object.

Environment:

   Windows User-Mode Driver Framework (WUDF)

--*/

#include "internal.h"
#include "winioctl.h"
#include "queue.h"

#if defined(EVENT_TRACING)
#include "queue.tmh"
#endif


//
// This is the default report descriptor for the virtual Hid device returned
// by the mini driver in response to IOCTL_HID_GET_REPORT_DESCRIPTOR.
//
HID_REPORT_DESCRIPTOR           G_DefaultReportDescriptor[] = {
    0x06,0x00, 0xFF,                // USAGE_PAGE (Vender Defined Usage Page)
    0x09,0x01,                      // USAGE (Vendor Usage 0x01)
    0xA1,0x01,                      // COLLECTION (Application)
    0x85,CONTROL_FEATURE_REPORT_ID,    // REPORT_ID (1)
    0x09,0x01,                         // USAGE (Vendor Usage 0x01)
    0x15,0x00,                         // LOGICAL_MINIMUM(0)
    0x26,0xff, 0x00,                   // LOGICAL_MAXIMUM(255)
    0x75,0x08,                         // REPORT_SIZE (0x08)
    //0x95,FEATURE_REPORT_SIZE_CB,       // REPORT_COUNT 
    0x96,(FEATURE_REPORT_SIZE_CB & 0xff), (FEATURE_REPORT_SIZE_CB >> 8), // REPORT_COUNT 
    0xB1,0x00,                         // FEATURE (Data,Ary,Abs)
    0x09,0x01,                         // USAGE (Vendor Usage 0x01)
    0x75,0x08,                         // REPORT_SIZE (0x08)
    //0x95,INPUT_REPORT_SIZE_CB,       // REPORT_COUNT 
    0x96,(INPUT_REPORT_SIZE_CB & 0xff), (INPUT_REPORT_SIZE_CB >> 8), // REPORT_COUNT 
    0x81,0x00,                         // INPUT (Data,Ary,Abs)
    0x09,0x01,                         // USAGE (Vendor Usage 0x01)
    0x75,0x08,                         // REPORT_SIZE (0x08)
    //0x95,OUTPUT_REPORT_SIZE_CB,      // REPORT_COUNT 
    0x96,(OUTPUT_REPORT_SIZE_CB & 0xff), (OUTPUT_REPORT_SIZE_CB >> 8), // REPORT_COUNT 
    0x91,0x00,                         // OUTPUT (Data,Ary,Abs)
    0xC0,                           // END_COLLECTION
};

//
// This is the default HID descriptor returned by the mini driver
// in response to IOCTL_HID_GET_DEVICE_DESCRIPTOR. The size
// of report descriptor is currently the size of G_DefaultReportDescriptor.
//

HID_DESCRIPTOR              G_DefaultHidDescriptor = {
    0x09,   // length of HID descriptor
    0x21,   // descriptor type == HID  0x21
    0x0100, // hid spec release
    0x00,   // country code == Not Specified
    0x01,   // number of HID class descriptors
    { 0x22,   // report descriptor type 0x22
    sizeof(G_DefaultReportDescriptor) }  // total length of report descriptor
};
<commit_msg>Updated HID report descriptor to be a mouse descriptor<commit_after>/*++
 
Copyright (C) Microsoft Corporation, All Rights Reserved.

Module Name:

    Queue.cpp

Abstract:

    This module contains the implementation of the driver's
    queue callback object.

Environment:

   Windows User-Mode Driver Framework (WUDF)

--*/

#include "internal.h"
#include "winioctl.h"
#include "queue.h"

#if defined(EVENT_TRACING)
#include "queue.tmh"
#endif


//
// This is the default report descriptor for the virtual Hid device returned
// by the mini driver in response to IOCTL_HID_GET_REPORT_DESCRIPTOR.
//
HID_REPORT_DESCRIPTOR           G_DefaultReportDescriptor[] = {
    0x05, 0x01,                      // USAGE_PAGE (Generic Desktop)
    0x09, 0x02,                      // USAGE (MOUSE)
    0xA1, 0x01,                      // COLLECTION (Application)
    0x85, CONTROL_FEATURE_REPORT_ID,    // REPORT_ID (1)
    0x09, 0x01,                         // USAGE (Pointer)
	0xa1, 0x00,                         // COLLECTION (Physical)
	0x05, 0x09,                            // USAGE_PAGE (Button)
	0x19, 0x01,                            // USAGE_MINIMUM (Button 1)
	0x29, 0x03,                            // USAGE_MAXIMUM (Button 3)
	0x15, 0x00,                            // LOGICAL_MINIMUM(0)
	0x25, 0x01,                            // LOGICAL_MAXIMUM(1)
	0x95, 0x03,                            // REPORT_COUNT (3)
	0x75, 0x01,                            // REPORT_SIZE (1)
	0x81, 0x02,                            // INPUT (Data,Var,Abs)
	0x95, 0x01,                            // REPORT_COUNT (1)
	0x75, 0x05,                            // REPORT_SIZE (5)
	0x81, 0x03,                            // INPUT (Cnst,Var,Abs)
	0x05, 0x01,                            // USAGE_PAGE (Generic Desktop)
	0x09, 0x30,                            // USAGE (X)
	0x09, 0x31,                            // USAGE (Y)
	0x15, 0x81,                            // LOGICAL_MINIMUM (-127)
	0x25, 0x7F,                            // LOGICAL_MAXIMUM (127)
	0x75, 0x08,                            // REPORT_SIZE (8)
	0x95, 0x02,                            // REPORT_COUNT (2)
	0x81, 0x06,                            // INPUT (Data,Var,Rel)
	0xC0,                               // END_COLLECTION
	0xC0                             //END_COLLECTION
};

//
// This is the default HID descriptor returned by the mini driver
// in response to IOCTL_HID_GET_DEVICE_DESCRIPTOR. The size
// of report descriptor is currently the size of G_DefaultReportDescriptor.
//
// J^2: Verified codes (http://www.usbmadesimple.co.uk/ums_ms_desc_conf.htm)
//
HID_DESCRIPTOR              G_DefaultHidDescriptor = {
    0x09,   // length of HID descriptor
    0x21,   // descriptor type == HID  0x21
    0x0100, // hid spec release
    0x00,   // country code == Not Specified
    0x01,   // number of HID class descriptors
    { 0x22,   // report descriptor type 0x22
    sizeof(G_DefaultReportDescriptor) }  // total length of report descriptor
};

{'fraction_non_alphanumeric': 0.0948776623833832, 'fraction_numerical': 0.062841049111072, 'mean_word_length': 1.658867571361722, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2279480', 'n_tokens_mistral': 2045, 'n_tokens_neox': 1844, 'n_words': 449}