From c18dae2c2e5cdac6443b4ec0f0ba3f5e6d4f34f6 Mon Sep 17 00:00:00 2001 From: Wayne Lin Date: Tue, 21 Dec 2021 19:06:02 +0800 Subject: [PATCH] Migrate lv porting folder. --- .../libraries/nu_packages/ILI9341/lcd_ili9341.c | 4 ++-- .../nk-980iot/applications/lvgl/SConscript | 17 +++++------------ .../applications/lvgl/{port => }/lv_conf.h | 1 - .../applications/lvgl/{port => }/lv_demo.c | 0 .../applications/lvgl/{port => }/lv_port_disp.c | 0 .../applications/lvgl/{port => }/lv_port_disp.h | 0 .../lvgl/{port => }/lv_port_indev.c | 0 .../lvgl/{port => }/lv_port_indev.h | 0 .../nk-980iot/applications/lvgl/port/SConscript | 10 ---------- .../nk-n9h30/applications/lvgl/SConscript | 17 +++++------------ .../applications/lvgl/{port => }/lv_conf.h | 3 +-- .../applications/lvgl/{port => }/lv_demo.c | 0 .../applications/lvgl/{port => }/lv_port_disp.c | 2 +- .../applications/lvgl/{port => }/lv_port_disp.h | 0 .../lvgl/{port => }/lv_port_indev.c | 0 .../lvgl/{port => }/lv_port_indev.h | 0 .../nk-n9h30/applications/lvgl/port/SConscript | 10 ---------- 17 files changed, 14 insertions(+), 50 deletions(-) rename bsp/nuvoton/nk-980iot/applications/lvgl/{port => }/lv_conf.h (94%) rename bsp/nuvoton/nk-980iot/applications/lvgl/{port => }/lv_demo.c (100%) rename bsp/nuvoton/nk-980iot/applications/lvgl/{port => }/lv_port_disp.c (100%) rename bsp/nuvoton/nk-980iot/applications/lvgl/{port => }/lv_port_disp.h (100%) rename bsp/nuvoton/nk-980iot/applications/lvgl/{port => }/lv_port_indev.c (100%) rename bsp/nuvoton/nk-980iot/applications/lvgl/{port => }/lv_port_indev.h (100%) delete mode 100644 bsp/nuvoton/nk-980iot/applications/lvgl/port/SConscript rename bsp/nuvoton/nk-n9h30/applications/lvgl/{port => }/lv_conf.h (90%) rename bsp/nuvoton/nk-n9h30/applications/lvgl/{port => }/lv_demo.c (100%) rename bsp/nuvoton/nk-n9h30/applications/lvgl/{port => }/lv_port_disp.c (98%) rename bsp/nuvoton/nk-n9h30/applications/lvgl/{port => }/lv_port_disp.h (100%) rename bsp/nuvoton/nk-n9h30/applications/lvgl/{port => }/lv_port_indev.c (100%) rename bsp/nuvoton/nk-n9h30/applications/lvgl/{port => }/lv_port_indev.h (100%) delete mode 100644 bsp/nuvoton/nk-n9h30/applications/lvgl/port/SConscript diff --git a/bsp/nuvoton/libraries/nu_packages/ILI9341/lcd_ili9341.c b/bsp/nuvoton/libraries/nu_packages/ILI9341/lcd_ili9341.c index 1ea99cb886..31cb6c6d02 100644 --- a/bsp/nuvoton/libraries/nu_packages/ILI9341/lcd_ili9341.c +++ b/bsp/nuvoton/libraries/nu_packages/ILI9341/lcd_ili9341.c @@ -177,8 +177,8 @@ static rt_err_t ili9341_lcd_init(rt_device_t dev) #if defined(NU_PKG_ILI9341_WITH_OFFSCREEN_FRAMEBUFFER) static void ili9341_fillrect(uint16_t *pixels, struct rt_device_rect_info *pRectInfo) { - ili9341_set_column(pRectInfo->x, pRectInfo->x + pRectInfo->width); - ili9341_set_page(pRectInfo->y, pRectInfo->y + pRectInfo->height); + ili9341_set_column(pRectInfo->x, pRectInfo->x + pRectInfo->width - 1); + ili9341_set_page(pRectInfo->y, pRectInfo->y + pRectInfo->height - 1); ili9341_send_cmd(0x2c); ili9341_send_pixels(pixels, pRectInfo->height * pRectInfo->width * 2); diff --git a/bsp/nuvoton/nk-980iot/applications/lvgl/SConscript b/bsp/nuvoton/nk-980iot/applications/lvgl/SConscript index 4cb03b1c72..18f793dbe0 100644 --- a/bsp/nuvoton/nk-980iot/applications/lvgl/SConscript +++ b/bsp/nuvoton/nk-980iot/applications/lvgl/SConscript @@ -1,17 +1,10 @@ -Import('RTT_ROOT') from building import * -import os +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] -objs = [] +group = DefineGroup('LVGL-port', src, depend = ['PKG_USING_LVGL'], CPPPATH = CPPPATH) -if GetDepend('PKG_USING_LVGL'): - cwd = GetCurrentDir() - list = os.listdir(cwd) - for d in list: - path = os.path.join(cwd, d) - if os.path.isfile(os.path.join(path, 'SConscript')): - objs = objs + SConscript(os.path.join(d, 'SConscript')) - -Return('objs') +Return('group') diff --git a/bsp/nuvoton/nk-980iot/applications/lvgl/port/lv_conf.h b/bsp/nuvoton/nk-980iot/applications/lvgl/lv_conf.h similarity index 94% rename from bsp/nuvoton/nk-980iot/applications/lvgl/port/lv_conf.h rename to bsp/nuvoton/nk-980iot/applications/lvgl/lv_conf.h index 1ea0ae2016..b89513bc70 100644 --- a/bsp/nuvoton/nk-980iot/applications/lvgl/port/lv_conf.h +++ b/bsp/nuvoton/nk-980iot/applications/lvgl/lv_conf.h @@ -11,7 +11,6 @@ #ifndef LV_CONF_H #define LV_CONF_H -//#define LV_USE_EXTERNAL_RENDERER 1 #define LV_USE_PERF_MONITOR 1 #define LV_COLOR_DEPTH 16 diff --git a/bsp/nuvoton/nk-980iot/applications/lvgl/port/lv_demo.c b/bsp/nuvoton/nk-980iot/applications/lvgl/lv_demo.c similarity index 100% rename from bsp/nuvoton/nk-980iot/applications/lvgl/port/lv_demo.c rename to bsp/nuvoton/nk-980iot/applications/lvgl/lv_demo.c diff --git a/bsp/nuvoton/nk-980iot/applications/lvgl/port/lv_port_disp.c b/bsp/nuvoton/nk-980iot/applications/lvgl/lv_port_disp.c similarity index 100% rename from bsp/nuvoton/nk-980iot/applications/lvgl/port/lv_port_disp.c rename to bsp/nuvoton/nk-980iot/applications/lvgl/lv_port_disp.c diff --git a/bsp/nuvoton/nk-980iot/applications/lvgl/port/lv_port_disp.h b/bsp/nuvoton/nk-980iot/applications/lvgl/lv_port_disp.h similarity index 100% rename from bsp/nuvoton/nk-980iot/applications/lvgl/port/lv_port_disp.h rename to bsp/nuvoton/nk-980iot/applications/lvgl/lv_port_disp.h diff --git a/bsp/nuvoton/nk-980iot/applications/lvgl/port/lv_port_indev.c b/bsp/nuvoton/nk-980iot/applications/lvgl/lv_port_indev.c similarity index 100% rename from bsp/nuvoton/nk-980iot/applications/lvgl/port/lv_port_indev.c rename to bsp/nuvoton/nk-980iot/applications/lvgl/lv_port_indev.c diff --git a/bsp/nuvoton/nk-980iot/applications/lvgl/port/lv_port_indev.h b/bsp/nuvoton/nk-980iot/applications/lvgl/lv_port_indev.h similarity index 100% rename from bsp/nuvoton/nk-980iot/applications/lvgl/port/lv_port_indev.h rename to bsp/nuvoton/nk-980iot/applications/lvgl/lv_port_indev.h diff --git a/bsp/nuvoton/nk-980iot/applications/lvgl/port/SConscript b/bsp/nuvoton/nk-980iot/applications/lvgl/port/SConscript deleted file mode 100644 index 0ca25f18d4..0000000000 --- a/bsp/nuvoton/nk-980iot/applications/lvgl/port/SConscript +++ /dev/null @@ -1,10 +0,0 @@ -from building import * - -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [cwd] - -group = DefineGroup('LVGL-port', src, depend = [''], CPPPATH = CPPPATH) - -Return('group') - diff --git a/bsp/nuvoton/nk-n9h30/applications/lvgl/SConscript b/bsp/nuvoton/nk-n9h30/applications/lvgl/SConscript index 4cb03b1c72..18f793dbe0 100644 --- a/bsp/nuvoton/nk-n9h30/applications/lvgl/SConscript +++ b/bsp/nuvoton/nk-n9h30/applications/lvgl/SConscript @@ -1,17 +1,10 @@ -Import('RTT_ROOT') from building import * -import os +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] -objs = [] +group = DefineGroup('LVGL-port', src, depend = ['PKG_USING_LVGL'], CPPPATH = CPPPATH) -if GetDepend('PKG_USING_LVGL'): - cwd = GetCurrentDir() - list = os.listdir(cwd) - for d in list: - path = os.path.join(cwd, d) - if os.path.isfile(os.path.join(path, 'SConscript')): - objs = objs + SConscript(os.path.join(d, 'SConscript')) - -Return('objs') +Return('group') diff --git a/bsp/nuvoton/nk-n9h30/applications/lvgl/port/lv_conf.h b/bsp/nuvoton/nk-n9h30/applications/lvgl/lv_conf.h similarity index 90% rename from bsp/nuvoton/nk-n9h30/applications/lvgl/port/lv_conf.h rename to bsp/nuvoton/nk-n9h30/applications/lvgl/lv_conf.h index dd3e3c4b88..9b96e21b8d 100644 --- a/bsp/nuvoton/nk-n9h30/applications/lvgl/port/lv_conf.h +++ b/bsp/nuvoton/nk-n9h30/applications/lvgl/lv_conf.h @@ -11,10 +11,9 @@ #ifndef LV_CONF_H #define LV_CONF_H -//#define LV_USE_EXTERNAL_RENDERER 1 #define LV_USE_GPU_N9H30_GE2D 1 -//#define LV_USE_PERF_MONITOR 1 +#define LV_USE_PERF_MONITOR 1 #define LV_COLOR_DEPTH 32 #define LV_HOR_RES_MAX (800) diff --git a/bsp/nuvoton/nk-n9h30/applications/lvgl/port/lv_demo.c b/bsp/nuvoton/nk-n9h30/applications/lvgl/lv_demo.c similarity index 100% rename from bsp/nuvoton/nk-n9h30/applications/lvgl/port/lv_demo.c rename to bsp/nuvoton/nk-n9h30/applications/lvgl/lv_demo.c diff --git a/bsp/nuvoton/nk-n9h30/applications/lvgl/port/lv_port_disp.c b/bsp/nuvoton/nk-n9h30/applications/lvgl/lv_port_disp.c similarity index 98% rename from bsp/nuvoton/nk-n9h30/applications/lvgl/port/lv_port_disp.c rename to bsp/nuvoton/nk-n9h30/applications/lvgl/lv_port_disp.c index a781817e36..51615b09b7 100644 --- a/bsp/nuvoton/nk-n9h30/applications/lvgl/port/lv_port_disp.c +++ b/bsp/nuvoton/nk-n9h30/applications/lvgl/lv_port_disp.c @@ -5,7 +5,7 @@ * * Change Logs: * Date Author Notes - * 2021-12-17 Wayne The first version + * 2021-12-17 Wayne The first version */ #include diff --git a/bsp/nuvoton/nk-n9h30/applications/lvgl/port/lv_port_disp.h b/bsp/nuvoton/nk-n9h30/applications/lvgl/lv_port_disp.h similarity index 100% rename from bsp/nuvoton/nk-n9h30/applications/lvgl/port/lv_port_disp.h rename to bsp/nuvoton/nk-n9h30/applications/lvgl/lv_port_disp.h diff --git a/bsp/nuvoton/nk-n9h30/applications/lvgl/port/lv_port_indev.c b/bsp/nuvoton/nk-n9h30/applications/lvgl/lv_port_indev.c similarity index 100% rename from bsp/nuvoton/nk-n9h30/applications/lvgl/port/lv_port_indev.c rename to bsp/nuvoton/nk-n9h30/applications/lvgl/lv_port_indev.c diff --git a/bsp/nuvoton/nk-n9h30/applications/lvgl/port/lv_port_indev.h b/bsp/nuvoton/nk-n9h30/applications/lvgl/lv_port_indev.h similarity index 100% rename from bsp/nuvoton/nk-n9h30/applications/lvgl/port/lv_port_indev.h rename to bsp/nuvoton/nk-n9h30/applications/lvgl/lv_port_indev.h diff --git a/bsp/nuvoton/nk-n9h30/applications/lvgl/port/SConscript b/bsp/nuvoton/nk-n9h30/applications/lvgl/port/SConscript deleted file mode 100644 index 0ca25f18d4..0000000000 --- a/bsp/nuvoton/nk-n9h30/applications/lvgl/port/SConscript +++ /dev/null @@ -1,10 +0,0 @@ -from building import * - -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [cwd] - -group = DefineGroup('LVGL-port', src, depend = [''], CPPPATH = CPPPATH) - -Return('group') -