Hi All ,
I am using Infineon XMC 4000 series controllers trying to bring up a display(MSP 3520)
The display has ILI9488 Display controller with resolution 320 * 480.
I am using latest version of LVGL library (V9.1.1) with GCC compiler (V4.9.3)
I know the compiler is pretty old and initially i faced some build errors with the preprocessor #if __has_include(LV_INTTYPES_INCLUDE) and i get to know that it is a compiler Bug which was resolved in later version so for now i commented the above preprocessor.
Apart of this the code is building fine and i tried to display a sample hello world but i observed the flush_cb function is not at all getting called.
Below is the code part.
void handler()
{
lv_tick_inc(1);
}
int main(void)
{
DAVE_STATUS_t status;
status = DAVE_Init(); /* Initialization of DAVE APPs */
if (status != DAVE_STATUS_SUCCESS)
{
/* Placeholder for error handler code. The while loop below can be replaced with an user error handler. */
XMC_DEBUG(“DAVE APPs initialization failed\n”);
while(1U)
{
}
}
/* Initialize LVGL and set up the essential components required for LVGL. */
lv_init();
// lv_log_register_print_cb( my_print );
lv_port_disp_init();
/Change the active screen’s background color/
lv_obj_set_style_bg_color(lv_screen_active(), lv_color_hex(0x003a57), LV_PART_MAIN);
/*Create a white label, set its text and align it to the center*/
lv_obj_t * label = lv_label_create(lv_screen_active());
lv_label_set_text(label, "Hello world");
lv_obj_set_style_text_color(lv_screen_active(), lv_color_hex(0xffffff), LV_PART_MAIN);
lv_obj_align(label, LV_ALIGN_CENTER, 0, 0);
/* Placeholder for user application code. The while loop below can be replaced with user application code. */
while(1U)
{
lv_timer_handler();
for (int i = 0; i < 120000; i++) {
// do nothing, just waste some CPU cycles
}
}
}
void lv_port_disp_init(void)
{
/-------------------------
* Initialize your display
* -----------------------/
disp_init();
/*------------------------------------
* Create a display and set a flush_cb
* -----------------------------------*/
lv_display_t * disp = lv_display_create(MY_DISP_HOR_RES, MY_DISP_VER_RES);
lv_display_set_flush_cb(disp, disp_flush);
/* Example 1
* One buffer for partial rendering*/
static uint8_t buf_1_1[MY_DISP_HOR_RES * 10 * BYTE_PER_PIXEL]; /*A buffer for 10 rows*/
lv_display_set_buffers(disp, buf_1_1, NULL, sizeof(buf_1_1), LV_DISPLAY_RENDER_MODE_PARTIAL);
}
Thanks for looking into topic , Please let me know on how i can proceed forward.
Best Regards
Pradeep.