Setup epdiy_epaper generic driver REF: https://github.com/martinberlin/lv_port_esp32-epaper/issues/2 Flushing too often, drawing only 40 px on top of display

This commit is contained in:
martinberlin 2021-05-28 20:53:08 +02:00
parent db51c38e63
commit a0113e0d5c
9 changed files with 144 additions and 4 deletions

37
lvgl_tft/epdiy_epaper.h Normal file
View file

@ -0,0 +1,37 @@
/**
* Display class for generic e-Paper driven by EPDiy class
*/
#ifndef EPDIY_H
#define EPDIY_H
#define EPDIY_COLUMNS (LV_HOR_RES_MAX / 8)
#ifdef __cplusplus
extern "C" {
#endif
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif
#include "sdkconfig.h"
/* Configure your display */
void epdiy_init(void);
/* LVGL callbacks */
void epdiy_flush(lv_disp_drv_t *drv, const lv_area_t *area, lv_color_t *color_map);
/* Only for monochrome displays. But we use epdiy_set_px also for epapers */
//void epdiy_rounder(lv_disp_drv_t *disp_drv, lv_area_t *area);
void epdiy_set_px_cb(lv_disp_drv_t *disp_drv, uint8_t *buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, lv_color_t color, lv_opa_t opa);
void epdiy_rounder(lv_disp_drv_t * disp_drv, lv_area_t *area);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* EPDIY_H */