How to clear just one layer on tft

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

How to clear just one layer on tft

跳至解决方案
247 次查看
cedricpillet
Contributor I

Hello everyone !

I'm working on MPC560XS target with a TFT connected and i'm facing to a major issue.

I can't find a way to clear just one layer (by the 16 available with the freescale library).

 

Here is my application :

I display a picture (with Display_InitLayer() ) with 4bpp clut, and I want to make it blink as if it is a led.

But the only solution I can manage to find is to re-print all elements on the screen which make the one i'm interested to make disappear, disappear, but also all the screen because of the many texts I'm displaying.

 

 

 

Sorry if my english is not very accurate, I will do my best to make me understood.

 

Best regards.

标签 (1)
标记 (2)
0 项奖励
1 解答
183 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

 

If you want just “blink a layer” so the graphic, that is on this layer, disappears and appears again, it should be enough to just toggle the Layer Enable bit  (EN) of the CtrlDescLx_4 register.

Use e.g.

DCU.LAYER[0].CTRLDESCL4.B.EN = 1; and DCU.LAYER[0].CTRLDESCL4.B.EN = 0;

BR, Petr

在原帖中查看解决方案

0 项奖励
2 回复数
184 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

 

If you want just “blink a layer” so the graphic, that is on this layer, disappears and appears again, it should be enough to just toggle the Layer Enable bit  (EN) of the CtrlDescLx_4 register.

Use e.g.

DCU.LAYER[0].CTRLDESCL4.B.EN = 1; and DCU.LAYER[0].CTRLDESCL4.B.EN = 0;

BR, Petr

0 项奖励
183 次查看
cedricpillet
Contributor I

Hi,

Thanks for your answer.

Yes indeed I don't why I didn't manage to make it work before but now it's working.

Though I don't call the register directly but I use the macro instead provided by the freescale library which does the same.

DCU_LayerDisable(layer); which does DCU.LAYER[layer].CTRLDESCL4.B.EN = 0;

Thanks again !

have a nice day.

0 项奖励