/*++

Copyright (c) 2002  Microsoft Corporation

Module Name:

    hiddefs.h

Abstract:

    This module contains the definitions and structures for interfacing with
    Human Interface Devices (HID).

--*/

#ifndef _HIDDEFS_
#define _HIDDEFS_

#include <pshpack1.h>

//
// HID interface subclass codes.
//

#define HID_SUBCLASS_NONE                           0x00
#define HID_SUBCLASS_BOOT                           0x01

//
// HID interface protocol codes.
//

#define HID_PROTOCOL_NONE                           0x00
#define HID_PROTOCOL_KEYBOARD                       0x01
#define HID_PROTOCOL_MOUSE                          0x02

//
// HID class specific request codes.
//

#define HID_REQUEST_GET_REPORT                      0x01
#define HID_REQUEST_GET_IDLE                        0x02
#define HID_REQUEST_GET_PROTOCOL                    0x03
#define HID_REQUEST_SET_REPORT                      0x09
#define HID_REQUEST_SET_IDLE                        0x0A
#define HID_REQUEST_SET_PROTOCOL                    0x0B

//
// HID_REQUEST_SET_PROTOCOL request codes.
//

#define HID_SET_PROTOCOL_BOOT                       0x00
#define HID_SET_PROTOCOL_REPORT                     0x01

//
// Structure for a report generated by a mouse in boot protocol mode.
//

typedef struct _HID_BOOT_MOUSE_REPORT {
    union {
        struct {
            UCHAR Button1 : 1;
            UCHAR Button2 : 1;
            UCHAR Button3 : 1;
            UCHAR DeviceSpecific1 : 5;
        };
        UCHAR Buttons;
    };
    UCHAR DisplacementX;
    UCHAR DisplacementY;
    UCHAR DeviceSpecific2[5];
} HID_BOOT_MOUSE_REPORT, *PHID_BOOT_MOUSE_REPORT;

#include <poppack.h>

#endif  // HIDDEFS
