如题!前面程序如下:
BYTE table1[]="/中庸.txt";
BYTE table2[]="/呵呵.bmp";
/********************************************************
* @brief Main program.
* @param None
* @retval : None
********************************************************/
int main(void)
{
// uint8_t x=0;
/* Setup STM32 system (clock, PLL and Flash configuration) */
SystemInit();
delay_init(72); //延时初始化
NVIC_Configuration();
/* Add your application code here */
// USART_Configuration(115200);
LCD_Init();
POINT_COLOR=RED;
sd_fat_init();
Lcd_show_bmp(0, 0,table2); while(1);
}
void Lcd_show_bmp(u8 x,u16 y,BYTE *pic_name)
{
u16 p=0,q=0;
int width, height, l_width;
BYTE pColorData[960];
BYTE red,green,blue;
BITMAPFILEHEADER bitHead;
BITMAPINFOHEADER bitInfoHead;
WORD fileType;
unsigned int read_num;
unsigned char tmp_name[50];
sprintf((char*)tmp_name,"0:%s",pic_name);
f_mount(0, &fs);
res = f_open(&fsrc , (char*)tmp_name , FA_OPEN_EXISTING | FA_READ);
if(res == FR_OK)
.....
}上面的res等于FR_INVALID_NAME,路径名又没错,不知道怎么回事,都调了两天了,求大虾们解释啊!谢谢了! |