What MCU/Processor/Board and compiler are you using?
Esp32 toolchain on VSCode
What LVGL version are you using?
9.1
What do you want to achieve?
I want to swap color bytes order.
What have you tried so far?
I’ve tried to #define LV_DRAW_SW_RGB565_SWAP in lv_draw_sw.h and also lv_conf.h but an error is thrown becuse when lv_draw_sw_rgb565_swap is called, also this macro LV_DRAW_SW_RGB565_SWAP is called, and it doesn’t seem to be defined correctly.
in lvgl 8 it was super easy, you just had to define LV_COLOR_16_SWAP in your lv_conf.h and everything was OK.
In lv_display.h i’ve found some lines that tells to call lv_draw_sw_rgb565_swap in my flusc_cb, but i don’t have idea on where (and with which parameters) i have to do that call.
I just havent found documentation about it for v9.
Code to reproduce
The code block(s) should be formatted like:
/*You code here*/
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.
Thanks a lot, i was just replying to myself saying to the world how i solved. Actually i made it the way lvgl v8 made it. In the function call_flush_cb in the file lvgl/core/lv_ref.c, I added lv_draw_sw_rgb565_swap(px_map, lv_area_get_size(&offset_area));. In lvgl8 they also made a check using #ifdef and a constant, something like LV_16_SWAP but i’m not sure 100% about the name. Anyway, that constant was configurable in lv_conf.h and lv_ref.c knew about it. Since v9, lv_ref.c has no access (i.e. doesnt include it) to lv_conf.h. So, instead of adding a constant and including lv_conf.h in lv_ref.c (modifying even more lvgl structure) of lv_conf.h i just preferred to call the byte swapping.