gpt4 book ai didi

delphi - 如何在Delphi中使用 "HID_REPORT_DESCRIPTOR"

转载 作者:行者123 更新时间:2023-12-01 17:46:13 28 4
gpt4 key购买 nike

我有一个 HID_REPORT_DESCRIPTOR 结构,如何在 Delphi 2010 中使用此结构。我将在此处复制完整的结构。

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
};

如何在我的 HID 设备中使用此结构。我从我的 HID 设备供应商处获得了此结构。请给我有关此结构的更多详细信息。谢谢大家

最佳答案

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

关于delphi - 如何在Delphi中使用 "HID_REPORT_DESCRIPTOR",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4992597/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com