Re: USB HID Telephony Device

作者 misteryao 於 2017年07月07日 16:15:37
再請教一下,因為我不需要Volume,因此我拿掉了,HID Descriptor 修改成下面這樣,但就認不出裝置了,請問改的這個Descriptor 有不合理的地方嗎?
udi_hid_telephony_report_desc_t udi_hid_kbd_report_desc = {
{
0x05, 0x0B, /*USAGE_PAGE (Telephony Devices)*/
0x09, 0x01, /*USAGE (Phone)*/
0xA1, 0x01, /*COLLECTION (Application)*/
0x09, 0x06, /*USAGE (Telephony Key Pad)*/
0xA1, 0x02, /*COLLECTION (Logical)*/
0x19, 0xB0, /*USAGE_MINIMUM (Phone Key 0)*/
0x29, 0xBB, /*USAGE_MAXIMUM (Phone Key Pound)*/
0x15, 0x00, /*LOGICAL_MINIMUM (0)*/
0x25, 0x0C, /*LOGICAL_MAXIMUM (12)*/
0x75, 0x04, /*REPORT_SIZE (4)*/
0x95, 0x01, /*REPORT_COUNT (1)*/
0x81, 0x00, /*INPUT (Data,Ary,Abs)*/
0xC0, /*END_COLLECTION*/
//HOOK SWITCH
0x09, 0x20, /*USAGE (Hook Switch)*/
0x15, 0x00, /*LOGICAL_MINIMUM (0)*/
0x25, 0x01, /*LOGICAL_MAXIMUM (1)*/
0x75, 0x01, /*REPORT_SIZE (1)*/
0x95, 0x01, /*REPORT_COUNT (1)*/
0x81, 0x02, /*INPUT (Data,Var,Abs)*/
0x09, 0x20, /*USAGE (Hook Switch)*/
0x15, 0x00, /*LOGICAL_MINIMUM (0)*/
0x25, 0x01, /*LOGICAL_MAXIMUM (1)*/
0x75, 0x01, /*REPORT_SIZE (1)*/
0x95, 0x01, /*REPORT_COUNT (1)*/
0xB1, 0x02, /*FEATURE (Data,Var,Abs)*/
//PAD
0x75, 0x01, /*REPORT_SIZE (1)*/
0x95, 0x01, /*REPORT_COUNT (1)*/
0x81, 0x03, /*INPUT (Cnst,Var,Abs)*/
0x95, 0x07, /*REPORT_COUNT (7)*/
0x75, 0x01, /*REPORT_SIZE (1)*/
0xB1, 0x07, /*FEATURE (Cnst,Var,Rel)*/
0xC0 /*END_COLLECTION*/
}
};

來自: http://www.microchip.com.tw/newbb/viewtopic.php?forum=7&topic_id=21078&post_id=75864