How to flush image buffer to 3 wire SPI


Need to transfer the image buffer to a display via 3-wire SPI, using therefore the first (extra) bit of a pixel as D/C line. Pixel format is RGB565.

What MCU/Processor/Board and compiler are you using?


What LVGL version are you using?


What do you want to achieve?

Set up the image buffer so portions of it can be flushed to the LCD with first bit set so that the pixel color is treated as data information, instead of command.
Doing a transfer byte by byte would require a lot of SPI transactions, while I’d like to take advantage of a buffer transfer, transferring a chunk of buffer

What have you tried so far?

I was considering using the function set_px_cb() so the pixel is written in the image buffer preceded by 1 bit. I also thought about setting the first bit of the RGB565 pixel renouncing to 16 shades of red. I also googled but couldn’t find suggestions. Looking for better ideas… thank you!