自问自答吧:问题解决了
在USB2.0协议文档中,关于Set Address和Set configuration是这么说的:
关于地址设置:设为0,则设备处于Default state;设成非0地址,则设备处于Address state
>>Default state: If the address specified is non-zero, then the device shall enter the Address state;
otherwise, the device remains in the Default state (this is not an error condition).
>>Address state: If the address specified is zero, then the device shall enter the Default state;
otherwise, the device remains in the Address state but uses the newly-specified
address.
>>Configured state: Device behavior when this request is received while the device is in the Configured
state is not specified.
关于Set Configuration:对处于Default state下的设备Set Configuration是错误的。
>>Default state: Device behavior when this request is received while the device is in the Default state
is not specified.
>>Address state: If the specified configuration value is zero, then the device remains in the Address
state. If the specified configuration value matches the configuration value from a
configuration descriptor, then that configuration is selected and the device enters the
Configured state. Otherwise, the device responds with a Request Error.
>>Configured state: If the specified configuration value is zero, then the device enters the Address state.
If the specified configuration value matches the configuration value from a
configuration descriptor, then that configuration is selected and the device remains in
the Configured state. Otherwise, the device responds with a Request Error.
SO,只要设置一个非0的地址就什么都好了!
|