Procházet zdrojové kódy

Merge branch 'master' of https://gitee.com/openLuat/LuatOS

alienwalker před 4 roky
rodič
revize
f4f28565cf

+ 3 - 0
bsp/win32/include/luat_conf_bsp.h

@@ -27,6 +27,9 @@
 
 #define LUAT_FORCE_WIN32 1
 
+#define LV_COLOR_16_SWAP 1
+#define LV_COLOR_DEPTH 16
+
 #define LUAT_USE_LVGL 1
 #define LV_MEM_CUSTOM 1
 #define LUAT_LV_DEBUG 0

+ 3 - 0
components/lcd/luat_lcd.c

@@ -19,6 +19,9 @@ void luat_lcd_execute_cmds(luat_lcd_conf_t* conf, uint32_t* cmds, uint32_t count
     {
         cmd = cmds[i];
         switch(((cmd >> 16) & 0xFFFF)) {
+            case 0x0000 :
+                lcd_write_cmd(conf, (const uint8_t)(cmd & 0xFF));
+                break;
             case 0x0001 :
                 luat_timer_mdelay(cmd & 0xFF);
                 break;

+ 2 - 2
components/lcd/luat_lcd_gc9106l.c

@@ -40,8 +40,8 @@ static int gc9106l_init(luat_lcd_conf_t* conf) {
 
     lcd_write_cmd(conf,0x21);
     lcd_write_cmd(conf,0x36);
-    if(conf->direction==0)lcd_write_data(conf,0x08);
-    else if(conf->direction==1)lcd_write_data(conf,0xC8);
+    if(conf->direction==0)lcd_write_data(conf,0xC8);
+    else if(conf->direction==1)lcd_write_data(conf,0x08);
     else if(conf->direction==2)lcd_write_data(conf,0x68);
     else lcd_write_data(conf,0xA8);
 

+ 176 - 176
components/lcd/luat_lcd_gc9306.c → components/lcd/luat_lcd_gc9306x.c

@@ -1,176 +1,176 @@
-#include "luat_base.h"
-#include "luat_lcd.h"
-#include "luat_gpio.h"
-#include "luat_spi.h"
-#include "luat_malloc.h"
-#include "luat_timer.h"
-
-#define LUAT_LOG_TAG "gc9306"
-#include "luat_log.h"
-
-#define LCD_W 240
-#define LCD_H 320
-#define LCD_DIRECTION 0
-
-static int gc9306_init(luat_lcd_conf_t* conf) {
-    if (conf->w == 0)
-        conf->w = LCD_W;
-    if (conf->h == 0)
-        conf->h = LCD_H;
-    if (conf->direction == 0)
-        conf->direction = LCD_DIRECTION;
-
-    if (conf->pin_pwr != 255)
-        luat_gpio_mode(conf->pin_pwr, Luat_GPIO_OUTPUT, Luat_GPIO_DEFAULT, Luat_GPIO_LOW); // POWER
-    luat_gpio_mode(conf->pin_dc, Luat_GPIO_OUTPUT, Luat_GPIO_DEFAULT, Luat_GPIO_HIGH); // DC
-    luat_gpio_mode(conf->pin_rst, Luat_GPIO_OUTPUT, Luat_GPIO_DEFAULT, Luat_GPIO_LOW); // RST
-
-    if (conf->pin_pwr != 255)
-        luat_gpio_set(conf->pin_pwr, Luat_GPIO_LOW);
-    luat_gpio_set(conf->pin_rst, Luat_GPIO_LOW);
-    luat_timer_mdelay(100);
-    luat_gpio_set(conf->pin_rst, Luat_GPIO_HIGH);
-
-    // 发送初始化命令
-    lcd_write_cmd(conf,0xfe);
-    lcd_write_cmd(conf,0xef);
-
-    lcd_write_cmd(conf,0x36);
-    if(conf->direction==0)lcd_write_data(conf,0x48);
-    else if(conf->direction==1)lcd_write_data(conf,0xE8);
-    else if(conf->direction==2)lcd_write_data(conf,0x28);
-    else lcd_write_data(conf,0x38);
-
-    lcd_write_cmd(conf,0x3a);
-    lcd_write_data(conf,0x05);
-
-    lcd_write_cmd(conf,0xad);
-    lcd_write_data(conf,0x33);
-    lcd_write_cmd(conf,0xaf);
-    lcd_write_data(conf,0x55);
-    lcd_write_cmd(conf,0xae);
-    lcd_write_data(conf,0x2b);
-
-    lcd_write_cmd(conf,0xa4);
-    lcd_write_data(conf,0x44);
-    lcd_write_data(conf,0x44);
-
-    lcd_write_cmd(conf,0xa5);
-    lcd_write_data(conf,0x42);
-    lcd_write_data(conf,0x42);
-
-    lcd_write_cmd(conf,0xaa);
-    lcd_write_data(conf,0x88);
-    lcd_write_data(conf,0x88);
-
-    lcd_write_cmd(conf,0xae);
-    lcd_write_data(conf,0x2b);
-
-    lcd_write_cmd(conf,0xe8);
-    lcd_write_data(conf,0x11);
-    lcd_write_data(conf,0x0b);
-
-    lcd_write_cmd(conf,0xe3);
-    lcd_write_data(conf,0x01);
-    lcd_write_data(conf,0x10);
-
-    lcd_write_cmd(conf,0xff);
-    lcd_write_data(conf,0x61);
-    lcd_write_cmd(conf,0xac);
-    lcd_write_data(conf,0x00);
-
-    lcd_write_cmd(conf,0xaf);
-    lcd_write_data(conf,0x67);
-    lcd_write_cmd(conf,0xa6);
-    lcd_write_data(conf,0x2a);
-    lcd_write_data(conf,0x2a);
-
-    lcd_write_cmd(conf,0xa7);
-    lcd_write_data(conf,0x2b);
-    lcd_write_data(conf,0x2b);
-
-    lcd_write_cmd(conf,0xa8);
-    lcd_write_data(conf,0x18);
-    lcd_write_data(conf,0x18);
-
-    lcd_write_cmd(conf,0xa9);
-    lcd_write_data(conf,0x2a);
-    lcd_write_data(conf,0x2a);
-
-    lcd_write_cmd(conf,0x2a);
-    lcd_write_data(conf,0x00);
-    lcd_write_data(conf,0x00);
-    lcd_write_data(conf,0x00);
-    lcd_write_data(conf,0xef);
-    lcd_write_cmd(conf,0x2b);
-    lcd_write_data(conf,0x00);
-    lcd_write_data(conf,0x00);
-    lcd_write_data(conf,0x01);
-    lcd_write_data(conf,0x3f);
-    lcd_write_cmd(conf,0x2c);
-
-    lcd_write_cmd(conf,0xF0);
-    lcd_write_data(conf,0x02);
-    lcd_write_data(conf,0x00);
-    lcd_write_data(conf,0x00);
-    lcd_write_data(conf,0x1b);
-    lcd_write_data(conf,0x1f);
-    lcd_write_data(conf,0x0b);
-
-    lcd_write_cmd(conf,0xF1);
-    lcd_write_data(conf,0x01);
-    lcd_write_data(conf,0x03);
-    lcd_write_data(conf,0x00);
-    lcd_write_data(conf,0x28);
-    lcd_write_data(conf,0x2b);
-    lcd_write_data(conf,0x0e);
-
-    lcd_write_cmd(conf,0xF2);
-    lcd_write_data(conf,0x0b);
-    lcd_write_data(conf,0x08);
-    lcd_write_data(conf,0x3b);
-    lcd_write_data(conf,0x04);
-    lcd_write_data(conf,0x03);
-    lcd_write_data(conf,0x4c);
-
-    lcd_write_cmd(conf,0xF3);
-    lcd_write_data(conf,0x0e);
-    lcd_write_data(conf,0x07);
-    lcd_write_data(conf,0x46);
-    lcd_write_data(conf,0x04);
-    lcd_write_data(conf,0x05);
-    lcd_write_data(conf,0x51);
-
-    lcd_write_cmd(conf,0xF4);
-    lcd_write_data(conf,0x08);
-    lcd_write_data(conf,0x15);
-    lcd_write_data(conf,0x15);
-    lcd_write_data(conf,0x1f);
-    lcd_write_data(conf,0x22);
-    lcd_write_data(conf,0x0F);
-
-    lcd_write_cmd(conf,0xF5);
-    lcd_write_data(conf,0x0b);
-    lcd_write_data(conf,0x13);
-    lcd_write_data(conf,0x11);
-    lcd_write_data(conf,0x1f);
-    lcd_write_data(conf,0x21);
-    lcd_write_data(conf,0x0F);
-
-    /* Sleep Out */
-    lcd_write_cmd(conf,0x11);
-    /* wait for power stability */
-    luat_timer_mdelay(100);
-    lcd_write_cmd(conf,0x2c);
-    luat_lcd_clear(conf,WHITE);
-    /* display on */
-    luat_lcd_display_on(conf);
-    lcd_write_cmd(conf,0x2c);
-    return 0;
-};
-
-const luat_lcd_opts_t lcd_opts_gc9306 = {
-    .name = "gc9306",
-    .init = gc9306_init,
-};
-
+#include "luat_base.h"
+#include "luat_lcd.h"
+#include "luat_gpio.h"
+#include "luat_spi.h"
+#include "luat_malloc.h"
+#include "luat_timer.h"
+
+#define LUAT_LOG_TAG "gc9306x"
+#include "luat_log.h"
+
+#define LCD_W 240
+#define LCD_H 320
+#define LCD_DIRECTION 0
+
+static int gc9306x_init(luat_lcd_conf_t* conf) {
+    if (conf->w == 0)
+        conf->w = LCD_W;
+    if (conf->h == 0)
+        conf->h = LCD_H;
+    if (conf->direction == 0)
+        conf->direction = LCD_DIRECTION;
+
+    if (conf->pin_pwr != 255)
+        luat_gpio_mode(conf->pin_pwr, Luat_GPIO_OUTPUT, Luat_GPIO_DEFAULT, Luat_GPIO_LOW); // POWER
+    luat_gpio_mode(conf->pin_dc, Luat_GPIO_OUTPUT, Luat_GPIO_DEFAULT, Luat_GPIO_HIGH); // DC
+    luat_gpio_mode(conf->pin_rst, Luat_GPIO_OUTPUT, Luat_GPIO_DEFAULT, Luat_GPIO_LOW); // RST
+
+    if (conf->pin_pwr != 255)
+        luat_gpio_set(conf->pin_pwr, Luat_GPIO_LOW);
+    luat_gpio_set(conf->pin_rst, Luat_GPIO_LOW);
+    luat_timer_mdelay(100);
+    luat_gpio_set(conf->pin_rst, Luat_GPIO_HIGH);
+
+    // 发送初始化命令
+    lcd_write_cmd(conf,0xfe);
+    lcd_write_cmd(conf,0xef);
+
+    lcd_write_cmd(conf,0x36);
+    if(conf->direction==0)lcd_write_data(conf,0x48);
+    else if(conf->direction==1)lcd_write_data(conf,0xE8);
+    else if(conf->direction==2)lcd_write_data(conf,0x28);
+    else lcd_write_data(conf,0x38);
+
+    lcd_write_cmd(conf,0x3a);
+    lcd_write_data(conf,0x05);
+
+    lcd_write_cmd(conf,0xad);
+    lcd_write_data(conf,0x33);
+    lcd_write_cmd(conf,0xaf);
+    lcd_write_data(conf,0x55);
+    lcd_write_cmd(conf,0xae);
+    lcd_write_data(conf,0x2b);
+
+    lcd_write_cmd(conf,0xa4);
+    lcd_write_data(conf,0x44);
+    lcd_write_data(conf,0x44);
+
+    lcd_write_cmd(conf,0xa5);
+    lcd_write_data(conf,0x42);
+    lcd_write_data(conf,0x42);
+
+    lcd_write_cmd(conf,0xaa);
+    lcd_write_data(conf,0x88);
+    lcd_write_data(conf,0x88);
+
+    lcd_write_cmd(conf,0xae);
+    lcd_write_data(conf,0x2b);
+
+    lcd_write_cmd(conf,0xe8);
+    lcd_write_data(conf,0x11);
+    lcd_write_data(conf,0x0b);
+
+    lcd_write_cmd(conf,0xe3);
+    lcd_write_data(conf,0x01);
+    lcd_write_data(conf,0x10);
+
+    lcd_write_cmd(conf,0xff);
+    lcd_write_data(conf,0x61);
+    lcd_write_cmd(conf,0xac);
+    lcd_write_data(conf,0x00);
+
+    lcd_write_cmd(conf,0xaf);
+    lcd_write_data(conf,0x67);
+    lcd_write_cmd(conf,0xa6);
+    lcd_write_data(conf,0x2a);
+    lcd_write_data(conf,0x2a);
+
+    lcd_write_cmd(conf,0xa7);
+    lcd_write_data(conf,0x2b);
+    lcd_write_data(conf,0x2b);
+
+    lcd_write_cmd(conf,0xa8);
+    lcd_write_data(conf,0x18);
+    lcd_write_data(conf,0x18);
+
+    lcd_write_cmd(conf,0xa9);
+    lcd_write_data(conf,0x2a);
+    lcd_write_data(conf,0x2a);
+
+    lcd_write_cmd(conf,0x2a);
+    lcd_write_data(conf,0x00);
+    lcd_write_data(conf,0x00);
+    lcd_write_data(conf,0x00);
+    lcd_write_data(conf,0xef);
+    lcd_write_cmd(conf,0x2b);
+    lcd_write_data(conf,0x00);
+    lcd_write_data(conf,0x00);
+    lcd_write_data(conf,0x01);
+    lcd_write_data(conf,0x3f);
+    lcd_write_cmd(conf,0x2c);
+
+    lcd_write_cmd(conf,0xF0);
+    lcd_write_data(conf,0x02);
+    lcd_write_data(conf,0x00);
+    lcd_write_data(conf,0x00);
+    lcd_write_data(conf,0x1b);
+    lcd_write_data(conf,0x1f);
+    lcd_write_data(conf,0x0b);
+
+    lcd_write_cmd(conf,0xF1);
+    lcd_write_data(conf,0x01);
+    lcd_write_data(conf,0x03);
+    lcd_write_data(conf,0x00);
+    lcd_write_data(conf,0x28);
+    lcd_write_data(conf,0x2b);
+    lcd_write_data(conf,0x0e);
+
+    lcd_write_cmd(conf,0xF2);
+    lcd_write_data(conf,0x0b);
+    lcd_write_data(conf,0x08);
+    lcd_write_data(conf,0x3b);
+    lcd_write_data(conf,0x04);
+    lcd_write_data(conf,0x03);
+    lcd_write_data(conf,0x4c);
+
+    lcd_write_cmd(conf,0xF3);
+    lcd_write_data(conf,0x0e);
+    lcd_write_data(conf,0x07);
+    lcd_write_data(conf,0x46);
+    lcd_write_data(conf,0x04);
+    lcd_write_data(conf,0x05);
+    lcd_write_data(conf,0x51);
+
+    lcd_write_cmd(conf,0xF4);
+    lcd_write_data(conf,0x08);
+    lcd_write_data(conf,0x15);
+    lcd_write_data(conf,0x15);
+    lcd_write_data(conf,0x1f);
+    lcd_write_data(conf,0x22);
+    lcd_write_data(conf,0x0F);
+
+    lcd_write_cmd(conf,0xF5);
+    lcd_write_data(conf,0x0b);
+    lcd_write_data(conf,0x13);
+    lcd_write_data(conf,0x11);
+    lcd_write_data(conf,0x1f);
+    lcd_write_data(conf,0x21);
+    lcd_write_data(conf,0x0F);
+
+    /* Sleep Out */
+    lcd_write_cmd(conf,0x11);
+    /* wait for power stability */
+    luat_timer_mdelay(100);
+    lcd_write_cmd(conf,0x2c);
+    luat_lcd_clear(conf,WHITE);
+    /* display on */
+    luat_lcd_display_on(conf);
+    lcd_write_cmd(conf,0x2c);
+    return 0;
+};
+
+const luat_lcd_opts_t lcd_opts_gc9306x = {
+    .name = "gc9306x",
+    .init = gc9306x_init,
+};
+

+ 1 - 1
components/lcd/luat_lcd_st7789.c

@@ -26,7 +26,7 @@ static int st7789_init(luat_lcd_conf_t* conf) {
     luat_gpio_mode(conf->pin_rst, Luat_GPIO_OUTPUT, Luat_GPIO_DEFAULT, Luat_GPIO_LOW); // RST
 
     if (conf->pin_pwr != 255)
-    luat_gpio_set(conf->pin_pwr, Luat_GPIO_LOW);
+        luat_gpio_set(conf->pin_pwr, Luat_GPIO_LOW);
     luat_gpio_set(conf->pin_rst, Luat_GPIO_LOW);
     luat_timer_mdelay(100);
     luat_gpio_set(conf->pin_rst, Luat_GPIO_HIGH);

+ 4 - 4
components/lcd/luat_lib_lcd.c

@@ -47,7 +47,7 @@ extern const luat_lcd_opts_t lcd_opts_st7735s;
 extern const luat_lcd_opts_t lcd_opts_st7789;
 extern const luat_lcd_opts_t lcd_opts_gc9a01;
 extern const luat_lcd_opts_t lcd_opts_gc9106l;
-extern const luat_lcd_opts_t lcd_opts_gc9306;
+extern const luat_lcd_opts_t lcd_opts_gc9306x;
 extern const luat_lcd_opts_t lcd_opts_ili9341;
 extern const luat_lcd_opts_t lcd_opts_ili9488;
 extern const luat_lcd_opts_t lcd_opts_custom;
@@ -61,7 +61,7 @@ const luat_lcd_opts_t *lcd_opts[] = {
   &lcd_opts_st7789,   //4
   &lcd_opts_gc9a01,   //5
   &lcd_opts_gc9106l,  //6
-  &lcd_opts_gc9306,   //7
+  &lcd_opts_gc9306x,   //7
   &lcd_opts_ili9341,  //8
   &lcd_opts_ili9488,  //9
 };
@@ -73,7 +73,7 @@ const char *lcd_name[] = {
   "st7789",   //4
   "gc9a01",   //5
   "gc9106l",  //6
-  "gc9306",   //7
+  "gc9306x",   //7
   "ili9341",  //8
   "ili9488",  //9
 };
@@ -86,7 +86,7 @@ static uint32_t lcd_str_fg_color,lcd_str_bg_color;
 /*
 lcd显示屏初始化
 @api lcd.init(tp, args)
-@string lcd类型, 当前支持st7789/st7735/st7735v/st7735s/gc9a01/gc9106l/gc9306/ili9341/custom
+@string lcd类型, 当前支持st7789/st7735/st7735v/st7735s/gc9a01/gc9106l/gc9306x/ili9341/custom
 @table 附加参数,与具体设备有关,pin_pwr为可选项,可不设置port:spi端口,例如0,1,2...如果为device方式则为"device";pin_dc:lcd数据/命令选择引脚;pin_rst:lcd复位引脚;pin_pwr:lcd背光引脚 可选项,可不设置;direction:lcd屏幕方向 0:0° 1:180° 2:270° 3:90°;w:lcd 水平分辨率;h:lcd 竖直分辨率;xoffset:x偏移(不同屏幕ic 不同屏幕方向会有差异);yoffset:y偏移(不同屏幕ic 不同屏幕方向会有差异)
 @userdata spi设备,当port = "device"时有效
 @usage

+ 1 - 1
demo/camera/Air105/capture/main.lua

@@ -40,7 +40,7 @@ lcd.init("st7789",{port = "device",pin_dc = pin.PE08 ,pin_rst = pin.PC12,pin_pwr
 -- lcd.init("st7735",{port = "device",pin_dc = pin.PE08 ,pin_rst = pin.PC12,pin_pwr = pin.PE09,direction = 0,w = 128,h = 160,xoffset = 2,yoffset = 1},spi_lcd))
 
 -- log.info("lcd.init",
--- lcd.init("gc9306",{port = "device",pin_dc = pin.PE08 ,pin_rst = pin.PC12,pin_pwr = pin.PE09,direction = 0,w = 240,h = 320,xoffset = 0,yoffset = 0},spi_lcd))
+-- lcd.init("gc9306x",{port = "device",pin_dc = pin.PE08 ,pin_rst = pin.PC12,pin_pwr = pin.PE09,direction = 0,w = 240,h = 320,xoffset = 0,yoffset = 0},spi_lcd))
 
 --GC032A输出rgb图像初始化命令
 local GC032A_InitReg =

+ 1 - 1
demo/camera/Air105/scanner/main.lua

@@ -40,7 +40,7 @@ lcd.init("st7789",{port = "device",pin_dc = pin.PE08 ,pin_rst = pin.PC12,pin_pwr
 -- lcd.init("st7735",{port = "device",pin_dc = pin.PE08 ,pin_rst = pin.PC12,pin_pwr = pin.PE09,direction = 0,w = 128,h = 160,xoffset = 2,yoffset = 1},spi_lcd))
 
 -- log.info("lcd.init",
--- lcd.init("gc9306",{port = "device",pin_dc = pin.PE08 ,pin_rst = pin.PC12,pin_pwr = pin.PE09,direction = 0,w = 240,h = 320,xoffset = 0,yoffset = 0},spi_lcd))
+-- lcd.init("gc9306x",{port = "device",pin_dc = pin.PE08 ,pin_rst = pin.PC12,pin_pwr = pin.PE09,direction = 0,w = 240,h = 320,xoffset = 0,yoffset = 0},spi_lcd))
 
 --GC032A输出灰度图像初始化命令
 local GC032A_InitReg_Gray =

+ 1 - 1
demo/camera/Air105/synthesis/main.lua

@@ -40,7 +40,7 @@ spi_lcd = spi.deviceSetup(5,pin.PC14,0,0,8,48*1000*1000,spi.MSB,1,1)
 -- lcd.init("st7735",{port = "device",pin_dc = pin.PE08 ,pin_rst = pin.PC12,pin_pwr = pin.PE09,direction = 0,w = 128,h = 160,xoffset = 2,yoffset = 1},spi_lcd))
 
 log.info("lcd.init",
-lcd.init("gc9306",{port = "device",pin_dc = pin.PE08 ,pin_rst = pin.PC12,pin_pwr = pin.PE09,direction = 0,w = 240,h = 320,xoffset = 0,yoffset = 0},spi_lcd))
+lcd.init("gc9306x",{port = "device",pin_dc = pin.PE08 ,pin_rst = pin.PC12,pin_pwr = pin.PE09,direction = 0,w = 240,h = 320,xoffset = 0,yoffset = 0},spi_lcd))
 
 --GC032A输出rgb图像初始化命令
 local GC032A_InitReg =

+ 1 - 1
demo/lcd/Air105/main.lua

@@ -49,7 +49,7 @@ spi_lcd = spi.deviceSetup(5,pin.PC14,0,0,8,96*1000*1000,spi.MSB,1,1)
 -- lcd.init("st7735",{port = "device",pin_dc = pin.PE08 ,pin_rst = pin.PC12,pin_pwr = pin.PE09,direction = 0,w = 128,h = 160,xoffset = 2,yoffset = 1},spi_lcd))
 
 log.info("lcd.init",
-lcd.init("gc9306",{port = "device",pin_dc = pin.PE08 ,pin_rst = pin.PC12,pin_pwr = pin.PE09,direction = 0,w = 240,h = 320,xoffset = 0,yoffset = 0},spi_lcd))
+lcd.init("gc9306x",{port = "device",pin_dc = pin.PE08 ,pin_rst = pin.PC12,pin_pwr = pin.PE09,direction = 0,w = 240,h = 320,xoffset = 0,yoffset = 0},spi_lcd))
 
 --下面为custom方式示例,自己传入lcd指令来实现驱动,示例以st7735s做展示
 -- log.info("lcd.init",

+ 1 - 1
demo/lvgl/Air105/main.lua

@@ -55,7 +55,7 @@ spi_lcd = spi.deviceSetup(5,pin.PC14,0,0,8,96*1000*1000,spi.MSB,1,1)
 -- log.info("lcd.init",
 -- lcd.init("st7735s",{port = "device",pin_dc = pin.PE8,pin_rst = pin.PC12,pin_pwr = pin.PE9,direction = 2,w = 160,h = 80,xoffset = 1,yoffset = 26},spi_lcd))
 log.info("lcd.init",
-lcd.init("gc9306",{port = "device",pin_dc = pin.PE8,pin_rst = pin.PC12,pin_pwr = pin.PE9,direction = 0,w = 240,h = 320,xoffset = 0,yoffset = 0},spi_lcd))
+lcd.init("gc9306x",{port = "device",pin_dc = pin.PE8,pin_rst = pin.PC12,pin_pwr = pin.PE9,direction = 0,w = 240,h = 320,xoffset = 0,yoffset = 0},spi_lcd))
 -- log.info("lcd.init",
 -- lcd.init("ili9341",{port = "device",pin_dc = pin.PE8, pin_rst = pin.PC12,pin_pwr = pin.PE9,direction = 0,w = 240,h = 320,xoffset = 0,yoffset = 0},spi_lcd))
 

+ 1 - 1
demo/lvgl/win32/lvgl_demo/printer/prtmb.lua

@@ -162,7 +162,7 @@ function prtmb.setup_scr_prtmb(ui)
 	lvgl.obj_set_pos(ui.prtmb_img, 235, 83);
 	lvgl.obj_set_size(ui.prtmb_img, 25, 25);
 	lvgl.obj_set_click(ui.prtmb_img, true);
-	lvgl.img_set_src(ui.prtmb_img,"/images/wave_alpha_25x25png");
+	lvgl.img_set_src(ui.prtmb_img,"/images/wave_alpha_25x25.png");
 	lvgl.img_set_pivot(ui.prtmb_img, 0,0);
 	lvgl.img_set_angle(ui.prtmb_img, 0);
 

+ 5 - 5
luat/packages/u8g2/u8g2_selection_list.c

@@ -150,17 +150,17 @@ u8g2_uint_t u8g2_DrawUTF8Lines(u8g2_t *u8g2, u8g2_uint_t x, u8g2_uint_t y, u8g2_
 static u8g2_uint_t u8g2_draw_selection_list_line(u8g2_t *u8g2, u8sl_t *u8sl, u8g2_uint_t y, uint8_t idx, const char *s) U8G2_NOINLINE;
 static u8g2_uint_t u8g2_draw_selection_list_line(u8g2_t *u8g2, u8sl_t *u8sl, u8g2_uint_t y, uint8_t idx, const char *s)
 {
-  u8g2_uint_t yy;
+  //u8g2_uint_t yy;
   uint8_t border_size = 0;
   uint8_t is_invert = 0;
 	
   u8g2_uint_t line_height = u8g2_GetAscent(u8g2) - u8g2_GetDescent(u8g2)+MY_BORDER_SIZE;
 
   /* calculate offset from display upper border */
-  yy = idx;
-  yy -= u8sl->first_pos;
-  yy *= line_height;
-  yy += y;
+  //yy = idx;
+  //yy -= u8sl->first_pos;
+  //yy *= line_height;
+  //yy += y;
 
   /* check whether this is the current cursor line */
   if ( idx == u8sl->current_pos )