你的INPUT 和OUTPUT定义的有问题,定义成const,如何通信呢?
试试这样:
INPUT (Data,Array,Abs)
OUTPUT (Data,Array,Abs)
HID Descriptor Tool其实无法生成有些自定义描述符,我这里给出一个我自己用过的:
uint8_t ReportDescriptor[] ={
0x06, 0x00,0xFF, // USAGE_PAGE(User define)
0x09, 0x01, // USAGE(User define)
0xa1, 0x01, // COLLECTION (Application)
0x09, 0x02, // USAGE(User define)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0xFF, // LOGICAL_MAXIMUM (255)
0x75, 0x08, // REPORT_SIZE (8)
0x95, 0x01, // REPORT_COUNT (1)
0x81, 0x02, // INPUT (Data,Array,Abs)
0x09, 0x03, // USAGE(User define)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0xFF, // LOGICAL_MAXIMUM (255)
0x95, 0x08, // REPORT_COUNT (8)
0x75, 0x01, // REPORT_SIZE (1)
0x91, 0x02, // OUTPUT (Data,Array,Abs)
0xc0 // END_COLLECTION
}; /* ReportDescriptor */ |