如题,做了个USB的键盘,WINDOWS下通信一切正常几个LED状态也都能正确得到,到了BIOS里倒是也能识别,也能发按键信息给BIOS,能够识别,但就是LED状态不能识别,接2个键盘,按别的键盘的NUM键,这个USB键盘的LED没反应。而且如果按这个USB键盘的NUM键,BIOS直接卡死。。。BIOS没响应了,但是可以按CTRL+ALT+DEL热重启。。。其他一切都没反应了。。。说明还是有问题,别的USB键盘都没这个问题。。
这是使用的2个报告描述符:
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x06, // USAGE (Keyboard)
0xa1, 0x01, // COLLECTION (Application)
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x08, // REPORT_COUNT (8)
0x05, 0x07, // USAGE_PAGE (Keyboard)(Key Codes)
0x19, 0xe0, // USAGE_MINIMUM (Keyboard LeftControl)(224)
0x29, 0xe7, // USAGE_MAXIMUM (Keyboard Right GUI)(231)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x81, 0x02, // INPUT (Data,Var,Abs) ; Modifier byte
0x95, 0x01, // REPORT_COUNT (1)
0x75, 0x08, // REPORT_SIZE (8)
0x81, 0x03, // INPUT (Cnst,Var,Abs) ; Reserved byte
0x95, 0x05, // REPORT_COUNT (5)
0x75, 0x01, // REPORT_SIZE (1)
0x05, 0x08, // USAGE_PAGE (LEDs)
0x19, 0x01, // USAGE_MINIMUM (Num Lock)
0x29, 0x05, // USAGE_MAXIMUM (Kana)
0x91, 0x02, // OUTPUT (Data,Var,Abs) ; LED report
0x95, 0x01, // REPORT_COUNT (1)
0x75, 0x03, // REPORT_SIZE (3)
0x91, 0x03, // OUTPUT (Cnst,Var,Abs) ; LED report padding
0x95, 0x06, // REPORT_COUNT (6)
0x75, 0x08, // REPORT_SIZE (8)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0xff, // LOGICAL_MAXIMUM (101->0x65),
0x05, 0x07, // USAGE_PAGE (Keyboard)(Key Codes)
0x19, 0x00, // USAGE_MINIMUM (Reserved (no event indicated))(0)
0x29, 0xff, // USAGE_MAXIMUM (Keyboard Application)(101)231->0XE7
0x81, 0x00, // INPUT (Data,Ary,Abs)
0xc0 // END_COLLECTION
第二个:
0x05, 0x01, // USAGE_PAGE (Generic Desktop) //63 1
0x09, 0x06, // USAGE (Keyboard)1
0xa1, 0x01, // COLLECTION (Application)1
0x05, 0x07, // USAGE_PAGE (Keyboard)
0x19, 0xe0, // USAGE_MINIMUM (Keyboard LeftControl)1
0x29, 0xe7, // USAGE_MAXIMUM (Keyboard Right GUI)1
0x15, 0x00, // LOGICAL_MINIMUM (0)1
0x25, 0x01, // LOGICAL_MAXIMUM (1)1
0x75, 0x01, // REPORT_SIZE (1)1
0x95, 0x08, // REPORT_COUNT (8)1
0x81, 0x02, // INPUT (Data,Var,Abs)1
0x95, 0x01, // REPORT_COUNT (1)1
0x75, 0x08, // REPORT_SIZE (8)1
0x81, 0x01, // INPUT (Cnst,Var,Abs) 0x03,手册里是0x01
0x95, 0x05, // REPORT_COUNT (5)
0x75, 0x01, // REPORT_SIZE (1)
0x05, 0x08, // USAGE_PAGE (LEDs)
0x19, 0x01, // USAGE_MINIMUM (Num Lock)
0x29, 0x05, // USAGE_MAXIMUM (Kana)
0x91, 0x02, // OUTPUT (Data,Var,Abs)
0x95, 0x01, // REPORT_COUNT (1)
0x75, 0x03, // REPORT_SIZE (3)
0x91, 0x01, // OUTPUT (Cnst,Var,Abs) 0x03,手册里是0x01
0x95, 0x06, // REPORT_COUNT (6)
0x75, 0x08, // REPORT_SIZE (8)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0xff, // LOGICAL_MAXIMUM (101)
0x05, 0x07, // USAGE_PAGE (Keyboard)
0x19, 0x00, // USAGE_MINIMUM (Reserved (no event indicated))
0x29, 0xff, // USAGE_MAXIMUM (Keyboard Application)
0x81, 0x00, // INPUT (Data,Ary,Abs)
0xc0, // END_COLLECTION
都不行,都会卡死。。
大神看看是哪里的问题。。
一周热门 更多>