Emwin runtime orientation

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

Emwin runtime orientation

跳至解决方案
2,779 次查看
iann
Contributor III

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

标签 (2)
0 项奖励
回复
1 解答
2,717 次查看
Alexis_A
NXP TechSupport
NXP TechSupport

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

在原帖中查看解决方案

0 项奖励
回复
3 回复数
2,718 次查看
Alexis_A
NXP TechSupport
NXP TechSupport

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

0 项奖励
回复
2,717 次查看
iann
Contributor III

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

0 项奖励
回复
2,717 次查看
iann
Contributor III

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.

0 项奖励
回复