From 13fd6036b602516f868d18462843e8428abdec0c Mon Sep 17 00:00:00 2001 From: "Andrew J. Kroll" Date: Thu, 6 Jun 2013 13:56:53 -0400 Subject: [PATCH] slight change to init. DEBUG default off. --- masstorage.cpp | 8 +++++--- message.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/masstorage.cpp b/masstorage.cpp index 9d998fa7..82f88361 100644 --- a/masstorage.cpp +++ b/masstorage.cpp @@ -318,8 +318,10 @@ uint8_t BulkOnly::Init(uint8_t parent, uint8_t port, bool lowspeed) { while (rcode = TestUnitReady(lun)) { if (rcode == 0x08) break; // break on no media, this is OK to do. // try to lock media and spin up - LockMedia(lun, 1); - MediaCTL(lun, 1); // I actually have a USB stick that needs this! + if (tries > 2) { + LockMedia(lun, 1); + MediaCTL(lun, 1); // I actually have a USB stick that needs this! + } else delay(2 * (tries + 1)); tries++; if (!tries) break; } @@ -389,7 +391,7 @@ FailSetDevTblEntry: goto Fail; #endif - FailGetConfDescr: +FailGetConfDescr: #ifdef DEBUG NotifyFailGetConfDescr(); #endif diff --git a/message.h b/message.h index 476796ce..78de0dc6 100644 --- a/message.h +++ b/message.h @@ -18,7 +18,7 @@ e-mail : support@circuitsathome.com #define __MESSAGE_H__ // uncomment to activate -#define DEBUG +//#define DEBUG #include #include