init disp resolution

This commit is contained in:
Gabor Kiss-Vamosi
2019-02-22 14:22:11 +01:00
parent 69456cd3f5
commit c34d5a4f6b
2 changed files with 6 additions and 0 deletions

View File

@@ -82,6 +82,8 @@ v_disp_buf_init(&disp_buf1, buf, NULL, LV_HOR_RES_MAX * 10); /*Initialize the
```c
lv_disp_drv_t disp_drv; /*Descriptor of a display driver*/
lv_disp_drv_init(&disp_drv); /*Basic initialization*/
disp_drv.hor_res = 480; /*Set the horizontal resolution*/
disp_drv.ver_res = 320; /*Set the vertical resolution*/
disp_drv.flush_cb = my_disp_flush; /*Set your driver function*/
disp_drv.buffer = &disp_buf; /*Assign the buffer to teh display*/
lv_disp_drv_register(&disp_drv); /*Finally register the driver*/

View File

@@ -93,6 +93,10 @@ void lv_port_disp_init(void)
/*Set up the functions to access to your display*/
/*Set the resolution of the display*/
disp_drv.hor_res = 480;
disp_drv.ver_res = 320;
/*Used to copy the buffer's content to the display*/
disp_drv.flush_cb = disp_flush;