Skip to content

Commit

Permalink
[bsp] 修复bsp自带的lvgl移植 (RT-Thread#8357)
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-cn authored Dec 10, 2023
1 parent 5b26a58 commit a1df90d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <board.h>
#include <drv_lcd.h>

#define LCD_DEV_NAME "lcd"
// #define MY_DISP_HOR_RES LCD_W
// #define DISP_BUFFER_LINES 70

Expand Down Expand Up @@ -65,6 +66,11 @@ void lv_port_disp_init(void)
/*Used to copy the buffer's content to the display*/
disp_drv.flush_cb = disp_flush;

/*Init lcd device*/
rt_device_t lcd_dev = rt_device_find(LCD_DEV_NAME);
rt_device_open(lcd_dev, RT_DEVICE_FLAG_STANDALONE);
disp_drv.user_data = lcd_dev;

/*Finally register the driver*/
lv_disp_drv_register(&disp_drv);
}

0 comments on commit a1df90d

Please sign in to comment.