emwin how display bmp file from Sd_Card ?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

emwin how display bmp file from Sd_Card ?

2,190 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Mori_64 on Tue Jul 01 22:57:15 MST 2014
Hello friends

How can i display a bmp file from sd_card in emwin ?
I Have tried "GUI_BMP_Draw" But i wasn't successful .


Thank
标签 (1)
0 项奖励
回复
2 回复数

1,668 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Thu Jul 03 08:32:00 MST 2014
Hi Mori_64,
I did not check your code but segger has sample example here
http://www.segger.com/admin/uploads/userfiles/file/emWin/tutorials/src/2DGL_DrawBMP.c

0 项奖励
回复

1,670 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Mori_64 on Wed Jul 02 22:39:05 MST 2014
as described in ewin manual
Gui_BMP_DRAWEx() "need Getdata  " function

this is my get_data function :

int APP_GetData(void * p, const U8 ** ppData, unsigned NumBytesReq, U32 Off)
{

unsigned int NumBytesRead;
FILE * phFile;

phFile = (FILE *)p;

/* Check buffer size */
if (NumBytesReq > sizeof(_acBuffer)) {
NumBytesReq = sizeof(_acBuffer);
}

/* Set file pointer to the required position */
//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 =(unsigned char *) _acBuffer;

/* Return number of available bytes */
return NumBytesRead;
}

but i can't display image .
0 项奖励
回复