added delays in Get Config

This commit is contained in:
Oleg Mazurov 2012-05-08 14:38:04 -06:00
parent 3d068a0637
commit 89ff7d24ed
3 changed files with 7 additions and 2 deletions

View file

@ -616,7 +616,7 @@ uint8_t USB::getConfDescr( uint8_t addr, uint8_t ep, uint8_t conf, USBReadParser
return ret;
uint16_t total = ((USB_CONFIGURATION_DESCRIPTOR*)buf)->wTotalLength;
delay(100);
//USBTRACE2("\r\ntotal conf.size:", total);
return( ctrlReq( addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, conf, USB_DESCRIPTOR_CONFIGURATION, 0x0000, total, bufSize, buf, p ));

View file

@ -58,7 +58,7 @@ Fail:
}
USB Usb;
USBHub Hub(&Usb);
//USBHub Hub(&Usb);
HIDUniversal2 Hid(&Usb);
UniversalReportParser Uni;

View file

@ -127,6 +127,8 @@ uint8_t HIDUniversal::Init(uint8_t parent, uint8_t port, bool lowspeed)
p->lowspeed = lowspeed;
//delay(200);
// Get device descriptor
rcode = pUsb->getDevDescr( 0, 0, 8, (uint8_t*)buf );
@ -176,6 +178,8 @@ uint8_t HIDUniversal::Init(uint8_t parent, uint8_t port, bool lowspeed)
p->lowspeed = lowspeed;
delay(200);
if (len)
rcode = pUsb->getDevDescr( bAddress, 0, len, (uint8_t*)buf );
@ -194,6 +198,7 @@ uint8_t HIDUniversal::Init(uint8_t parent, uint8_t port, bool lowspeed)
for (uint8_t i=0; i<num_of_conf; i++)
{
//delay(1000);
//HexDumper<USBReadParser, uint16_t, uint16_t> HexDump;
ConfigDescParser<USB_CLASS_HID, 0, 0,
CP_MASK_COMPARE_CLASS> confDescrParser(this);