|
|
|
|
|
|
|
|
void setup() { |
|
|
void setup() { |
|
|
while(!Serial); |
|
|
while(!Serial); |
|
|
|
|
|
|
|
|
Serial.printf("\n\nMSC TEST\n\n"); |
|
|
|
|
|
Serial.printf("Initializing USB Drive(s)\n"); |
|
|
|
|
|
|
|
|
Serial.printf(F("\n\nMSC TEST\n\n")); |
|
|
|
|
|
Serial.printf(F("Initializing USB Drive(s)\n")); |
|
|
|
|
|
|
|
|
myusb.begin(); |
|
|
myusb.begin(); |
|
|
|
|
|
|
|
|
if(mscError = msDrive1.mscInit()) |
|
|
if(mscError = msDrive1.mscInit()) |
|
|
Serial.printf("msDrive1 not connected: Code: %d\n\n", mscError); |
|
|
|
|
|
|
|
|
Serial.printf(F("msDrive1 not connected: Code: %d\n\n"), mscError); |
|
|
else |
|
|
else |
|
|
Serial.printf("msDrive1 connected\n"); |
|
|
|
|
|
|
|
|
Serial.printf(F("msDrive1 connected\n")); |
|
|
|
|
|
|
|
|
if(mscError = msDrive2.mscInit()) |
|
|
if(mscError = msDrive2.mscInit()) |
|
|
Serial.printf("msDrive2 not connected: Code: %d\n\n", mscError); |
|
|
|
|
|
|
|
|
Serial.printf(F("msDrive2 not connected: Code: %d\n\n"), mscError); |
|
|
else |
|
|
else |
|
|
Serial.printf("msDrive2 connected\n"); |
|
|
|
|
|
|
|
|
Serial.printf(F("msDrive2 connected\n")); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Check if msDrive1 is plugged in and initialized |
|
|
// Check if msDrive1 is plugged in and initialized |
|
|
if((mscError = msDrive1.checkConnectedInitialized()) != MS_INIT_PASS) { |
|
|
if((mscError = msDrive1.checkConnectedInitialized()) != MS_INIT_PASS) { |
|
|
Serial.printf("msDrive1 not connected: Code: %d\n\n", mscError); |
|
|
|
|
|
|
|
|
Serial.printf(f("msDrive1 not connected: Code: %d\n\n"), mscError); |
|
|
} else { |
|
|
} else { |
|
|
Serial.printf("msDrive1 connected/initilized\n"); |
|
|
|
|
|
|
|
|
Serial.printf(F("msDrive1 connected/initilized\n")); |
|
|
showUSBDriveInfo(&msDrive1); |
|
|
showUSBDriveInfo(&msDrive1); |
|
|
} |
|
|
} |
|
|
// Check if msDrive2 is plugged in and initialized |
|
|
// Check if msDrive2 is plugged in and initialized |
|
|
if((mscError = msDrive2.checkConnectedInitialized()) != MS_INIT_PASS) { |
|
|
if((mscError = msDrive2.checkConnectedInitialized()) != MS_INIT_PASS) { |
|
|
Serial.printf("msDrive2 not connected: Code: %d\n\n", mscError); |
|
|
|
|
|
|
|
|
Serial.printf(F("msDrive2 not connected: Code: %d\n\n"), mscError); |
|
|
} else { |
|
|
} else { |
|
|
Serial.printf("msDrive2 connected/initilized\n"); |
|
|
|
|
|
|
|
|
Serial.printf(F("msDrive2 connected/initilized\n")); |
|
|
showUSBDriveInfo(&msDrive2); |
|
|
showUSBDriveInfo(&msDrive2); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |