int main(void)
{
//debug();
Init_Device();
// Setup_RTC();
SPI_Configuration();
//while( SD_Init());
TFT_ShowString(160,100,"stmsky107");
TFT_ShowString(200,10," stmsky107 study ");
TFT_ShowString(180,10," normal operation ");
res = f_mount(0, &fs);
if(!res)
// res = f_open(&file1, "t61sss.txt", FA_CREATE_ALWAYS);
// res = f_open(&file1, "tpsss.txt", FA_OPEN_ALWAYS | FA_WRITE|FA_CREATE_ALWAYS);
// f_write(&file1, buffer, 26, &bw);
//f_close(&file1);
res = f_open(&file2, "game.bmp", FA_OPEN_EXISTING | FA_READ);
if(!res)
{
G_DrawBmpFile( &file2, 10, 3);
delay(1000);
}
res = f_open(&file2, "alarm.bmp", FA_OPEN_EXISTING | FA_READ);
if(!res)
{
G_DrawBmpFile( &file2, 90, 3);
delay(1000);
}
res = f_open(&file2, "txt.bmp", FA_OPEN_EXISTING | FA_READ);
if(!res)
{
G_DrawBmpFile( &file2, 170, 3);
delay(5000);
}
res = f_open(&file2, "game.bmp", FA_OPEN_EXISTING | FA_READ);
if(!res)
{
G_DrawBmpFile( &file2, 10, 80);
delay(5000);
}
res = f_open(&file2, "alarm.bmp", FA_OPEN_EXISTING | FA_READ);
if(!res)
{
G_DrawBmpFile( &file2, 90, 80);
delay(5000);
}
res = f_open(&file2, "txt.bmp", FA_OPEN_EXISTING | FA_READ);
if(!res)
{
G_DrawBmpFile( &file2, 170, 80);
delay(1000);
}
res = f_open(&file2, "game.bmp", FA_OPEN_EXISTING | FA_READ);
if(!res)
{
G_DrawBmpFile( &file2, 10, 160);
delay(5000);
}
res = f_open(&file2, "alarm.bmp", FA_OPEN_EXISTING | FA_READ);
if(!res)
{
G_DrawBmpFile( &file2, 90, 160);
delay(1000);
}
res = f_open(&file2, "txt.bmp", FA_OPEN_EXISTING | FA_READ);
if(!res)
{
G_DrawBmpFile( &file2, 170, 160);
delay(1000);
}
f_close(&file2);
f_mount(0, NULL);
while(1)
{
ili9320_Clear(0xFFFF);
res = f_mount(0, &fs);
delay(5000);
if(!res)
res = f_open(&file2, "1.jpg", FA_OPEN_EXISTING | FA_READ);
LoadJpegFile(&file2,0,0,240,320);
delay(5000);
ili9320_Clear(0xFFFF);
res = f_open(&file2, "2.jpg", FA_OPEN_EXISTING | FA_READ);
LoadJpegFile(&file2,0,0,240,320);
delay(5000);
ili9320_Clear(0xFFFF);
res = f_open(&file2, "3.jpg", FA_OPEN_EXISTING | FA_READ);
LoadJpegFile(&file2,0,0,240,320);
delay(5000);
ili9320_Clear(0xFFFF);
res = f_open(&file2, "4.jpg", FA_OPEN_EXISTING | FA_READ);
LoadJpegFile(&file2,0,0,240,320);
delay(5000);
}
f_close(&file2);
f_mount(0, NULL); |