من با دستور GUI_BMP_DrawEx عکس رو روی ال سی دی می ریزم ولی مشکی که هست عکس با سرعت پایین لود میشه دوستان نظری ندارن؟اینم قسمتی از بر نامه ام.
[SIZE=4][B]define SDRAM_BASE_ADDR1 0xa0000000
//#define RECOMMENDED_MEMORY (1024L * 20)
static uint8_t _acBuffer[1843254] __attribute__ ((at(SDRAM_BASE_ADDR1+0x1d4c00)));
int _GetData(void * p, const U8 * * ppData, unsigned NumBytesReq, U32 Off);
int _GetData(void * p, const U8 * * ppData, unsigned NumBytesReq, U32 Off) {
FILE *phfile;
int NumBytesRead;
phfile = (FILE *)p;
//
// Set file pointer to the offset location
//
fseek(phfile, Off, SEEK_SET);
//
// Read data into buffer
//
NumBytesRead = fread(_acBuffer, sizeof(char), NumBytesReq, phfile);
//
// Set data pointer to the beginning of the buffer
//
*ppData = _acBuffer;
//
// Return number of available bytes
//
return NumBytesRead;
}
void MainTask(void) {
WM_HWIN hDlg;
RTC_TIME_Type RTCFullTime;
CALENDAR_DATE DATE;
int sec=1,x,y;
char buffer[20];
GUI_Init();
//while( I2C_WriteByte(1, 0, ADDR_24LC02) );
_ExecCalibration();
//GUI_DrawGradientV(0, 0, 1024, 600, 0x0050fF, 0x20FF50);
F1 = fopen ("BG.bmp","r");
GUI_BMP_DrawEx(&_GetData, F1, 0, 0);
fclose(F1);
//-------------------------------------------------
while (1) {
GUI_X_Delay(1000);
}
[/B][/SIZE]