cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX screen rotation 180 degrees?

How to rotate the entire screen by 180 degrees landscape orientation?

5 REPLIES 5
Romain DIELEMAN
ST Employee

Hi,

Short answer, the 180° rotation is not supported by TouchGFX.

But what is your setup? A lot of displays allow this rotation at a driver level. Another option is to rotate the framebuffer but this is at the expense of a lot of performance loss. You can find how Martin implemented it here in an other post.

/Romain

Hi Romain, thanks for the link. I hadn't seen it before.

I managed to implement it at driver level, by reversing every row, byte and bit in the 1bpp framebuffer. I was really hoping for a more efficient solution and one that would also work for the simulator too, given that 90 degree rotation is supported.

Thanks

Simon

Parallel interface (8080, 6800) displays can do this by setting MADCTL registers, but is driver level flipping possible in RGB interface displays?

Or maybe one can populate framebuffer back-to-front, I don't know...

Another question is relating to my 1bpp black/white screen. In the framebuffer, 0xFF is all white and 0x00 is black/other colour/not set. This causes 2 problems:

  1. If I don't have a white box set as background on every screen, then the whole screen appears black. It defaults all pixels not set to white as black - this includes the checkerboard background in new screens. Is there a way to default all pixels that haven't explicitly been set to black as white?
  2. All images have to be saved as black white e.g in Paint. If I don't then imageconverter converts every pixel to 0x00 black. Is there a way to control imageconverter with a 50% threshold to decide white or black?

Hello, any idea about the 1bpp screen? I've had to add a white box on every screen and save all PNG files as 1bpp. I would have expected that the framebuffer is black only when any pixel is explicitly black.