Hi.
I want to draw bitmap or gif from external sd, but i can't understand some point...
for reading a file from sd card using hal and sdio you should follow below steps:
Display All
unfortunately in this board i have no external ram and the file is to big to be save in internal RAM...
my question is how to use above code along side with:
or should i use other functions?
should i use myRES (or &myRES) instead of pfGetData? or should i write another function that contain these codes?
what about p?
thanks.
Sora.
I want to draw bitmap or gif from external sd, but i can't understand some point...
for reading a file from sd card using hal and sdio you should follow below steps:
Source Code
- FATFS myFATFS;
- FIL myFILE;
- UINT myBYTES;
- FRESULT myRES;
- char SDPath[4];
- int size;
- uint8_t* add = (uint8_t *)0xC0000000; // Some address of external SD RAM
- f_mount(&myFATFS, SDPath, 1);
- f_open(&myFILE, "file.bmp", FA_READ);
- size = f_size(&myFILE);
- myRES = f_read(&myFILE, add, size, (UINT *)myBYTES); // read the file and copy it into the external SD RAM
- f_close(&myFILE);
my question is how to use above code along side with:
or should i use other functions?
should i use myRES (or &myRES) instead of pfGetData? or should i write another function that contain these codes?
what about p?
thanks.
Sora.