Skip to main content
bbee
Senior
November 22, 2017
Question

Missing parameter in LCD_LL_DrawBitmap8bpp

  • November 22, 2017
  • 1 reply
  • 680 views
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
This topic has been closed for replies.

1 reply

ST Technical Moderator
November 23, 2017
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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks