Driving multiple displays with different color depth

Description

I’m planning to use a display that can work at different color depths, but it would be the same when working at the same time with displays with different color depths

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

PC simulator so far, but it will be MSP430 or STM32

What do you want to achieve?

Work with two displays with different color depths

What have you tried so far?

Checked out other cases, but all posts I found involve multiple displays with the same color depth

Code to reproduce


Screenshot and/or video


Isn’t it same than in How to manage 8 colors (RGB111) LCD's? ? I.e. use the larger colordepth for lvgl itself, and then in the flush callback, when outputting data to display physically, just drop the less significant bits.

JW

Well, that might be a way when using the same display (as I’m planning to do). But what if I would use use two separate LCD’s? For example one monochrome and one true color at the same time?

The same - the “rich” display’s driver would use all bits, the “poor” display’s driver would use only MSBs.

JW

Perfect, I’ll do that.

Thank you!

LV_COLOR_DEPTH is global setting and there is no way to render with different color depth on different displays.
What you can do is to manually convert to colors in the monochrome display’s flush_cb function.

Thank you, got the point (finally… :wink:

1 Like

You’re welcome! :slight_smile: