Description
I’m trying to port LVGL 8.3 to LVGL 9.2.2, but it seems my display driver initialization never gets past lv_display_set_buffers
. See below for details.
What MCU/Processor/Board and compiler are you using?
I’m using a Raspberry Pi 3 with gcc.
What do you want to achieve?
I simply want my flush callback to be called, but right now it is not.
What have you tried so far?
I tried following the porting example here: lvgl/examples/porting/lv_port_disp_template.c at release/v9.2 · lvgl/lvgl · GitHub
Code to reproduce
A minimal example of my initialization function looks like this:
void lv_display_init(void)
{
my_disp_init();
printf("Creating LVGL display\n");
lv_display_t *disp = lv_display_create(DISPLAY_WIDTH, DISPLAY_HEIGHT);
print("Setting flush cb\n");
lv_display_set_flush_cb(disp, lv_display_flush);
LV_ATTRIBUTE_MEM_ALIGN
printf("Aligning LVGL memory\n");
static uint8_t buffer[DISPLAY_WIDTH * DISPLAY_HEIGHT];
printf("Created buffer\n");
lv_display_set_buffers(disp, buffer, NULL, DISPLAY_WIDTH * DISPLAY_HEIGHT, LV_DISPLAY_RENDER_MODE_DIRECT);
printf("Set buffer\n"); // this line never prints
}
static void lv_display_flush(lv_display_t *display, const lv_area_t *area, uint8_t px_map)
{
printf("Display flush called!\n"); // this never prints either
/* custom driving code here */
lv_disp_flush_read(display);
}
Any idea what is wrong with the above?
(No meaningful screenshots to share)