忘记传HID设备的报告描述符了.
const hid_report_descriptor code HIDREPORTDESC =
{
0x06, 0xA0,0xFF,//用法页(FFA0h, vendor defined)
0x09, 0x01, //用法(vendor defined)
0xa1, 0x01,//集合(Application)
0x09, 0x02,//用法(vendor defined)
0xA1, 0x00,//集合(Physical)
0x06, 0xA1,0xFF,//用法页(vendor defined)
//输入报告
0x09, 0x03 ,//用法(vendor defined)
0x09, 0x04,//用法(vendor defined)
0x15, 0x0,//逻辑最小值(0x80 or -128)
0x25, 0xfF,//逻辑最大值(0x7F or 127)
0x35, 0x00,//物理最小值(0)
0x45,0xFF,//物理最大值(255)
0x75, 0x08,//报告长度Report size (8位)
0x95, 0x20,//报告数值(32 fields)
0x81, 0x02,//输入(data, variable, absolute)
//输出报告
0x09, 0x05,//用法(vendor defined)
0x09, 0x06,//用法(vendor defined)
0x15, 0x00,//逻辑最小值(0x80 or -128)
0x25, 0xfF,//逻辑最大值(0x7F or 127)
0x35, 0x00,//物理最小值(0)
0x45,0xFF,//物理最大值(255)
0x75,0x08,//报告长度(8位)
0x95, 0x08,//报告数值(32 fields)
0x91, 0x02,//输出(data, variable, absolute)
0xC0,//集合结束(Physical)
0xC0//集合结束(Application)
};