Hi,
I already posted a similar question to the stemwin forum but so far without result.
I have a board with an external controller connected via an 8bit bus to my cpu, and my pixels are 16bit 565 format.
Relevant calls setting this up:
GUI_DEVICE_CreateAndLink(GUIDRV_FLEXCOLOR, GUICC_565 , 0, 0);
GUIDRV_FlexColor_SetFunc(pDevice, &PortAPI, GUIDRV_FLEXCOLOR_F66709 , GUIDRV_FLEXCOLOR_M16C0B8 )
I am looking for a way to write raw image data (565 format) directly into the emwin framebuffer (which i assume is raw 565 too, when created with (?) ).
Looking at the documentation and other forum posts i can only find indirect ways to get my data in there (untested):
- I can create a memory device, get its data area (GUI_MEMDEV_GetDataPtr), write directly in there and then write the memory device to the frame buffer (GUI_MEMDEV_CopyToLCDAt) (probably this will work in chunks smaller than the full display).
- I can use a GUI_BITMAP with pMethods = GUI_DRAW_BMP565 and fill its associated pData buffer (chunk or entire screen) with my data, then use GUI_DrawBitmap to transfer the buffer to the frame buffer. (note sure that GUI_DRAW_BMP565 is really raw565 or requires some bmp file formatting)
Both ways are conceptually similar but require using an intermediate buffer and extra copy operation.
I would like to skip this step and write directly into the framebuffer.
But I can't find a way to query where that buffer is located exactly (am equivalent of GUI_MEMDEV_GetDataPtr)...
What am I missing ?
According to the reply to Direct LCD frame buffer access when using STemWin? direct framebuffer access should be possible somehow ?
Regards
Bram
I already posted a similar question to the stemwin forum but so far without result.
I have a board with an external controller connected via an 8bit bus to my cpu, and my pixels are 16bit 565 format.
Relevant calls setting this up:
GUI_DEVICE_CreateAndLink(GUIDRV_FLEXCOLOR, GUICC_565 , 0, 0);
GUIDRV_FlexColor_SetFunc(pDevice, &PortAPI, GUIDRV_FLEXCOLOR_F66709 , GUIDRV_FLEXCOLOR_M16C0B8 )
I am looking for a way to write raw image data (565 format) directly into the emwin framebuffer (which i assume is raw 565 too, when created with (?) ).
Looking at the documentation and other forum posts i can only find indirect ways to get my data in there (untested):
- I can create a memory device, get its data area (GUI_MEMDEV_GetDataPtr), write directly in there and then write the memory device to the frame buffer (GUI_MEMDEV_CopyToLCDAt) (probably this will work in chunks smaller than the full display).
- I can use a GUI_BITMAP with pMethods = GUI_DRAW_BMP565 and fill its associated pData buffer (chunk or entire screen) with my data, then use GUI_DrawBitmap to transfer the buffer to the frame buffer. (note sure that GUI_DRAW_BMP565 is really raw565 or requires some bmp file formatting)
Both ways are conceptually similar but require using an intermediate buffer and extra copy operation.
I would like to skip this step and write directly into the framebuffer.
But I can't find a way to query where that buffer is located exactly (am equivalent of GUI_MEMDEV_GetDataPtr)...
What am I missing ?
According to the reply to Direct LCD frame buffer access when using STemWin? direct framebuffer access should be possible somehow ?
Regards
Bram