开发者

How to use "HID_REPORT_DESCRIPTOR" in Delphi

I have one HID_REPORT_DESCRIPTOR structure, How I can use this structure in Delphi 2010. I will copy here the full structure.

const unsigned char HID_REPORT_DESCRIPTOR[] =
{
    0x05,0x01,  //Usage Page (Generic Desktop Control)  
    0x09,0x02,  //Usage (Mouse) 
    0xA1,0x01,  //Collection (Application) 
        0x09,0x20,  //Usage (Stylus) 
        0xA1,0x00,  //Collection (Physical)
            0x15,0x00,  //Logical Minimum (0) 
            0x25,0x01,  //Logical Maximum (1)       
            0x75,0x01,  //Report Size (1) 
            0x95,0x01,  //Report Count (1)

            0x09,0x42,  //Usage (Tip SW) 
            0x81,0x02,  //Input (Data, Variable, Absolute)          
            0x09,0x44,  //Usage (Barrel SW) 
            0x81,0x02,  //Input (Data, Variable, Absolute)          
            0x09,0x32,  //Usage (In Range) 
            0x81,0x02,  //Input (Data, Variable, Absolute)          

            0x05,0x09,  //Usage Page (Buttons)          
            0x09,0x01,  //Usage (Button1)
            0x81,0x02,  //Input (Data, Variable, Absolute)
            0x09,0x02,  //Usage (Button2)
            0x81,0x02,  //Input (Data, Variable, Absolute)
            0x09,0x03,  //Usage (Button3)
            0x81,0x02,  //Input (Data, Variable, Absolute)
            0x09,0x04,  //Usage (Button4)
            0x81,0x02,  //Input (Data, Variable, Absolute)
            0x09,0x05,  //Usage (Button5)
            0x81,0x02,  //Input (Data, Variable, Absolute)

            0x05,0x01,  //Usage Page (Generic Desktop Control) 
            0x09,0x30,  //Usage (X)             
            0x65,0x13,  //Unit (inch)
            0x55,0xFD,  //Unit Exponent(-3) = 1000 lpi
            0x35,0x00,  //Physical Minimum (0) 
            0x46,0xF8,0x2A, //Physical Maximum (0x2AF8) 
            0x26,0xF8,0x2A, //Logical Maximum (0x2AF8)  = 11000         
            0x75,0x10,  //Report Size (16)
            0x81,开发者_如何学编程0x02,  //Input (Data, Variable, Absolute)          

            0x09,0x31,  //Usage (Y) 
            // for A4 size (default)
            0x46,0x3A,0x20, //Physical Maximum (0x203A)
            0x26,0x3A,0x20, //Logical Maximum (0x203A) = 8250           
            // for LETTER size
        //  0x46,0x34,0x21, //Physical Maximum (0x2134)
        //  0x26,0x34,0x21, //Logical Maximum (0x2134) = 8500           
            0x81,0x02,  //Input (Data, Variable, Absolute)

        0xC0,   //End Collection            
    0xC0    //End Collection    
};

How I can use this structure in my HID Device. I got this structure from My HID Device vendor. Please give me more details about this structure. Thanks All


const
  HID_REPORT_DESCRIPTOR: array[ <fill in length> ] of Byte = (
    $05, $01,
    $09, $02,
    ....
  );
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜