新手入门
- 积分
- 15
- 金钱
- 15
- 注册时间
- 2019-2-4
- 在线时间
- 13 小时
|
楼主 |
发表于 2020-6-8 21:53:36
|
显示全部楼层
这个刚才在官方论坛找到答案了,是这样实现的- 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*/
- int16_t x;
- int16_t y;
- for(y = area->y1; y <= area->y2; y++) {
- for(x = area->x1; x <= area->x2; x++) {
- if(lv_color_to1(*color_p) == 0) OLED_DrawPoint(x, y, 1);
- else {}
- color_p++;
- }
- }
- /* IMPORTANT!!!
- * Inform the graphics library that you are ready with the flushing*/
- lv_disp_flush_ready(disp_drv);
- }
复制代码 |
|