您好,请问我对例程里的显示部分做了如下注释是否有影响,如果没有影响,为何我在串口输入ls命令为何总是返回Command returned error code FR_NOT_READY,是我硬件连接的问题吗?我是按照spi接线接的。麻烦解答一下,谢谢。intmain(void)[ int nStatus; FRESULT iFResult;// tRectangle sRect; // // Enable lazy stacking for interrupt handlers. This allows floating-point // instructions to be used within interrupt handlers, but at the expense of // extra stack usage. // ROM_FPULazyStackingEnable(); // // Set the system clock to run at 50MHz from the PLL. // ROM_SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ); // // Enable the peripherals used by this example. // ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI0); // // Configure SysTick for a 100Hz interrupt. The FatFs driver wants a 10 ms // tick. // ROM_SysTickPeriodSet(ROM_SysCtlClockGet() / 100); ROM_SysTickEnable(); ROM_SysTickIntEnable(); // // Enable Interrupts // ROM_IntMasterEnable(); // // Initialize the UART as a console for text I/O. // ConfigureUART(); // // Initialize the display driver. //// CFAL96x64x16Init();//// //// // Initialize the graphics context.// //// GrContextInit(&g_sContext, &g_sCFAL96x64x16);//// //// // Fill the top part of the screen with blue to create the banner.// //// sRect.i16XMin = 0;// sRect.i16YMin = 0;// sRect.i16XMax = GrContextDpyWidthGet(&g_sContext) - 1;// sRect.i16YMax = 9;// GrContextForegroundSet(&g_sContext, ClrDarkBlue);// GrRectFill(&g_sContext, &sRect);//// //// // Change foreground for white text.// //// GrContextForegroundSet(&g_sContext, ClrWhite);//// //// // Put the application name in the middle of the banner.// //// GrContextFontSet(&g_sContext, g_psFontFixed6x8);// GrStringDrawCentered(&g_sContext, "sd_card", -1,// GrContextDpyWidthGet(&g_sContext) / 2, 4, 0);//// //// // Show some instructions on the display// //// GrContextFontSet(&g_sContext, g_psFontFixed6x8);// GrStringDrawCentered(&g_sContext, "Connect a", -1,// GrContextDpyWidthGet(&g_sContext) / 2, 20, false);// GrStringDrawCentered(&g_sContext, "terminal", -1,// GrContextDpyWidthGet(&g_sContext) / 2, 30, false);// GrStringDrawCentered(&g_sContext, "to UART0.", -1,// GrContextDpyWidthGet(&g_sContext) / 2, 40, false);// GrStringDrawCentered(&g_sContext, "115000,N,8,1", -1,// GrContextDpyWidthGet(&g_sContext) / 2, 50, false); // // Print hello message to user. // UARTprintf("nnSD Card Example Programn"); UARTprintf("Type 'help' for help.n");
您好,请问我对例程里的显示部分做了如下注释是否有影响,如果没有影响,为何我在串口输入ls命令为何总是返回Command returned error code FR_NOT_READY,是我硬件连接的问题吗?我是按照spi接线接的。麻烦解答一下,谢谢。intmain(void)[ int nStatus; FRESULT iFResult;// tRectangle sRect; // // Enable lazy stacking for interrupt handlers. This allows floating-point // instructions to be used within interrupt handlers, but at the expense of // extra stack usage. // ROM_FPULazyStackingEnable(); // // Set the system clock to run at 50MHz from the PLL. // ROM_SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ); // // Enable the peripherals used by this example. // ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI0); // // Configure SysTick for a 100Hz interrupt. The FatFs driver wants a 10 ms // tick. // ROM_SysTickPeriodSet(ROM_SysCtlClockGet() / 100); ROM_SysTickEnable(); ROM_SysTickIntEnable(); // // Enable Interrupts // ROM_IntMasterEnable(); // // Initialize the UART as a console for text I/O. // ConfigureUART(); // // Initialize the display driver. //// CFAL96x64x16Init();//// //// // Initialize the graphics context.// //// GrContextInit(&g_sContext, &g_sCFAL96x64x16);//// //// // Fill the top part of the screen with blue to create the banner.// //// sRect.i16XMin = 0;// sRect.i16YMin = 0;// sRect.i16XMax = GrContextDpyWidthGet(&g_sContext) - 1;// sRect.i16YMax = 9;// GrContextForegroundSet(&g_sContext, ClrDarkBlue);// GrRectFill(&g_sContext, &sRect);//// //// // Change foreground for white text.// //// GrContextForegroundSet(&g_sContext, ClrWhite);//// //// // Put the application name in the middle of the banner.// //// GrContextFontSet(&g_sContext, g_psFontFixed6x8);// GrStringDrawCentered(&g_sContext, "sd_card", -1,// GrContextDpyWidthGet(&g_sContext) / 2, 4, 0);//// //// // Show some instructions on the display// //// GrContextFontSet(&g_sContext, g_psFontFixed6x8);// GrStringDrawCentered(&g_sContext, "Connect a", -1,// GrContextDpyWidthGet(&g_sContext) / 2, 20, false);// GrStringDrawCentered(&g_sContext, "terminal", -1,// GrContextDpyWidthGet(&g_sContext) / 2, 30, false);// GrStringDrawCentered(&g_sContext, "to UART0.", -1,// GrContextDpyWidthGet(&g_sContext) / 2, 40, false);// GrStringDrawCentered(&g_sContext, "115000,N,8,1", -1,// GrContextDpyWidthGet(&g_sContext) / 2, 50, false); // // Print hello message to user. // UARTprintf("nnSD Card Example Programn"); UARTprintf("Type 'help' for help.n");
举报