/********************************************************************
 * FileName:        mouse_report.c
 * Dependencies:    None
 * Processor:       PIC32F4xx FAMILY
 *
 * Complier:        MPLAB C Compiler for PIC32 v1.04 or later
 *                  MPLAB IDE v8.15 or later
 * Company:         Microchip Technology, Inc.
 *
 * Copyright (c) 2008 Microchip Technology, Inc.
 * Software License Agreement
 *
 * Software License Agreement:
 * The software supplied herewith by Microchip Technology Incorporated
 * (the “Company”) for its PICmicro® Microcontroller is intended and
 * supplied to you, the Company’s customer, for use solely and
 * exclusively on Microchip PICmicro Microcontroller products. The
 * software is owned by the Company and/or its supplier, and is
 * protected under applicable copyright laws. All rights are reserved.
 * Any use in violation of the foregoing restrictions may subject the
 * user to criminal sanctions under applicable laws, as well as to
 * civil liability for the breach of the terms and conditions of this
 * license.
 *
 * THIS SOFTWARE IS PROVIDED IN AN “AS IS” CONDITION. NO WARRANTIES,
 * WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED
 * TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
 * PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT,
 * IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR
 * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
 *
 *********************************************************************
 * File Description:
 *
 * USB Device HID Class
 *
 * Change History:
 * Name         Date            Changes
 ********************************************************************/

#include "usb/hidreport.h"

/**************************************************************************
 * HID Report for a mouse
 **************************************************************************/
// note need to place in RAM
BYTE HIDReport[] = 
{
    mHIDMakeShortPrefix(TAG_USAGE_PAGE,     SIZE_1),        UP_GENERIC_DESKTOP,                 // 2
    mHIDMakeShortPrefix(TAG_USAGE,          SIZE_1),        MOUSE,                              // 4
    mHIDMakeShortPrefix(TAG_COLLECTION,     SIZE_1),        APPLICATION,                        // 6
    mHIDMakeShortPrefix(TAG_USAGE,          SIZE_1),        POINTER,                            // 8
    mHIDMakeShortPrefix(TAG_COLLECTION,     SIZE_1),        PHYSICAL,                           // 10
    mHIDMakeShortPrefix(TAG_USAGE_PAGE,     SIZE_1),        UP_BUTTON,                          // 12
    mHIDMakeShortPrefix(TAG_USAGE_MIN,      SIZE_1),        1,                                  // 14
    mHIDMakeShortPrefix(TAG_USAGE_MAX,      SIZE_1),        3,                                  // 16
    mHIDMakeShortPrefix(TAG_LOGICAL_MIN,    SIZE_1),        0,                                  // 18
    mHIDMakeShortPrefix(TAG_LOGICAL_MAX,    SIZE_1),        1,                                  // 20
    mHIDMakeShortPrefix(TAG_REPORT_COUNT,   SIZE_1),        3,                                  // 22
    mHIDMakeShortPrefix(TAG_REPORT_SIZE,    SIZE_1),        1,                                  // 24
    mHIDMakeShortPrefix(TAG_INPUT,          SIZE_1),        (DATA | VARIABLE | ABSOLUTE),       // 26
    mHIDMakeShortPrefix(TAG_REPORT_COUNT,   SIZE_1),        1,                                  // 28
    mHIDMakeShortPrefix(TAG_REPORT_SIZE,    SIZE_1),        5,                                  // 30
    mHIDMakeShortPrefix(TAG_INPUT,          SIZE_1),        (CONSTANT),                         // 32
    mHIDMakeShortPrefix(TAG_USAGE_PAGE,     SIZE_1),        UP_GENERIC_DESKTOP,                 // 34
    mHIDMakeShortPrefix(TAG_USAGE,          SIZE_1),        X_DV,                               // 36
    mHIDMakeShortPrefix(TAG_USAGE,          SIZE_1),        Y_DV,                               // 38
    mHIDMakeShortPrefix(TAG_LOGICAL_MIN,    SIZE_1),        0x81,                               // 40
    mHIDMakeShortPrefix(TAG_LOGICAL_MAX,    SIZE_1),        0x7F,                               // 42
    mHIDMakeShortPrefix(TAG_REPORT_SIZE,    SIZE_1),        8,                                  // 44
    mHIDMakeShortPrefix(TAG_REPORT_COUNT,   SIZE_1),        2,                                  // 46
    mHIDMakeShortPrefix(TAG_INPUT,          SIZE_1),        (DATA | VARIABLE | RELATIVE),       // 48    
    mHIDMakeShortPrefix(TAG_END_COLLECTION, SIZE_0),                                            // 49
    mHIDMakeShortPrefix(TAG_END_COLLECTION, SIZE_0)                                             // 50

};



const UINT HIDReportSize = (sizeof(HIDReport) / sizeof(BYTE));
