前面关于USB设备的底层代码忘了把端口特性清除函数贴出来了,现在补上。
/**
*
清除端口特性
* @return 0 -
成功
*/
short
usbClearFeature(
unsigned
char
type,
unsigned
char
idx)
{
//
清除端口特性
usbDevSetup.
bmRequest
= type;
usbDevSetup.
bRequest
= CLEAR_FEATURE;
usbDevSetup.
wValue
= 0;
usbDevSetup.
wIndex
= idx;
usbDevSetup.
wLength
= 0;
return
ctrlCmdSet((
unsigned
int
)&usbDevSetup, usbBuf);
}
|
本文转自 tywali 51CTO博客,原文链接:http://blog.51cto.com/lancelot/309546,如需转载请自行联系原作者