- UID
- 1029342
- 性别
- 男
|
1)Index[4 - 5]:表示 USB插入总线复位;
2)Index[7 -8]:表示主机向默认地址发送GET_DESCRIPTOR指令包,详细信
息也抓出来了,如(图二)所示
3)Index[15 - 17]:表示设备向主机发送设备描述数据 Index[16]
4)Index[18 - 19]:表示主机完成 GET_DESCRIPTOR指令后,给设备发送一个
空应答
现在具体的分析103的usb的执行过程按顺序向下执行
***************(1)**************
DEVICE_INFO*pInformation;
DEVICE_PROP*pProperty;
DEVICE_PROP Device_Property=
{
Joystick_init,
Joystick_Reset,
Joystick_Status_In,
Joystick_Status_Out,
Joystick_Data_Setup,
Joystick_NoData_Setup,
Joystick_Get_Interface_Setting,
Joystick_GetDeviceDescriptor,
Joystick_GetConfigDescriptor,
Joystick_GetStringDescriptor,
0,
0x40
};
USER_STANDARD_REQUESTS User_Standard_Requests=
{
Joystick_GetConfiguration,
Joystick_SetConfiguration,
Joystick_GetInterface,
Joystick_SetInterface,
Joystick_GetStatus,
Joystick_ClearFeature,
Joystick_SetEndPointFeature,
Joystick_SetDeviceFeature,
Joystick_SetDeviceAddress
};
//USB内核将主机发送过来的用于实现USB设备的设置包保存在设备信息结构表中
typedef struct _DEVICE_INFO
{
uint8_tUSBbmRequestType;
uint8_tUSBbRequest;
uint16_t_uint8_tUSBwValues;
uint16_t_uint8_tUSBwIndexs;
uint16_t_uint8_tUSBwLengths;
uint8_tControlState;
uint8_t Current_Feature;
uint8_tCurrent_Configuration;
uint8_tCurrent_Interface;
uint8_tCurrent_AlternateSetting;
ENDPOINT_INFO Ctrl_Info;
}DEVICE_INFO; |
|