关于LM3S9B96 移植usb_dev_msc pc端无法识别usb设备

请各位兄弟姐妹帮忙看看,下面是main函数,其它部分都相同,

int
main(void)
{
tRectangle sRect;
unsigned long ulRetcode;

//
// Set the clocking to run directly from the crystal.
//
SysCtlLDOSet(SYSCTL_LDO_2_75V);
SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_OSC  | SYSCTL_OSC_MAIN |
SYSCTL_XTAL_16MHZ);

//
// Set the device pinout appropriately for this board.
//

PinoutSet();


// 打开usb外设
SysCtlPeripheralEnable(SYSCTL_PERIPH_USB0);
SysCtlUSBPLLEnable(); // 打开USB主时钟
USBIntStatusControl(USB0_BASE);
USBIntStatusEndpoint(USB0_BASE);
USBIntEnableControl(USB0_BASE,USB_INTCTRL_RESET | USB_INTCTRL_DISCONNECT |
USB_INTCTRL_RESUME |
USB_INTCTRL_SUSPEND |
USB_INTCTRL_SOF);
USBIntEnableEndpoint(USB0_BASE, USB_INTEP_ALL);
USBDevDisconnect(USB0_BASE);
SysCtlDelay(SysCtlClockGet()/30);
USBDevConnect(USB0_BASE);
IntEnable(INT_USB0);
IntMasterEnable();
//
// Configure SysTick for a 100Hz interrupt. The FatFs driver wants a 10 ms
// tick.
//
SysTickPeriodSet(SysCtlClockGet() / 100);
SysTickEnable();
SysTickIntEnable();

//
// Configure and enable uDMA
//
SysCtlPeripheralEnable(SYSCTL_PERIPH_UDMA);
SysCtlDelay(10);
uDMAControlBaseSet(&sDMAControlTable[0]);
uDMAEnable();


//
// Initialize the display driver.
//
Kitronix320x240x16_SSD2119Init();

//
// Initialize the graphics context.
//
GrContextInit(&g_sContext, &g_sKitronix320x240x16_SSD2119);

//
// Fill the top 15 rows of the screen with blue to create the banner.
//
sRect.sXMin = 0;
sRect.sYMin = 0;
sRect.sXMax = GrContextDpyWidthGet(&g_sContext) - 1;
sRect.sYMax = DISPLAY_BANNER_HEIGHT - 1;
GrContextForegroundSet(&g_sContext, ClrDarkBlue);
GrRectFill(&g_sContext, &sRect);

//
// Put a white box around the banner.
//
GrContextForegroundSet(&g_sContext, ClrWhite);
GrRectDraw(&g_sContext, &sRect);

//
// Put the application name in the middle of the banner.
//
GrContextFontSet(&g_sContext, &g_sFontCm20);
GrStringDrawCentered(&g_sContext, "usb-dev-msc", -1,
GrContextDpyWidthGet(&g_sContext) / 2, 10, 0);

//
// Initialize the idle timeout and reset all flags.
//
g_ulIdleTimeout = 0;
g_ulFlags = 0;

//
// Initialize the state to idle.
//
g_eMSCState = MSC_DEV_IDLE;

//
// Draw the status bar and set it to idle.
//
UpdateStatus("Idle", 1);

//
// Pass our device information to the USB library and place the device
// on the bus.
//
USBDMSCInit(0, (tUSBDMSCDevice *)&g_sMSCDevice);

//
// Determine whether or not an SDCard is installed. If not, print a
// warning and have the user install one and restart.
//
ulRetcode = disk_initialize(0);

GrContextFontSet(&g_sContext, &g_sFontCmss24);
if(ulRetcode != RES_OK)
{

GrStringDrawCentered(&g_sContext, "No SDCard Found", -1,
GrContextDpyWidthGet(&g_sContext) / 2,
(GrContextDpyHeightGet(&g_sContext) / 2) - 20, 0);
GrContextFontSet(&g_sContext, &g_sFontCm20);
GrStringDrawCentered(&g_sContext, "Please insert a card and restart.",
-1, GrContextDpyWidthGet(&g_sContext) / 2,
(GrContextDpyHeightGet(&g_sContext) / 2), 0);
GrStringDrawCentered(&g_sContext, "Hot-plugging is not supported.",
-1, GrContextDpyWidthGet(&g_sContext) / 2,
(GrContextDpyHeightGet(&g_sContext) / 2) + 20, 0);
}
else
{
//BuzzerOperate(1000);
GrStringDrawCentered(&g_sContext, "SDCard Found", -1,
GrContextDpyWidthGet(&g_sContext) / 2,
GrContextDpyHeightGet(&g_sContext) / 2, 0);
}

//
// Drop into the main loop.
//
while(1)
{
switch(g_eMSCState)
{
case MSC_DEV_READ:
{
//
// Update the screen if necessary.
//
if(g_ulFlags & FLAG_UPDATE_STATUS)
{
UpdateStatus("Reading", 0);
g_ulFlags &= ~FLAG_UPDATE_STATUS;
}

//
// If there is no activity then return to the idle state.
//
if(g_ulIdleTimeout == 0)
{
UpdateStatus("Idle ", 0);
g_eMSCState = MSC_DEV_IDLE;
}

break;
}
case MSC_DEV_WRITE:
{
//
// Update the screen if necessary.
//
if(g_ulFlags & FLAG_UPDATE_STATUS)
{
UpdateStatus("Writing", 0);
g_ulFlags &= ~FLAG_UPDATE_STATUS;
}

//
// If there is no activity then return to the idle state.
//
if(g_ulIdleTimeout == 0)
{
UpdateStatus("Idle ", 0);
g_eMSCState = MSC_DEV_IDLE;
}
break;
}
case MSC_DEV_IDLE:
default:
{
break;
}
}
}
}