Hello,
Almost all display controllers have an option to set all the existing symmetries.
See here.
This function can only set 4, but you can play with the values to get the ‘flip’ you want.
Hope this is helpful.
Thanks for your reply.
You have suggested display orientation and rotation, but I need display flip like vertical and horizontal flip (like mirror image) feature in LVGL.
Please suggest those things.
Hello,
As I said in my previous response most display controller ICs have all the rotations/flips available. You need to look at the controller datasheet. Here is an example for the ILI9486 controller:
Here data_inv contains the register values that include vertical flip. Figuring the values out using just the datasheet is not that easy, but there are only few combinations, so it’s easy to check all of them.
It should be a lot simpler than rotation, since I believe all the flip combinations can be done by iterating over the buffer and swapping values instead of needing a secondary buffer.
However, can’t it be implemented simply by reversing the loops in the user’s flush_cb function? Even a flip transformation within LVGL incurs a performance cost, as that is essentially how I implemented 180-degree rotation. Off the top of my head, I recall a 15-30% performance hit when STM32 was configured to rotate 180 degrees instead of 0.
Unfortunately, it can’t work if the image is sent by DMA in one block. It might work in this particular case though. (area also needs to be mirrored, y=0…10 should be e.g. y=261…271)
Actually NXP pxp for RT1064 has flip and rotation example, Can you help us to integrate these functionalities into lvgl hal_disp layer. This will be more helpful for us or please help guide us to integrate , if we finished we will commit the code into lvgl.