48 .DataINPipeDoubleBank =
false,
50 .DataOUTPipeNumber = 2,
51 .DataOUTPipeDoubleBank =
false,
74 DEBUGOUT(
"*******DIE %d*******\r\n", rc);
106 DEBUGOUT(
"Unable to open MESSAGE.TXT from USB Disk\r\n");
110 DEBUGOUT(
"Opened file MESSAGE.TXT from USB Disk. Printing contents...\r\n\r\n");
118 for (i = 0; i < br; i++) {
126 DEBUGOUT(
"\r\n\r\nClose the file.\r\n");
133 DEBUGOUT(
"\r\nCreate a new file (hello.txt).\r\n");
140 DEBUGOUT(
"\r\nWrite a text data. (Hello world!)\r\n");
147 sprintf(debugBuf,
"%u bytes written.\r\n", bw);
150 DEBUGOUT(
"\r\nClose the file.\r\n");
156 DEBUGOUT(
"\r\nOpen root directory.\r\n");
162 DEBUGOUT(
"\r\nDirectory listing...\r\n");
166 if (rc || !fno.
fname[0]) {
170 sprintf(debugBuf,
" <dir> %s\r\n", fno.
fname);
173 sprintf(debugBuf,
" %8lu %s\r\n", fno.
fsize, fno.
fname);
181 DEBUGOUT(
"\r\nTest completed.\r\n");
196 DEBUGOUT(
"Mass Storage Host Demo running.\r\n");
209 DEBUGOUT((
"Device Attached on port %d\r\n"), corenum);
217 DEBUGOUT((
"\r\nDevice Unattached on port %d\r\n"), corenum);
225 uint16_t ConfigDescriptorSize;
226 uint8_t ConfigDescriptorData[512];
230 DEBUGOUT(
"Error Retrieving Configuration Descriptor.\r\n");
237 DEBUGOUT(
"Attached Device Not a Valid Mass Storage Device.\r\n");
242 DEBUGOUT(
"Error Setting Device Configuration.\r\n");
248 DEBUGOUT(
"Error retrieving max LUN index.\r\n");
253 DEBUGOUT((
"Total LUNs: %d - Using first LUN in device.\r\n"), (MaxLUNIndex + 1));
256 DEBUGOUT(
"Error resetting Mass Storage interface.\r\n");
263 DEBUGOUT(
"Error retrieving device sense.\r\n");
276 DEBUGOUT(
"Error retrieving device Inquiry data.\r\n");
283 DEBUGOUT(
"Mass Storage Device Enumerated.\r\n");
292 " -- Error port %d\r\n"
293 " -- Error Code %d\r\n" ), corenum, ErrorCode);
302 const uint8_t ErrorCode,
303 const uint8_t SubErrorCode)
306 " -- Error port %d\r\n"
307 " -- Error Code %d\r\n"
308 " -- Sub Error Code %d\r\n"
309 " -- In State %d\r\n" ),
351 DEBUGOUT(
"Error retrieving device capacity.\r\n");
363 return DiskCapacity.
Blocks;
376 DEBUGOUT(
"Error reading device block.\r\n");
387 DEBUGOUT(
"Error writing device block.\r\n");
396 volatile int i = tout * 100;