From 655b60ea90010a3f041e9363262cded755774026 Mon Sep 17 00:00:00 2001 From: Kristian Lauszus Date: Fri, 6 Dec 2013 23:24:25 +0100 Subject: [PATCH] Added some delays between USB commands --- adk.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/adk.cpp b/adk.cpp index 63427b26..a3530d00 100644 --- a/adk.cpp +++ b/adk.cpp @@ -228,14 +228,23 @@ uint8_t ADK::Init(uint8_t parent, uint8_t port, bool lowspeed) { USBTRACE2("\r\nADK protocol rev. ", adkproto); } + delay(100); + //sending ID strings sendStr(ACCESSORY_STRING_MANUFACTURER, manufacturer); + delay(10); sendStr(ACCESSORY_STRING_MODEL, model); + delay(10); sendStr(ACCESSORY_STRING_DESCRIPTION, description); + delay(10); sendStr(ACCESSORY_STRING_VERSION, version); + delay(10); sendStr(ACCESSORY_STRING_URI, uri); + delay(10); sendStr(ACCESSORY_STRING_SERIAL, serial); + delay(100); + //switch to accessory mode //the Android phone will reset rcode = switchAcc(); @@ -243,7 +252,7 @@ uint8_t ADK::Init(uint8_t parent, uint8_t port, bool lowspeed) { goto FailSwAcc; //init fails } 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 /* diagnostic messages */