Audio usb
Fork of MSCFileSystem by
Revision 8:8071d6c9aeb0, committed 2014-04-03
- Comitter:
- dan_cuspi
- Date:
- Thu Apr 03 01:25:16 2014 +0000
- Parent:
- 4:dcc326e4d358
- Commit message:
- Wav player usb
Changed in this revision
--- a/MSCFileSystem.cpp Mon Jul 23 09:59:06 2012 +0000 +++ b/MSCFileSystem.cpp Thu Apr 03 01:25:16 2014 +0000 @@ -22,40 +22,40 @@ { // see USB Mass Storage Class – UFI Command Specification, // 4.2 INQUIRY Command - printf("Inquiry reply:\n"); + printf("Inquiry reply:\n\r"); uint8_t tmp = inqReply[0]&0x1F; - printf("Peripheral device type: %02Xh\n", tmp); + printf("Peripheral device type: %02Xh\n\r", tmp); if ( tmp == 0 ) - printf("\t- Direct access (floppy)\n"); + printf("\t- Direct access (floppy)\n\r"); else if ( tmp == 0x1F ) - printf("\t- none (no FDD connected)\n"); + printf("\t- none (no FDD connected)\n\r"); else - printf("\t- unknown type\n"); + printf("\t- unknown type\n\r"); tmp = inqReply[1] >> 7; - printf("Removable Media Bit: %d\n", tmp); + printf("Removable Media Bit: %d\n\r", tmp); tmp = inqReply[2] & 3; - printf("ANSI Version: %02Xh\n", tmp); + printf("ANSI Version: %02Xh\n\r", tmp); if ( tmp != 0 ) - printf("\t- warning! must be 0\n"); + printf("\t- warning! must be 0\n\r"); tmp = (inqReply[2]>>3) & 3; - printf("ECMA Version: %02Xh\n", tmp); + printf("ECMA Version: %02Xh\n\r", tmp); if ( tmp != 0 ) - printf("\t- warning! should be 0\n"); + printf("\t- warning! should be 0\n\r"); tmp = inqReply[2]>>6; - printf("ISO Version: %02Xh\n", tmp); + printf("ISO Version: %02Xh\n\r", tmp); if ( tmp != 0 ) - printf("\t- warning! should be 0\n"); + printf("\t- warning! should be 0\n\r"); tmp = inqReply[3] & 0xF; - printf("Response Data Format: %02Xh\n", tmp); + printf("Response Data Format: %02Xh\n\r", tmp); if ( tmp != 1 ) - printf("\t- warning! should be 1\n"); + printf("\t- warning! should be 1\n\r"); tmp = inqReply[4]; - printf("Additional length: %02Xh\n", tmp); + printf("Additional length: %02Xh\n\r", tmp); if ( tmp != 0x1F ) - printf("\t- warning! should be 1Fh\n"); - printf("Vendor Information: '%.8s'\n", &inqReply[8]); - printf("Product Identification: '%.16s'\n", &inqReply[16]); - printf("Product Revision: '%.4s'\n", &inqReply[32]); + printf("\t- warning! should be 1Fh\n\r"); + printf("Vendor Information: '%.8s'\n\r", &inqReply[8]); + printf("Product Identification: '%.16s'\n\r", &inqReply[16]); + printf("Product Revision: '%.4s'\n\r", &inqReply[32]); } int MSCFileSystem::initialise_msc() @@ -68,7 +68,7 @@ rc = Host_EnumDev(); /* Enumerate the device connected */ if (rc != OK) { - fprintf(stderr, "Could not enumerate device: %d\n", rc); + fprintf(stderr, "Could not enumerate device: %d\n\r", rc); return rc; } @@ -77,10 +77,10 @@ rc = MS_Init( &_blkSize, &_numBlks, inquiryResult ); if (rc != OK) { - fprintf(stderr, "Could not initialize mass storage interface: %d\n", rc); + fprintf(stderr, "Could not initialize mass storage interface: %d\n\r", rc); return rc; } - printf("Successfully initialized mass storage interface; %d blocks of size %d\n", _numBlks, _blkSize); + printf("Successfully initialized mass storage interface; %d blocks of size %d\n\r", _numBlks, _blkSize); print_inquiry(inquiryResult); // FATFileSystem supports only 512-byte blocks return _blkSize == 512 ? OK : 1;
--- a/USBHostLite/usbhost_lpc17xx.cpp Mon Jul 23 09:59:06 2012 +0000 +++ b/USBHostLite/usbhost_lpc17xx.cpp Thu Apr 03 01:25:16 2014 +0000 @@ -123,7 +123,7 @@ */ void Host_Init (void) { - PRINT_Log("In Host_Init\n"); + PRINT_Log("In Host_Init\n\r"); NVIC_DisableIRQ(USB_IRQn); /* Disable the USB interrupt source */ // turn on power for USB @@ -161,7 +161,7 @@ LPC_PINCON->PINSEL1 &= ~((3<<26) | (3<<28)); LPC_PINCON->PINSEL1 |= ((1<<26)|(1<<28)); // 0x14000000 - PRINT_Log("Initializing Host Stack\n"); + PRINT_Log("Initializing Host Stack\n\r"); Hcca = (volatile HCCA *)(HostBuf+0x000); TDHead = (volatile HCTD *)(HostBuf+0x100); @@ -203,7 +203,7 @@ NVIC_SetPriority(USB_IRQn, 0); /* highest priority */ /* Enable the USB Interrupt */ NVIC_EnableIRQ(USB_IRQn); - PRINT_Log("Host Initialized\n"); + PRINT_Log("Host Initialized\n\r"); } /* @@ -254,7 +254,7 @@ gUSBConnected = 1; } else - PRINT_Log("Spurious status change (connected)?\n"); + PRINT_Log("Spurious status change (connected)?\n\r"); } else { if (gUSBConnected) { LPC_USB->HcInterruptEnable = 0; // why do we get multiple disc. rupts??? @@ -262,7 +262,7 @@ gUSBConnected = 0; } else - PRINT_Log("Spurious status change (disconnected)?\n"); + PRINT_Log("Spurious status change (disconnected)?\n\r"); } } LPC_USB->HcRhPortStatus1 = OR_RH_PORT_CSC; @@ -368,7 +368,7 @@ { USB_INT32S rc; - PRINT_Log("Connect a Mass Storage device\n"); + PRINT_Log("Connect a Mass Storage device\n\r"); while (!HOST_RhscIntr) __WFI(); Host_DelayMS(100); /* USB 2.0 spec says atleast 50ms delay beore port reset */
--- a/USBHostLite/usbhost_ms.cpp Mon Jul 23 09:59:06 2012 +0000 +++ b/USBHostLite/usbhost_ms.cpp Thu Apr 03 01:25:16 2014 +0000 @@ -137,10 +137,10 @@ } } if (ms_int_found) { - PRINT_Log("Mass Storage device connected\n"); + PRINT_Log("Mass Storage device connected\n\r"); return (OK); } else { - PRINT_Log("Not a Mass Storage device\n"); + PRINT_Log("Not a Mass Storage device\n\r"); return (ERR_NO_MS_INTERFACE); } }