Skip to content

Commit

Permalink
Merge pull request #195 from huming2207/feature/uc8151d
Browse files Browse the repository at this point in the history
Initial UC8151D / GoodDisplay GDEW0154M10 DES e-paper panel support
  • Loading branch information
C47D authored Sep 3, 2020
2 parents cf6bc90 + 1ed360a commit 1df1f30
Show file tree
Hide file tree
Showing 8 changed files with 345 additions and 6 deletions.
2 changes: 2 additions & 0 deletions components/lvgl_esp32_drivers/lvgl_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ extern "C" {
#define DISP_BUF_SIZE (LV_HOR_RES_MAX * 40)
#elif defined (CONFIG_LVGL_TFT_DISPLAY_CONTROLLER_JD79653A)
#define DISP_BUF_SIZE ((CONFIG_LVGL_DISPLAY_HEIGHT * CONFIG_LVGL_DISPLAY_WIDTH) / 8) // 5KB
#elif defined (CONFIG_LVGL_TFT_DISPLAY_CONTROLLER_UC8151D)
#define DISP_BUF_SIZE ((CONFIG_LVGL_DISPLAY_HEIGHT * CONFIG_LVGL_DISPLAY_WIDTH) / 8) // 2888 bytes
#else
#error "No display controller selected"
#endif
Expand Down
2 changes: 2 additions & 0 deletions components/lvgl_esp32_drivers/lvgl_tft/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ elseif(CONFIG_LVGL_TFT_DISPLAY_CONTROLLER_IL3820)
list(APPEND SOURCES "il3820.c")
elseif(CONFIG_LVGL_TFT_DISPLAY_CONTROLLER_JD79653A)
list(APPEND SOURCES "jd79653a.c")
elseif(CONFIG_LVGL_TFT_DISPLAY_CONTROLLER_UC8151D)
list(APPEND SOURCES "uc8151d.c")
elseif(CONFIG_LVGL_TFT_DISPLAY_CONTROLLER_RA8875)
list(APPEND SOURCES "ra8875.c")
elseif(CONFIG_LVGL_TFT_DISPLAY_CONTROLLER_GC9A01)
Expand Down
26 changes: 21 additions & 5 deletions components/lvgl_esp32_drivers/lvgl_tft/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ menu "LVGL TFT Display controller"
help
FitiPower JD79653A display controller for GoodDisplay GDEW0154M09 e-paper panel

config LVGL_TFT_DISPLAY_CONTROLLER_UC8151D
bool
help
UltraChip UC8151D display controller with GoodDisplay GDEW0154M10 DES e-paper panel

config LVGL_TFT_DISPLAY_CONTROLLER_RA8875
bool
help
Expand Down Expand Up @@ -278,6 +283,11 @@ menu "LVGL TFT Display controller"
select LVGL_TFT_DISPLAY_CONTROLLER_JD79653A
select LVGL_TFT_DISPLAY_PROTOCOL_SPI
select LVGL_TFT_DISPLAY_MONOCHROME
config LVGL_TFT_DISPLAY_USER_CONTROLLER_UC8151D
bool "UC8151D"
select LVGL_TFT_DISPLAY_CONTROLLER_UC8151D
select LVGL_TFT_DISPLAY_PROTOCOL_SPI
select LVGL_TFT_DISPLAY_MONOCHROME
config LVGL_TFT_DISPLAY_USER_CONTROLLER_RA8875
bool "RA8875"
select LVGL_TFT_DISPLAY_CONTROLLER_RA8875
Expand Down Expand Up @@ -324,8 +334,12 @@ menu "LVGL TFT Display controller"
LVGL_TFT_DISPLAY_CONTROLLER_ST7735S || \
LVGL_TFT_DISPLAY_CONTROLLER_IL3820 || \
LVGL_TFT_DISPLAY_CONTROLLER_RA8875 || \
LVGL_TFT_DISPLAY_CONTROLLER_JD79653A
default LVGL_DISPLAY_ORIENTATION_LANDSCAPE
LVGL_TFT_DISPLAY_CONTROLLER_JD79653A || \
LVGL_TFT_DISPLAY_CONTROLLER_UC8151D
default LVGL_DISPLAY_ORIENTATION_LANDSCAPE \
if !LVGL_TFT_DISPLAY_CONTROLLER_JD79653A || \
!LVGL_TFT_DISPLAY_CONTROLLER_UC8151D
default LVGL_DISPLAY_ORIENTATION_PORTRAIT if LVGL_TFT_DISPLAY_CONTROLLER_JD79653A || LVGL_TFT_DISPLAY_CONTROLLER_UC8151D
help
Display orientation.

Expand All @@ -337,10 +351,12 @@ menu "LVGL TFT Display controller"
config LVGL_DISPLAY_ORIENTATION_LANDSCAPE
bool "Landscape"
depends on !LVGL_TFT_DISPLAY_CONTROLLER_JD79653A
depends on !LVGL_TFT_DISPLAY_CONTROLLER_UC8151D
config LVGL_DISPLAY_ORIENTATION_LANDSCAPE_INVERTED
bool "Inverted Landscape"
depends on !LVGL_TFT_DISPLAY_CONTROLLER_IL3820
depends on !LVGL_TFT_DISPLAY_CONTROLLER_JD79653A
depends on !LVGL_TFT_DISPLAY_CONTROLLER_UC8151D
endchoice


Expand Down Expand Up @@ -407,7 +423,7 @@ menu "LVGL TFT Display controller"
default LVGL_TFT_SPI_CLK_DIVIDER_5 if LVGL_TFT_DISPLAY_CONTROLLER_ILI9481
default LVGL_TFT_SPI_CLK_DIVIDER_3 if LVGL_TFT_DISPLAY_CONTROLLER_HX8357
default LVGL_TFT_SPI_CLK_DIVIDER_10 if LVGL_TFT_DISPLAY_CONTROLLER_SH1107
default LVGL_TFT_SPI_CLK_DIVIDER_16 if LVGL_TFT_DISPLAY_CONTROLLER_JD79653A
default LVGL_TFT_SPI_CLK_DIVIDER_16 if LVGL_TFT_DISPLAY_CONTROLLER_JD79653A || LVGL_TFT_DISPLAY_CONTROLLER_UC8151D
default LVGL_TFT_SPI_CLK_DIVIDER_2

config LVGL_TFT_SPI_CLK_DIVIDER_1
Expand Down Expand Up @@ -758,9 +774,9 @@ menu "LVGL TFT Display controller"
Configure the display Reset pin here.

config LVGL_DISP_PIN_BUSY
int "GPIO for Busy" if LVGL_TFT_DISPLAY_CONTROLLER_IL3820 || LVGL_TFT_DISPLAY_CONTROLLER_JD79653A
int "GPIO for Busy" if LVGL_TFT_DISPLAY_CONTROLLER_IL3820 || LVGL_TFT_DISPLAY_CONTROLLER_JD79653A || LVGL_TFT_DISPLAY_CONTROLLER_UC8151D
range 0 39
default 35 if LVGL_TFT_DISPLAY_CONTROLLER_IL3820 || LVGL_TFT_DISPLAY_CONTROLLER_JD79653A
default 35 if LVGL_TFT_DISPLAY_CONTROLLER_IL3820 || LVGL_TFT_DISPLAY_CONTROLLER_JD79653A || LVGL_TFT_DISPLAY_CONTROLLER_UC8151D
default 35

help
Expand Down
8 changes: 8 additions & 0 deletions components/lvgl_esp32_drivers/lvgl_tft/disp_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ void disp_driver_init(void)
GC9A01_init();
#elif defined CONFIG_LVGL_TFT_DISPLAY_CONTROLLER_JD79653A
jd79653a_init();
#elif defined CONFIG_LVGL_TFT_DISPLAY_CONTROLLER_UC8151D
uc8151d_init();
#endif
}

Expand Down Expand Up @@ -68,6 +70,8 @@ void disp_driver_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t *
GC9A01_flush(drv, area, color_map);
#elif defined CONFIG_LVGL_TFT_DISPLAY_CONTROLLER_JD79653A
jd79653a_lv_fb_flush(drv, area, color_map);
#elif defined CONFIG_LVGL_TFT_DISPLAY_CONTROLLER_UC8151D
uc8151d_lv_fb_flush(drv, area, color_map);
#endif
}

Expand All @@ -81,6 +85,8 @@ void disp_driver_rounder(lv_disp_drv_t * disp_drv, lv_area_t * area)
il3820_rounder(disp_drv, area);
#elif defined CONFIG_LVGL_TFT_DISPLAY_CONTROLLER_JD79653A
jd79653a_lv_rounder_cb(disp_drv, area);
#elif defined CONFIG_LVGL_TFT_DISPLAY_CONTROLLER_UC8151D
uc8151d_lv_rounder_cb(disp_drv, area);
#endif
}

Expand All @@ -95,5 +101,7 @@ void disp_driver_set_px(lv_disp_drv_t * disp_drv, uint8_t * buf, lv_coord_t buf_
il3820_set_px_cb(disp_drv, buf, buf_w, x, y, color, opa);
#elif defined CONFIG_LVGL_TFT_DISPLAY_CONTROLLER_JD79653A
jd79653a_lv_set_fb_cb(disp_drv, buf, buf_w, x, y, color, opa);
#elif defined CONFIG_LVGL_TFT_DISPLAY_CONTROLLER_UC8151D
uc8151d_lv_set_fb_cb(disp_drv, buf, buf_w, x, y, color, opa);
#endif
}
2 changes: 2 additions & 0 deletions components/lvgl_esp32_drivers/lvgl_tft/disp_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ extern "C" {
#include "GC9A01.h"
#elif defined CONFIG_LVGL_TFT_DISPLAY_CONTROLLER_JD79653A
#include "jd79653a.h"
#elif defined CONFIG_LVGL_TFT_DISPLAY_CONTROLLER_UC8151D
#include "uc8151d.h"
#endif

/*********************
Expand Down
Loading

0 comments on commit 1df1f30

Please sign in to comment.