mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
added delays in Get Config
This commit is contained in:
parent
3d068a0637
commit
89ff7d24ed
3 changed files with 7 additions and 2 deletions
2
Usb.cpp
2
Usb.cpp
|
@ -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 ));
|
||||
|
|
|
@ -58,7 +58,7 @@ Fail:
|
|||
}
|
||||
|
||||
USB Usb;
|
||||
USBHub Hub(&Usb);
|
||||
//USBHub Hub(&Usb);
|
||||
HIDUniversal2 Hid(&Usb);
|
||||
UniversalReportParser Uni;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue