用STM32做键盘,鼠标,触摸屏,功能均实现,但当按住键盘的CTRL,SHIFT键时,用BUS HOUND监测到USB在一直发这些键值到PC,且有按住CTRL,SHIFT的功能。。
Bus Hound 6.01 capture on Windows Vista (x86). Complements of www.perisoft.net
Device - Device ID (followed by the endpoint for USB devices)
(23) USB Composite Device
(24) USB Input Device
(25) USB Input Device
(26) USB Input Device
(27) HID-compliant mouse
(28) HID Keyboard Device
(29) HID-compliant mouse
Phase - Phase Type
IN Data in transfer
Data - Hex dump of the data transferred
Descr - Description of the phase
Cmd... - Position in the captured data
刚才发现,如果STM32-2端不接PS2键盘,只单独接USB键盘,按住键盘的CTRL,SHIFT键,没问题,但是如果同时接PS2和USB键盘,就出现上面的现象,
调试发现,STM32-2端同时接PS2和USB键盘,和STM32-2端只接USB键盘,在STM32-2端发送的数据都是一样的,且STM32-1端接收的数据也是一样.
而PC端用BUS HOUND监测到这两种状态的数据却不同,求解,,谢谢。。。BUS HOUND数据如下:
1.STM32-2端只接USB键盘的:
Bus Hound 6.01 capture on Windows Vista (x86). Complements of www.perisoft.net
Device - Device ID (followed by the endpoint for USB devices)
(23) USB Composite Device
(24) USB Input Device
(25) USB Input Device
(26) HID-compliant mouse
(27) HID Keyboard Device
(30) USB Input Device
(31) HID-compliant mouse
(32) Unknown Device
Phase - Phase Type
IN Data in 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.2 IN 01 01 00 00 00 00 00 00 ........ 1.1.0
27 IN 01 00 1d 00 00 00 00 00 ........ 2.1.0
25.2 IN 01 00 00 00 00 00 00 00 ........ 3.1.0
27 IN 01 00 1d 00 01 00 00 00 ........ 4.1.0
25.2 IN 01 00 00 00 00 00 00 00 ........ 5.1.0
25.2 IN 00 00 00 00 00 00 00 00 ........ 6.1.0
25.2 IN 01 00 00 00 1e 00 00 00 ........ 7.1.0
27 IN 01 00 02 00 00 00 00 00 ........ 8.1.0
25.2 IN 00 00 00 00 00 00 00 00 ........ 9.1.0
25.2 IN 01 00 00 00 00 00 00 00 ........ 10.1.0
27 IN 01 00 02 00 01 00 00 00 ........ 11.1.0
2.STM32-2端同时接USB键盘和PS2键盘的
Bus Hound 6.01 capture on Windows Vista (x86). Complements of www.perisoft.net
D
Device - Device ID (followed by the endpoint for USB devices)
(23) USB Composite Device
(24) USB Input Device
(25) USB Input Device
(26) HID-compliant mouse
(27) HID Keyboard Device
(30) USB Input Device
(31) HID-compliant mouse
(32) Unknown Device
Phase - Phase Type
IN Data in 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.2 IN 01 01 00 00 00 00 00 00 ........ 1.1.0(2)
27 IN 01 00 1d 00 00 00 00 00 ........ 2.1.0(2)
25.2 IN 01 00 00 00 00 00 00 00 ........ 3.1.0(2)
27 IN 01 00 1d 00 01 00 00 00 ........ 4.1.0(2)