1 串口打印出的通信数据
- HID 鼠标类
====== 测试 USB =======
ID = 0x1012
=== suspend_isr ===
=== reset_isr ===
=== endpoint0_out_isr ===
Receive 8 byte data :
0x80 0x06 0x00 0x01 0x00 0x00 0x40 0x00
Trans SUCCESS!
Setup Pack
Dir: Device -> Host : Receiver: device
Std Request: GET_DESCRIPTOR: Descriptor index: 0
DEVICE_DESCRIPTOR: -> Request length: 64
Send length: 18
Write 16 Byte to edpindex 1 : 0x12 0x01 0x10 0x01 0x00 0x00
0x00 0x10 0x88 0x88 0x77 0x77 0x66 0x66 0x01 0x02
=== endpoint0_in_isr ===
Write 2 Byte to edpindex 1 : 0x03 0x01
=== endpoint0_out_isr ===
Receive 0 byte data :
Trans ERROR!
Common Pack
=== reset_isr ===
=== endpoint0_out_isr ===
Receive 8 byte data :
0x00 0x05 0x25 0x00 0x00 0x00 0x00 0x00
Trans SUCCESS!
Setup Pack
Dir: Host -> Device : Receiver: device
Std Request: SET_ADDRESS: 37
Write 0 Byte to edpindex 1 :
=== endpoint0_in_isr ===
=== endpoint0_out_isr ===
Receive 8 byte data :
0x80 0x06 0x00 0x01 0x00 0x00 0x12 0x00
Trans SUCCESS!
Setup Pack
Dir: Device -> Host : Receiver: device
Std Request: GET_DESCRIPTOR: Descriptor index: 0
DEVICE_DESCRIPTOR: -> Request length: 18
Send length: 18
Write 16 Byte to edpindex 1 : 0x12 0x01 0x10 0x01 0x00 0x00
0x00 0x10 0x88 0x88 0x77 0x77 0x66 0x66 0x01 0x02
=== endpoint0_in_isr ===
Write 2 Byte to edpindex 1 : 0x03 0x01
=== endpoint0_in_isr ===
=== endpoint0_out_isr ===
Receive 8 byte data :
0x80 0x06 0x00 0x02 0x00 0x00 0xff 0x00
Trans SUCCESS!
Setup Pack
Dir: Device -> Host : Receiver: device
Std Request: GET_DESCRIPTOR: Descriptor index: 0
CONFIGURATION_DESCRIPTOR: ->
Request length: 255
Send length: 34
Write 16 Byte to edpindex 1 : 0x09 0x02 0x22 0x00 0x01 0x01
0x00 0x80 0xc8 0x09 0x04 0x00 0x00 0x01 0x03 0x01
=== endpoint0_in_isr ===
Write 16 Byte to edpindex 1 : 0x02 0x00 0x09 0x21 0x10 0x01
0x21 0x01 0x22 0x32 0x00 0x07 0x05 0x81 0x03 0x10
=== endpoint0_in_isr ===
Write 2 Byte to edpindex 1 : 0x00 0x0a
=== endpoint0_in_isr ===
=== endpoint0_out_isr ===
Receive 8 byte data :
0x80 0x06 0x03 0x03 0x09 0x04 0xff 0x00
Trans SUCCESS!
Setup Pack
Dir: Device -> Host : Receiver: device
Std Request: GET_DESCRIPTOR: Descriptor index: 3
STRING_DESCRIPTOR: -> 3 Device Serial Num: Request length: 255
Send length: 22
Write 16 Byte to edpindex 1 : 0x16 0x03 0x33 0x00 0x2d 0x00
0xbe 0x8b 0x07 0x59 0x8f 0x5e 0x17 0x52 0xf7 0x53
=== endpoint0_in_isr ===
Write 6 Byte to edpindex 1 : 0x57 0x5b 0x26 0x7b 0x32 0x4e
=== endpoint0_in_isr ===
=== endpoint0_out_isr ===
Receive 8 byte data :
0x80 0x06 0x00 0x03 0x00 0x00 0xff 0x00
Trans SUCCESS!
Setup Pack
Dir: Device -> Host : Receiver: device
Std Request: GET_DESCRIPTOR: Descriptor index: 0
STRING_DESCRIPTOR: -> 0 Language ID Desc:
Request length: 255
Send length: 4
Write 4 Byte to edpindex 1 : 0x04 0x03 0x09 0x04
=== endpoint0_in_isr ===
=== endpoint0_out_isr ===
Receive 8 byte data :
0x80 0x06 0x02 0x03 0x09 0x04 0xff 0x00
Trans SUCCESS!
Setup Pack
Dir: Device -> Host : Receiver: device
Std Request: GET_DESCRIPTOR: Descriptor index: 2
STRING_DESCRIPTOR: -> 2 Product String:Request length: 255
Send length: 20
Write 16 Byte to edpindex 1 : 0x14 0x03 0x32 0x00 0x2d 0x00
0xa7 0x4e 0xc1 0x54 0xcf 0x63 0xf0 0x8f 0x57 0x5b
=== endpoint0_in_isr ===
Write 4 Byte to edpindex 1 : 0x26 0x7b 0x32 0x4e
=== endpoint0_in_isr ===
=== endpoint0_out_isr ===
Receive 0 byte data :
Trans SUCCESS!
Common Pack
=== endpoint0_out_isr ===
Receive 8 byte data :
0x80 0x06 0x00 0x02 0x00 0x00 0x09 0x00
Trans SUCCESS!
Setup Pack
Dir: Device -> Host : Receiver: device
Std Request: GET_DESCRIPTOR: Descriptor index: 0
CONFIGURATION_DESCRIPTOR: ->
Request length: 9
Send length: 9
Write 9 Byte to edpindex 1 : 0x09 0x02 0x22 0x00 0x01 0x01 0x00 0x80 0xc8
=== endpoint0_in_isr ===
=== endpoint0_out_isr ===
Receive 8 byte data :
0x80 0x06 0x00 0x02 0x00 0x00 0x22 0x00
Trans SUCCESS!
Setup Pack
Dir: Device -> Host : Receiver: device
Std Request: GET_DESCRIPTOR: Descriptor index: 0
CONFIGURATION_DESCRIPTOR: ->
Request length: 34
Send length: 34
Write 16 Byte to edpindex 1 : 0x09 0x02 0x22 0x00 0x01 0x01
0x00 0x80 0xc8 0x09 0x04 0x00 0x00 0x01 0x03 0x01
=== endpoint0_in_isr ===
Write 16 Byte to edpindex 1 : 0x02 0x00 0x09 0x21 0x10 0x01
0x21 0x01 0x22 0x32 0x00 0x07 0x05 0x81 0x03 0x10
=== endpoint0_in_isr ===
Write 2 Byte to edpindex 1 : 0x00 0x0a
=== endpoint0_in_isr ===
=== endpoint0_out_isr ===
Receive 0 byte data :
Trans ERROR!
Common Pack
=== reset_isr ===
=== endpoint0_out_isr ===
Receive 8 byte data :
0x80 0x06 0x00 0x01 0x00 0x00 0x40 0x00
Trans SUCCESS!
Setup Pack
Dir: Device -> Host : Receiver: device
Std Request: GET_DESCRIPTOR: Descriptor index: 0
DEVICE_DESCRIPTOR: -> Request length: 64
Send length: 18
Write 16 Byte to edpindex 1 : 0x12 0x01 0x10 0x01 0x00 0x00
0x00 0x10 0x88 0x88 0x77 0x77 0x66 0x66 0x01 0x02
=== endpoint0_in_isr ===
Write 2 Byte to edpindex 1 : 0x03 0x01
=== endpoint0_out_isr ===
Receive 0 byte data :
Trans ERROR!
Common Pack
=== reset_isr ===
=== endpoint0_out_isr ===
Receive 8 byte data :
0x00 0x05 0x26 0x00 0x00 0x00 0x00 0x00
Trans SUCCESS!
Setup Pack
Dir: Host -> Device : Receiver: device
Std Request: SET_ADDRESS: 38
Write 0 Byte to edpindex 1 :
=== endpoint0_in_isr ===
=== endpoint0_out_isr ===
Receive 8 byte data :
0x80 0x06 0x00 0x01 0x00 0x00 0x12 0x00
Trans SUCCESS!
Setup Pack
Dir: Device -> Host : Receiver: device
Std Request: GET_DESCRIPTOR: Descriptor index: 0
DEVICE_DESCRIPTOR: -> Request length: 18
Send length: 18
Write 16 Byte to edpindex 1 : 0x12 0x01 0x10 0x01 0x00 0x00
0x00 0x10 0x88 0x88 0x77 0x77 0x66 0x66 0x01 0x02
=== endpoint0_in_isr ===
Write 2 Byte to edpindex 1 : 0x03 0x01
=== endpoint0_in_isr ===
=== endpoint0_out_isr ===
Receive 8 byte data :
0x80 0x06 0x00 0x02 0x00 0x00 0xff 0x00
Trans SUCCESS!
Setup Pack
Dir: Device -> Host : Receiver: device
Std Request: GET_DESCRIPTOR: Descriptor index: 0
CONFIGURATION_DESCRIPTOR: ->
Request length: 255
Send length: 34
Write 16 Byte to edpindex 1 : 0x09 0x02 0x22 0x00 0x01 0x01
0x00 0x80 0xc8 0x09 0x04 0x00 0x00 0x01 0x03 0x01
=== endpoint0_in_isr ===
Write 16 Byte to edpindex 1 : 0x02 0x00 0x09 0x21 0x10 0x01
0x21 0x01 0x22 0x32 0x00 0x07 0x05 0x81 0x03 0x10
=== endpoint0_in_isr ===
Write 2 Byte to edpindex 1 : 0x00 0x0a
=== endpoint0_in_isr ===
=== endpoint0_out_isr ===
Receive 8 byte data :
0x80 0x06 0x03 0x03 0x09 0x04 0xff 0x00
Trans SUCCESS!
Setup Pack
Dir: Device -> Host : Receiver: device
Std Request: GET_DESCRIPTOR: Descriptor index: 3
STRING_DESCRIPTOR: -> 3 Device Serial Num: Request length: 255
Send length: 22
Write 16 Byte to edpindex 1 : 0x16 0x03 0x33 0x00 0x2d 0x00
0xbe 0x8b 0x07 0x59 0x8f 0x5e 0x17 0x52 0xf7 0x53
=== endpoint0_in_isr ===
Write 6 Byte to edpindex 1 : 0x57 0x5b 0x26 0x7b 0x32 0x4e
=== endpoint0_in_isr ===
=== endpoint0_out_isr ===
Receive 8 byte data :
0x80 0x06 0x00 0x03 0x00 0x00 0xff 0x00
Trans SUCCESS!
Setup Pack
Dir: Device -> Host : Receiver: device
Std Request: GET_DESCRIPTOR: Descriptor index: 0
STRING_DESCRIPTOR: -> 0 Language ID Desc:
Request length: 255
Send length: 4
Write 4 Byte to edpindex 1 : 0x04 0x03 0x09 0x04
=== endpoint0_in_isr ===
=== endpoint0_out_isr ===
Receive 8 byte data :
0x80 0x06 0x02 0x03 0x09 0x04 0xff 0x00
Trans SUCCESS!
Setup Pack
Dir: Device -> Host : Receiver: device
Std Request: GET_DESCRIPTOR: Descriptor index: 2
STRING_DESCRIPTOR: -> 2 Product String:Request length: 255
Send length: 20
Write 16 Byte to edpindex 1 : 0x14 0x03 0x32 0x00 0x2d 0x00
0xa7 0x4e 0xc1 0x54 0xcf 0x63 0xf0 0x8f 0x57 0x5b
=== endpoint0_in_isr ===
Write 4 Byte to edpindex 1 : 0x26 0x7b 0x32 0x4e
=== endpoint0_in_isr ===
=== endpoint0_out_isr ===
Receive 8 byte data :
0x80 0x06 0x00 0x01 0x00 0x00 0x12 0x00
Trans SUCCESS!
Setup Pack
Dir: Device -> Host : Receiver: device
Std Request: GET_DESCRIPTOR: Descriptor index: 0
DEVICE_DESCRIPTOR: -> Request length: 18
Send length: 18
Write 16 Byte to edpindex 1 : 0x12 0x01 0x10 0x01 0x00 0x00
0x00 0x10 0x88 0x88 0x77 0x77 0x66 0x66 0x01 0x02
=== endpoint0_in_isr ===
Write 2 Byte to edpindex 1 : 0x03 0x01
=== endpoint0_in_isr ===
=== endpoint0_out_isr ===
Receive 8 byte data :
0x80 0x06 0x00 0x02 0x00 0x00 0x09 0x00
Trans SUCCESS!
Setup Pack
Dir: Device -> Host : Receiver: device
Std Request: GET_DESCRIPTOR: Descriptor index: 0
CONFIGURATION_DESCRIPTOR: ->
Request length: 9
Send length: 9
Write 9 Byte to edpindex 1 : 0x09 0x02 0x22 0x00 0x01 0x01
0x00 0x80 0xc8
=== endpoint0_in_isr ===
=== endpoint0_out_isr ===
Receive 8 byte data :
0x80 0x06 0x00 0x02 0x00 0x00 0x22 0x00
Trans SUCCESS!
Setup Pack
Dir: Device -> Host : Receiver: device
Std Request: GET_DESCRIPTOR: Descriptor index: 0
CONFIGURATION_DESCRIPTOR: ->
Request length: 34
Send length: 34
Write 16 Byte to edpindex 1 : 0x09 0x02 0x22 0x00 0x01 0x01
0x00 0x80 0xc8 0x09 0x04 0x00 0x00 0x01 0x03 0x01
=== endpoint0_in_isr ===
Write 16 Byte to edpindex 1 : 0x02 0x00 0x09 0x21 0x10 0x01
0x21 0x01 0x22 0x32 0x00 0x07 0x05 0x81 0x03 0x10
=== endpoint0_in_isr ===
Write 2 Byte to edpindex 1 : 0x00 0x0a
=== endpoint0_in_isr ===
=== endpoint0_out_isr ===
Receive 8 byte data :
0x00 0x09 0x01 0x00 0x00 0x00 0x00 0x00
Trans SUCCESS!
Setup Pack
Dir: Host -> Device : Receiver: device
Std Request: SET_CONFIGURATION: 1
Write 0 Byte to edpindex 1 :
=== endpoint0_in_isr ===
=== endpoint0_out_isr ===
Receive 8 byte data :
0x21 0x0a 0x00 0x00 0x00 0x00 0x00 0x00
Trans SUCCESS!
Setup Pack
Dir: Host -> Device : Receiver: interface
Class Request:
=== endpoint0_out_isr ===
Receive 8 byte data :
0x81 0x06 0x00 0x22 0x00 0x00 0x72 0x00
Trans SUCCESS!
Setup Pack
Dir: Device -> Host : Receiver: interface
Std Request: GET_DESCRIPTOR: Descriptor index: 0
Other Descriptor: 0x22
Request length: 114 Byte
Send length: 50
Write 16 Byte to edpindex 1 : 0x05 0x01 0x09 0x02 0xa1 0x01
0x09 0x01 0xa1 0x00 0x05 0x09 0x19 0x01 0x29 0x03
=== endpoint0_in_isr ===
Write 16 Byte to edpindex 1 : 0x15 0x00 0x25 0x01 0x95 0x03
0x75 0x01 0x81 0x02 0x75 0x05 0x95 0x01 0x81 0x03
=== endpoint0_in_isr ===
Write 16 Byte to edpindex 1 : 0x05 0x01 0x09 0x30 0x09 0x31
0x15 0x81 0x25 0x7f 0x95 0x02 0x75 0x08 0x81 0x06
=== endpoint0_in_isr ===
Write 2 Byte to edpindex 1 : 0xc0 0xc0
=== endpoint0_in_isr ===
=== endpoint0_out_isr ===
Receive 0 byte data :
Trans SUCCESS!
Common Pack
// 鼠标向上移动按钮
Write 3 Byte to edpindex 3 : 0x00 0x00 0xce
=== endpoint1_in_isr ===
Write 3 Byte to edpindex 3 : 0x00 0x00 0x00
=== endpoint1_in_isr ===
// 鼠标向右移动按钮
Write 3 Byte to edpindex 3 : 0x00 0x32 0x00
=== endpoint1_in_isr ===
Write 3 Byte to edpindex 3 : 0x00 0x00 0x00
=== endpoint1_in_isr ===
来源:CSDN
作者:一角残叶
链接:https://blog.csdn.net/u012292754/article/details/103804730