Browse Source

add:修复302报错

Dozingfiretruck 4 years ago
parent
commit
4cdd92c4ed
2 changed files with 2 additions and 2 deletions
  1. 1 1
      components/lcd/luat_lib_lcd.c
  2. 1 1
      luat/modules/luat_lib_otp.c

+ 1 - 1
components/lcd/luat_lib_lcd.c

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

+ 1 - 1
luat/modules/luat_lib_otp.c

@@ -88,7 +88,7 @@ static int l_otp_write(lua_State *L) {
     if (offset + len > 4*1024) {
         return 0;
     }
-    int ret = luat_otp_write(zone, data, (size_t)offset, len);
+    int ret = luat_otp_write(zone, (char*)data, (size_t)offset, len);
     lua_pushboolean(L, ret == 0 ? 1 : 0);
     return 1;
 };