42 .DataINPipeDoubleBank =
false,
44 .DataOUTPipeNumber = 2,
45 .DataOUTPipeDoubleBank =
false,
56 DEBUGOUT(
"Mass Storage Host Demo running.\r\n");
90 DEBUGOUT(
"Waiting until ready...\r\n");
101 DEBUGOUT(
"Error waiting for device to be ready.\r\n");
108 DEBUGOUT(
"Retrieving Capacity...\r\n");
112 DEBUGOUT(
"Error retrieving device capacity.\r\n");
121 uint8_t BlockBuffer[512];
124 DEBUGOUT(
"Error reading device block.\r\n");
130 DEBUGOUT(
"\r\nContents of first block:\r\n");
132 for (uint16_t Chunk = 0; Chunk < (DiskCapacity.
BlockSize >> 4); Chunk++) {
133 uint8_t *ChunkPtr = &BlockBuffer[Chunk << 4];
136 for (uint8_t ByteOffset = 0; ByteOffset < (1 << 4); ByteOffset++) {
137 char CurrByte = *(ChunkPtr + ByteOffset);
146 for (uint8_t ByteOffset = 0; ByteOffset < (1 << 4); ByteOffset++) {
147 char CurrByte = *(ChunkPtr + ByteOffset);
148 putchar(isprint(CurrByte) ? CurrByte :
'.');
163 DEBUGOUT((
"Device Attached on port %d\r\n"), corenum);
172 DEBUGOUT((
"\r\nDevice Unattached on port %d\r\n"), corenum);
183 uint16_t ConfigDescriptorSize;
184 uint8_t ConfigDescriptorData[512];
188 DEBUGOUT(
"Error Retrieving Configuration Descriptor.\r\n");
196 DEBUGOUT(
"Attached Device Not a Valid Mass Storage Device.\r\n");
202 DEBUGOUT(
"Error Setting Device Configuration.\r\n");
209 DEBUGOUT(
"Error retrieving max LUN index.\r\n");
215 DEBUGOUT((
"Total LUNs: %d - Using first LUN in device.\r\n"), (MaxLUNIndex + 1));
218 DEBUGOUT(
"Error resetting Mass Storage interface.\r\n");
226 DEBUGOUT(
"Error retrieving device sense.\r\n");
233 DEBUGOUT(
"Error setting Prevent Device Removal bit.\r\n");
241 DEBUGOUT(
"Error retrieving device Inquiry data.\r\n");
249 DEBUGOUT(
"Mass Storage Device Enumerated.\r\n");
259 " -- Error port %d\r\n"
260 " -- Error Code %d\r\n" ), corenum, ErrorCode);
270 const uint8_t ErrorCode,
271 const uint8_t SubErrorCode)
274 " -- Error port %d\r\n"
275 " -- Error Code %d\r\n"
276 " -- Sub Error Code %d\r\n"
277 " -- In State %d\r\n" ),