你好:
我利用avr单片机,主控芯片CH375枚举键盘,发现不能枚举键盘, 我用BUSHOUND查看键盘信息: Bus Hound 6.01 capture on Windows Vista Service Pack 1 (x64). Complements of www.perisoft.net
LXH-EKB-10YA(白色)
Device - Device ID (followed by the endpoint for USB devices) (22) USB 输入设备 (25) USB 输入设备 (26) USB 输入设备 Phase - Phase Type CTL USB control transfer IN Data in transfer OUT Data out transfer Data - Hex dump of the data transferred Descr - Description of the phase Cmd... - Position in the captured data
Device Phase Data Description Cmd.Phase.Ofs(rep) ------ ----- ------------------------ ---------------- ------------------ 25.0 CTL 80 06 00 01 00 00 12 00 GET DESCRIPTOR 1.1.0 25.0 IN 12 01 00 02 00 00 00 08 ........ 1.2.0 ef 17 2d 60 30 01 01 02 ..-`0... 1.2.8 00 01 .. 1.2.16 25.0 CTL 80 06 00 02 00 00 09 00 GET DESCRIPTOR 2.1.0 25.0 IN 09 02 22 00 01 01 00 a0 .."..... 2.2.0 32 2 2.2.8 25.0 CTL 80 06 00 02 00 00 22 00 GET DESCRIPTOR 3.1.0 25.0 IN 09 02 22 00 01 01 00 a0 .."..... 3.2.0 32 09 04 00 00 01 03 01 2....... 3.2.8 01 00 09 21 11 01 00 01 ...!.... 3.2.16 22 41 00 07 05 81 03 08 "A...... 3.2.24 25.0 CTL 00 09 01 00 00 00 00 00 SET CONFIG 4.1.0 25.0 CTL 21 0a 00 00 00 00 00 00 SET IDLE 5.1.0 25.0 CTL 81 06 00 22 00 00 81 00 GET DESCRIPTOR 6.1.0 25.0 IN 05 01 09 06 a1 01 05 07 ........ 6.2.0 19 e0 29 e7 15 00 25 01 ..)...%. 6.2.8 75 01 95 08 81 02 95 01 u....... 6.2.16 75 08 81 01 95 03 75 01 u.....u. 6.2.24 26.0 CTL 80 06 00 01 00 00 12 00 GET DESCRIPTOR 7.1.0 26.0 IN 12 01 00 02 00 00 00 08 ........ 7.2.0 ef 17 2d 60 30 01 01 02 ..-`0... 7.2.8 00 01 .. 7.2.16 26.0 CTL 80 06 00 02 00 00 09 00 GET DESCRIPTOR 8.1.0 26.0 IN 09 02 22 00 01 01 00 a0 .."..... 8.2.0 32 2 8.2.8 26.0 CTL 80 06 00 02 00 00 22 00 GET DESCRIPTOR 9.1.0 26.0 IN 09 02 22 00 01 01 00 a0 .."..... 9.2.0 32 09 04 01 00 01 03 00 2....... 9.2.8 00 00 09 21 11 01 00 01 ...!.... 9.2.16 22 a5 00 07 05 82 03 05 "....... 9.2.24 26.0 CTL 00 09 01 00 00 00 00 00 SET CONFIG 10.1.0 26.0 CTL 21 0a 00 00 01 00 00 00 SET IDLE 11.1.0 26.0 CTL 81 06 00 22 01 00 e5 00 GET DESCRIPTOR 12.1.0 26.0 IN 05 01 09 80 a1 01 85 01 ........ 12.2.0 19 81 29 83 15 00 25 01 ..)...%. 12.2.8 95 03 75 01 81 02 95 05 ..u..... 12.2.16 81 01 c0 06 0c 00 09 01 ........ 12.2.24 25.0 CTL 21 09 00 02 00 00 01 00 SET REPORT 13.1.0 25.0 OUT 00 . 13.2.0
我在用单片机枚举时候发现: 获取设备描述符时候完全一样:12 01 00 02 00 00 00 08 EF 17 2D 60 30 01 01 02 00 01
在获取配置描述符时候:02 3b 00 02 01 00 a0 32 , busHound 22->3b,01->02这两位不一样
程序继续运行,获取的别的描述符,个别也有问题,结果键盘不能枚举 我后来改动这个函数 void get_int_in() { endp6_mode=0x80; toggle_recv(); //UDR1=endp_int; endp_int=0x01; issue_token(( endp_int << 4 ) | DEF_USB_PID_IN);//status=wait_interrupt(); }
直接给endp_int=0x01; 就可以从中断接受到键值,但是这个键值需要按下五六秒才能接到一个,并且中断在不按任何按键时候,也不断接受0X14, 由于最近项目赶时间,利用你们的芯片解析USB键盘,恳求帮忙找下解决方法,