Browse Source

update:rb_swap需要具体屏幕的配置,lcd初始化的时候只能作为补救措施

alienwalker 9 months ago
parent
commit
fde6eb0b15

+ 1 - 0
components/lcd/luat_lcd_jd9261t.c

@@ -51,6 +51,7 @@ luat_lcd_opts_t lcd_opts_jd9261t_inited = {
     .direction90 = 0x00,
     .direction180 = 0x03,
     .direction270 = 0x03,
+	.rb_swap = 1,
 	.no_ram_mode = 1,
 	.user_ctrl_init = jd9261t_inited_init,
 };

+ 1 - 0
components/lcd/luat_lcd_nv3037.c

@@ -29,5 +29,6 @@ luat_lcd_opts_t lcd_opts_nv3037 = {
     .direction90 = 0xC0,
     .direction180 = 0x70,
     .direction270 = 0xA0,
+	.rb_swap = 1,
 };
 

+ 1 - 0
components/lcd/luat_lcd_st7735.c

@@ -33,5 +33,6 @@ luat_lcd_opts_t lcd_opts_st7735 = {
     .direction90 = 0x70,
     .direction180 = 0x00,
     .direction270 = 0xA0,
+	.rb_swap = 1,
 };
 

+ 1 - 0
components/lcd/luat_lcd_st7789.c

@@ -41,4 +41,5 @@ luat_lcd_opts_t lcd_opts_st7789 = {
     .direction90 = 0xC0,
     .direction180 = 0x70,
     .direction270 = 0xA0,
+	.rb_swap = 1,
 };

+ 0 - 1
components/lcd/luat_lib_lcd.c

@@ -170,7 +170,6 @@ static int l_lcd_init(lua_State* L) {
         LLOGD("ic support: %s",tp);
         if (lua_gettop(L) > 1) {
             conf->opts = (struct luat_lcd_opts *)lcd_regs[s_index].lcd_opts;
-            conf->opts->rb_swap = 1;
             lua_settop(L, 2); // 丢弃多余的参数
 
             lua_pushstring(L, "port");