使用FSMC接口驱动4.7‘LCD,移植LVGL后,不能正常显示,使用了Benchmark测试,有动画,但是与官方的有差异,然后再移植官方的Widgets,屏幕没内容。。。。
static void disp_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p)
{
/*The most simple case (but also the slowest) to put all pixels to the screen one-by-one*/
#if RAW_CODE
int32_t x;
int32_t y;
for(y = area->y1; y <= area->y2; y++) {
for(x = area->x1; x <= area->x2; x++) {
/* Put a pixel to the display. For example: */
/* put_px(x, y, *color_p)*/
color_p++;
}
}
#else
unsigned short int draw_len = area->x2-area->x1+1;
unsigned short int draw_width= area->y2-area->y1+1;
lcd_win_fill(&tft_lcd,area->x1,area->y1,draw_len,draw_width,color_p->full);
#endif
/* IMPORTANT!!!
* Inform the graphics library that you are ready with the flushing*/
lv_disp_flush_ready(disp_drv);
}
lcd_win_fill(&tft_lcd,area->x1,area->y1,draw_len,draw_width,color_p->full);这个函数我单独拿出来是可以画块的
后来用其他的demo,也是没法显示内容,但是有刷屏 |