Update ra8875 driver

This commit is contained in:
C47D 2021-01-09 14:54:39 -06:00
parent 1cda575dac
commit 6a451cacf7

View file

@ -37,8 +37,8 @@
#endif #endif
#define BYTES_PER_PIXEL (LV_COLOR_DEPTH / 8) #define BYTES_PER_PIXEL (LV_COLOR_DEPTH / 8)
#define HDWR_VAL (CONFIG_LV_DISPLAY_WIDTH/8 - 1) #define HDWR_VAL (LV_HOR_RES_MAX/8 - 1)
#define VDHR_VAL (CONFIG_LV_DISPLAY_HEIGHT - 1) #define VDHR_VAL (LV_VER_RES_MAX - 1)
#define VDIR_MASK (1 << 2) #define VDIR_MASK (1 << 2)
#define HDIR_MASK (1 << 3) #define HDIR_MASK (1 << 3)
@ -248,7 +248,7 @@ void ra8875_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * colo
#if DEBUG #if DEBUG
ESP_LOGI(TAG, "flush: set window (x1,x2): %d,%d -> %d,%d", x1, x2, area->x1, area->x2); ESP_LOGI(TAG, "flush: set window (x1,x2): %d,%d -> %d,%d", x1, x2, area->x1, area->x2);
#endif #endif
ra8875_set_window(area->x1, area->x2, 0, CONFIG_LV_DISPLAY_HEIGHT-1); ra8875_set_window(area->x1, area->x2, 0, LV_VER_RES_MAX-1);
x1 = area->x1; x1 = area->x1;
x2 = area->x2; x2 = area->x2;
} }
@ -264,7 +264,7 @@ void ra8875_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * colo
// Update to future cursor location // Update to future cursor location
y = area->y2 + 1; y = area->y2 + 1;
if (y >= CONFIG_LV_DISPLAY_HEIGHT) { if (y >= LV_VER_RES_MAX) {
y = 0; y = 0;
} }