Hi all,
I've got a successful implementation of the emwin libraries running on a LPC54608 hooked up to a ST7789 driven display (320x240, 18bits per pixel) working well displaying text and graphics and can set the orientation correctly as desired at compile time, but there's a requirement to change the orientation during running time if the product is tilted.
I've tried using the function, flag=GUI_SetOrientation(GUI_MIRROR_X |GUI_MIRROR_Y);
This is always returning 1 indicating an error.
I've increased the memory set aside from GUI_NUMBYTES 0x8000 to 0x16000 if memory was a problem but the issue remains.
Are there any other areas I should be looking at?
Any help would be greatly appreciated.
Cheers
Ian
解決済! 解決策の投稿を見る。
Hello iann,
In the EMWIN reference manual mention that the size of your buffer should be according to the next equation:
Virtual xSize * Virtual ySize * BytesPerPixel
So I think the size of GUI_NUMBYTES should be around 0x2A300
Let me know if this helps you.
Best Regards,
Alexis Andalon
Hello iann,
In the EMWIN reference manual mention that the size of your buffer should be according to the next equation:
Virtual xSize * Virtual ySize * BytesPerPixel
So I think the size of GUI_NUMBYTES should be around 0x2A300
Let me know if this helps you.
Best Regards,
Alexis Andalon
Thanks Alexis,
That is too much sram for the eval board to cope with at the moment so just for a test I reduced the width and height of the lcd defines and I was able to rotate a quarter of the screen. In the final product this shouldn't be a problem as we'll have external sram but I'll look for a better solution.
Kind regards
Ian
Since, I've found the driver we're using GUIDRV_FLEXCOLOR supports this directly so the function GUIDRV_FlexColor_SetOrientation can be called instead and doesn't require the extra memory to be allocated.