cancel
Showing results for 
Search instead for 
Did you mean: 

Missing parameter in LCD_LL_DrawBitmap8bpp

bbee
Associate III
Posted on November 22, 2017 at 13:13

According to the emWin manual LCD_SetDevFunc can be used to set additional and / or user defined functions of the display driver.

Examples from STM32CubeF4 are using the function within LCDConf_xxxx.c to set a low layer drawing function for 8bpp bitmaps like

LCD_SetDevFunc(i, LCD_DEVFUNC_DRAWBMP_8BPP, (void(*)(void))LCD_LL_DrawBitmap8bpp);

to use DMA2D for the data transfer. However the emwin manual says:

LCD_DEVFUNC_DRAWBMP_8BPP

Can be used to set up a function which draws 8bpp palette based bitmaps. This can

make sense if for example a BitBLT engine is available to do the job.

The function pointed by

pDriverFunc

should be of the following type:

void DrawBMP8(int LayerIndex,

int x, int y, U8 const * p, int xSize, int ySize,

int BytesPerLine, const LCD_PIXELINDEX * pTrans);

  whereas the passed function pointer in LCDConf_xxxx has the following signature:

static void LCD_LL_DrawBitmap8bpp(int LayerIndex, int x, int y, U8 const * p, int xSize, int ySize, int BytesPerLine)

So the last parameter pTrans is missing. Don't know if this is a problem, but it should be fixed because emWin is passing pTrans anyway.

#stemwin
1 REPLY 1
Imen.D
ST Employee
Posted on November 23, 2017 at 16:52

Hello,

I raised your  issue internally to the appropriate team.

Thank you for your contribution.

Best Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen