How to change TouchGFX FrameBuffer to Big Endian?
Good afternoon all,
I have an STM32 controlling a 320x240 LCD using an ILI9341 controller and communicating over a SPI interface. It all works perfectly, using my own interface routines, and almost works perfectly under my initial basic integration of TouchGFX. However, the framebuffer from TouchGFX is stored in RGB565 as Big Endian (i.e. Red is stored as 0xF800). However, it appears thatI need to send them as Little Endian (0x00F8), as the ILI9341 only allows me to specify endianness if I use it in non-SPI mode.
Is there any support in TouchGFX to change endianness in the framebuffer?
Failing that, any suggestions on the best place to rearrange the bytes? Currently, I transfer entire rows on SPI (I can't do the whole buffer each time as I am catering for partial updates). Falling back to transferring byte-per-byte to flip them seems clunky. But also, having to flip the framebuffer before transmitting also seems unnecessary!
I hope I am missing something fundamental here though :)
Any help much appreciated.
Thanks
Nick
