This commit is contained in:
Oleg Mazurov 2013-06-06 12:13:29 -06:00
commit 1d8af4a05c
2 changed files with 6 additions and 4 deletions

View file

@ -318,8 +318,10 @@ uint8_t BulkOnly::Init(uint8_t parent, uint8_t port, bool lowspeed) {
while (rcode = TestUnitReady(lun)) { while (rcode = TestUnitReady(lun)) {
if (rcode == 0x08) break; // break on no media, this is OK to do. if (rcode == 0x08) break; // break on no media, this is OK to do.
// try to lock media and spin up // try to lock media and spin up
if (tries > 2) {
LockMedia(lun, 1); LockMedia(lun, 1);
MediaCTL(lun, 1); // I actually have a USB stick that needs this! MediaCTL(lun, 1); // I actually have a USB stick that needs this!
} else delay(2 * (tries + 1));
tries++; tries++;
if (!tries) break; if (!tries) break;
} }

View file

@ -18,7 +18,7 @@ e-mail : support@circuitsathome.com
#define __MESSAGE_H__ #define __MESSAGE_H__
// uncomment to activate // uncomment to activate
#define DEBUG //#define DEBUG
#include <inttypes.h> #include <inttypes.h>
#include <avr/pgmspace.h> #include <avr/pgmspace.h>