前面关于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);
}