mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Added some delays between USB commands
This commit is contained in:
parent
4f738d3ef9
commit
655b60ea90
1 changed files with 10 additions and 1 deletions
11
adk.cpp
11
adk.cpp
|
@ -228,14 +228,23 @@ uint8_t ADK::Init(uint8_t parent, uint8_t port, bool lowspeed) {
|
||||||
USBTRACE2("\r\nADK protocol rev. ", adkproto);
|
USBTRACE2("\r\nADK protocol rev. ", adkproto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delay(100);
|
||||||
|
|
||||||
//sending ID strings
|
//sending ID strings
|
||||||
sendStr(ACCESSORY_STRING_MANUFACTURER, manufacturer);
|
sendStr(ACCESSORY_STRING_MANUFACTURER, manufacturer);
|
||||||
|
delay(10);
|
||||||
sendStr(ACCESSORY_STRING_MODEL, model);
|
sendStr(ACCESSORY_STRING_MODEL, model);
|
||||||
|
delay(10);
|
||||||
sendStr(ACCESSORY_STRING_DESCRIPTION, description);
|
sendStr(ACCESSORY_STRING_DESCRIPTION, description);
|
||||||
|
delay(10);
|
||||||
sendStr(ACCESSORY_STRING_VERSION, version);
|
sendStr(ACCESSORY_STRING_VERSION, version);
|
||||||
|
delay(10);
|
||||||
sendStr(ACCESSORY_STRING_URI, uri);
|
sendStr(ACCESSORY_STRING_URI, uri);
|
||||||
|
delay(10);
|
||||||
sendStr(ACCESSORY_STRING_SERIAL, serial);
|
sendStr(ACCESSORY_STRING_SERIAL, serial);
|
||||||
|
|
||||||
|
delay(100);
|
||||||
|
|
||||||
//switch to accessory mode
|
//switch to accessory mode
|
||||||
//the Android phone will reset
|
//the Android phone will reset
|
||||||
rcode = switchAcc();
|
rcode = switchAcc();
|
||||||
|
@ -243,7 +252,7 @@ uint8_t ADK::Init(uint8_t parent, uint8_t port, bool lowspeed) {
|
||||||
goto FailSwAcc; //init fails
|
goto FailSwAcc; //init fails
|
||||||
}
|
}
|
||||||
rcode = USB_ERROR_CONFIG_REQUIRES_ADDITIONAL_RESET;
|
rcode = USB_ERROR_CONFIG_REQUIRES_ADDITIONAL_RESET;
|
||||||
delay(1000); // Give Android a chance to do its reset. This is a guess, and possibly could be lower.
|
delay(100); // Give Android a chance to do its reset. This is a guess, and possibly could be lower.
|
||||||
goto SwAttempt; //switch to accessory mode attempted
|
goto SwAttempt; //switch to accessory mode attempted
|
||||||
|
|
||||||
/* diagnostic messages */
|
/* diagnostic messages */
|
||||||
|
|
Loading…
Reference in a new issue