voidlv_port_disp_init(void){/*------------------------- * Initialize your display * -----------------------*/disp_init();/*----------------------------- * Create a buffer for drawing *----------------------------*/staticlv_disp_draw_buf_tdraw_buf_dsc_1;staticlv_color_tbuf_1[HOR_RES*10];/*A buffer for 10 rows*/lv_disp_draw_buf_init(&draw_buf_dsc_1,buf_1,NULL,HOR_RES*10);/*Initialize the display buffer*//*----------------------------------- * Register the display in LVGL *----------------------------------*/staticlv_disp_drv_tdisp_drv;/*Descriptor of a display driver*/lv_disp_drv_init(&disp_drv);/*Basic initialization*//*Set up the functions to access to your display*//*Set the resolution of the display*/disp_drv.hor_res=HOR_RES;disp_drv.ver_res=VER_RES;/*Used to copy the buffer's content to the display*/disp_drv.flush_cb=disp_flush;/*Set a display buffer*/disp_drv.draw_buf=&draw_buf_dsc_1;/*Required for Example 3)*/// disp_drv.full_refresh = 1;/*Rotate*/disp_drv.sw_rotate=1;disp_drv.rotated=LV_DISP_ROT_90;/* Fill a memory array with a color if you have GPU. * Note that, in lv_conf.h you can enable GPUs that has built-in support in LVGL. * But if you have a different GPU you can use with this callback.*///disp_drv.gpu_fill_cb = gpu_fill;/*Finally register the driver*/lv_disp_drv_register(&disp_drv);}