Parcourir la source

fix:编译警告

Dozingfiretruck il y a 1 an
Parent
commit
b19d8384a0

+ 1 - 1
components/epaper/EPD_1in54r.c

@@ -188,7 +188,7 @@ parameter:
 ******************************************************************************/
 void EPD_1IN54R_Display(const UBYTE *blackimage, const UBYTE *redimage)
 {
-    UBYTE Temp = 0x00;
+    // UBYTE Temp = 0x00;
     UWORD Width, Height;
     Width = (EPD_1IN54R_WIDTH % 8 == 0)? (EPD_1IN54R_WIDTH / 8 ): (EPD_1IN54R_WIDTH / 8 + 1);
     Height = EPD_1IN54R_HEIGHT;

+ 0 - 2
components/ethernet/common/dns_client.c

@@ -155,7 +155,6 @@ int32_t dns_get_ip(dns_client_t *client, Buffer_Struct *buf, uint16_t answer_num
 
 	uint32_t ttl;
 	uint8_t error = 0;
-	PV_Union pvUn = {0};
 
 	for(i = 0; i < answer_num; i++)
 	{
@@ -339,7 +338,6 @@ uint8_t dns_check_uri(const char *uri, uint32_t uri_len)
 
 int32_t dns_make(dns_client_t *client, dns_process_t *process, Buffer_Struct *out)
 {
-	int Result;
 	xDNSMessage_t MsgHead;
     uint8_t *pucStart, *pucByte;
 //    uint16_t usRecordType;

+ 0 - 3
components/gmssl/src/cms.c

@@ -742,7 +742,6 @@ int cms_signer_info_sign_to_der(
 	uint8_t **out, size_t *outlen)
 {
 	SM3_CTX ctx = *sm3_ctx;
-	int fixed_outlen = 1;
 	uint8_t dgst[SM3_DIGEST_SIZE];
 	uint8_t sig[SM2_MAX_SIGNATURE_SIZE];
 	size_t siglen = SM2_signature_typical_size;
@@ -1051,7 +1050,6 @@ int cms_signed_data_sign_to_der(
 	size_t digest_algors_cnt = sizeof(digest_algors)/sizeof(int);
 	uint8_t content_header[256];
 	size_t content_header_len;
-	size_t certs_len = 0;
 	uint8_t signer_infos[512];
 	size_t signer_infos_len = 0;
 	SM3_CTX sm3_ctx;
@@ -1301,7 +1299,6 @@ int cms_recipient_info_encrypt_to_der(
 	int pke_algor = OID_sm2encrypt;
 	uint8_t enced_key[SM2_MAX_CIPHERTEXT_SIZE];
 	size_t enced_key_len;
-	int fixed_outlen = 1;
 
 	if (pke_algor != OID_sm2encrypt) {
 		error_print();

+ 1 - 1
components/iotauth/luat_lib_iotauth.c

@@ -87,7 +87,7 @@ log.info("onenet.old", client_id,user_name,password)
 */
 static int l_iotauth_onenet(lua_State *L) {
     iotauth_ctx_t ctx = {0};
-    char password[PASSWORD_LEN] = {0};
+    // char password[PASSWORD_LEN] = {0};
     size_t len = 0;
     iotauth_onenet_t onenet = {
         .cur_timestamp = 32472115200

+ 0 - 1
components/lcd/luat_lcd.c

@@ -125,7 +125,6 @@ const char* luat_lcd_name(luat_lcd_conf_t* conf) {
 }
 
 LUAT_WEAK int luat_lcd_init_default(luat_lcd_conf_t* conf) {
-    uint8_t direction_date = 0;
 	conf->is_init_done = 0;
 
     if (conf->w == 0)

+ 5 - 4
components/lvgl/binding/luat_lib_lvgl7.c

@@ -80,6 +80,8 @@ int luat_lv_init(lua_State *L) {
 #include "luat_lcd.h"
 
 static luat_lcd_conf_t* lcd_conf;
+static lv_color_t *fbuffer = NULL;
+static lv_color_t *fbuffer2 = NULL;
 
 LUAT_WEAK void luat_lv_disp_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p) {
     //-----
@@ -105,8 +107,7 @@ int luat_lv_init(lua_State *L) {
         h = luaL_checkinteger(L, 2);
     }
 
-    lv_color_t *fbuffer = NULL;
-    lv_color_t *fbuffer2 = NULL;
+
     size_t fbuff_size = 0;
     size_t buffmode = 0;
 
@@ -145,8 +146,6 @@ int luat_lv_init(lua_State *L) {
         buffmode = luaL_checkinteger(L, 5);
     }
 
-    LLOGD("w %d h %d buff %d mode %d", w, h, fbuff_size, buffmode);
-
     if (lcd_conf != NULL && lcd_conf->buff != NULL) {
         // LLOGD("use LCD buff");
         fbuffer = lcd_conf->buff;
@@ -187,6 +186,8 @@ int luat_lv_init(lua_State *L) {
             LV.buff2_ref = luaL_ref(L, LUA_REGISTRYINDEX);
         LV.buff_ref = luaL_ref(L, LUA_REGISTRYINDEX);
     }
+    
+    LLOGD("w %d h %d buff %d mode %d", w, h, fbuff_size, buffmode);
 
     lv_disp_buf_init(&LV.disp_buf, fbuffer, fbuffer2, fbuff_size);
 

+ 0 - 1
components/lvgl/binding/luat_lib_lvgl_font.c

@@ -62,7 +62,6 @@ static const lvfont_t fonts[] = {
 local font = lvgl.font_get("opposans_m_12")
 */
 int luat_lv_font_get(lua_State *L) {
-    lv_font_t* font = NULL;
     const char* fontname = luaL_checkstring(L, 1);
     if (!strcmp("", fontname)) {
         LLOGE("字体名称不能是空字符串");

+ 55 - 0
components/lvgl/binding/luat_lib_lvgl_indev_ext.c

@@ -9,6 +9,8 @@
 #include "lvgl.h"
 #include "luat_mem.h"
 
+#include "luat_tp.h"
+
 static lv_indev_data_t point_emulator_data = {0};
 static lv_indev_data_t keyboard_emulator_data = {0};
 
@@ -20,6 +22,45 @@ static bool point_input_read(lv_indev_drv_t * drv, lv_indev_data_t*data) {
     return false;
 }
 
+static luat_tp_data_t* lvgl_tp_data = NULL;
+/*Return true is the touchpad is pressed*/
+static bool touchpad_is_pressed(void){
+    /*Your code comes here*/
+    if (lvgl_tp_data[0].event == TP_EVENT_TYPE_DOWN || lvgl_tp_data[0].event == TP_EVENT_TYPE_MOVE){
+        return true;
+    }
+    return false;
+}
+
+static void touchpad_get_xy(lv_coord_t * x, lv_coord_t * y)
+{
+    /*Your code comes here*/
+    (*x) = lvgl_tp_data[0].x_coordinate;
+    (*y) = lvgl_tp_data[0].y_coordinate;
+}
+
+static bool touch_input_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data)
+{
+    static lv_coord_t last_x = 0;
+    static lv_coord_t last_y = 0;
+
+    /*Save the pressed coordinates and the state*/
+    if(touchpad_is_pressed()) {
+        touchpad_get_xy(&last_x, &last_y);
+        data->state = LV_INDEV_STATE_PR;
+    }
+    else {
+        data->state = LV_INDEV_STATE_REL;
+    }
+
+    /*Set the last pressed coordinates*/
+    data->point.x = last_x;
+    data->point.y = last_y;
+
+    /*Return `false` because we are not buffering and no more data to read*/
+    return false;
+}
+
 /*
 注册输入设备驱动
 @api lvgl.indev_drv_register(tp, dtp)
@@ -44,6 +85,20 @@ int luat_lv_indev_drv_register(lua_State* L) {
             indev_drv.read_cb = point_input_read;
             lv_indev_drv_register(&indev_drv);
             ok = 1;
+        }else if(!strcmp("touch", dtype)) {
+            // indev_drv.user_data = &point_emulator_data;
+            // memset(indev_drv.user_data, 0, sizeof(lv_indev_data_t));
+            if (lua_isuserdata(L, 3)) {
+                luat_tp_config_t *luat_tp_config = lua_touserdata(L, 3);
+                lvgl_tp_data = luat_tp_config->tp_data;
+                luat_tp_config->callback = NULL;
+
+                indev_drv.read_cb = touch_input_read;
+                lv_indev_drv_register(&indev_drv);
+                ok = 1;
+            }else {
+                // log_e("touch input need tp");
+            }
         }
         //else if(!strcmp("xpt2046", type)) {
         //    // TODO 支持xpt2046?

+ 3 - 3
components/lvgl/binding/luat_lib_lvgl_map.c

@@ -35,7 +35,7 @@ int luat_lv_obj_align_origo(lua_State *L) {
     LV_DEBUG("CALL lv_obj_align_origo");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     lv_obj_t* base = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_align_t align = (lv_align_t)lua_touserdata(L, 3);
+    lv_align_t align = (lv_align_t)luaL_checkinteger(L, 3);
     lv_coord_t x_ofs = (lv_coord_t)luaL_checkinteger(L, 4);
     lv_coord_t y_ofs = (lv_coord_t)luaL_checkinteger(L, 5);
     lv_obj_align_mid(obj, base, align, x_ofs, y_ofs);
@@ -46,7 +46,7 @@ int luat_lv_obj_align_origo_x(lua_State *L) {
     LV_DEBUG("CALL lv_obj_align_origo_x");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     lv_obj_t* base = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_align_t align = (lv_align_t)lua_touserdata(L, 3);
+    lv_align_t align = (lv_align_t)luaL_checkinteger(L, 3);
     lv_coord_t x_ofs = (lv_coord_t)luaL_checkinteger(L, 4);
     lv_obj_align_mid_x(obj, base, align, x_ofs);
     return 0;
@@ -56,7 +56,7 @@ int luat_lv_obj_align_origo_y(lua_State *L) {
     LV_DEBUG("CALL lv_obj_align_origo_y");
     lv_obj_t* obj = (lv_obj_t*)lua_touserdata(L, 1);
     lv_obj_t* base = (lv_obj_t*)lua_touserdata(L, 2);
-    lv_align_t align = (lv_align_t)lua_touserdata(L, 3);
+    lv_align_t align = (lv_align_t)luaL_checkinteger(L, 3);
     lv_coord_t y_ofs = (lv_coord_t)luaL_checkinteger(L, 4);
     lv_obj_align_mid_y(obj, base, align, y_ofs);
     return 0;

+ 1 - 1
components/lvgl/lv_conf.h

@@ -94,7 +94,7 @@ typedef int16_t lv_coord_t;
 
 /* 1: use custom malloc/free, 0: use the built-in `lv_mem_alloc` and `lv_mem_free` */
 #ifndef LV_MEM_CUSTOM
-#define LV_MEM_CUSTOM      1
+#define LV_MEM_CUSTOM      0
 #endif
 #if LV_MEM_CUSTOM == 0
 /* Size of the memory used by `lv_mem_alloc` in bytes (>= 2kB)*/

+ 0 - 1
components/network/adapter/luat_lib_socket.c

@@ -1220,7 +1220,6 @@ local ip1,ip2,ip3,ip4 = socket.remoteIP(ctrl)
 static int l_socket_remote_ip(lua_State *L)
 {
 	luat_socket_ctrl_t *ctrl = l_get_ctrl(L, 1);
-	PV_Union uPV;
 	uint8_t i;
 	uint8_t total;
 	if (!ctrl)

+ 2 - 7
components/network/adapter_lwip2/net_lwip2.c

@@ -478,7 +478,6 @@ static err_t net_lwip2_dns_recv_cb(void *arg, struct udp_pcb *pcb, struct pbuf *
 	Buffer_Struct msg_buf;
 	Buffer_Struct tx_msg_buf = {0,0,0};
 	struct pbuf *out_p;
-	ip_addr_t *t_ip;
 	int i;
 	uint8_t adapter_index = (uint32_t)arg;
 	if (adapter_index >= NW_ADAPTER_INDEX_LWIP_NETIF_QTY || prvlwip.lwip_netif[adapter_index] == NULL) {
@@ -579,17 +578,15 @@ static void net_lwip2_close_tcp(int socket_id)
 
 static void net_lwip2_task(void *param)
 {
-	luat_network_cb_param_t cb_param;
+	// luat_network_cb_param_t cb_param;
 	OS_EVENT event = *((OS_EVENT *)param);
 	luat_heap_free(param);
 	Buffer_Struct tx_msg_buf = {0,0,0};
 	// HANDLE cur_task = luat_get_current_task();
-	struct netif *netif = NULL;
 	socket_data_t *p = NULL;
 	ip_addr_t *p_ip, *local_ip;
 	struct pbuf *out_p = NULL;
-	int error = 0, i = 0;
-	PV_Union uPV;
+	int error = 0;
 //	uint8_t active_flag;
 	uint8_t socket_id = 0;
 	uint8_t adapter_index = 0;
@@ -901,7 +898,6 @@ static void platform_send_event(void *p, uint32_t id, uint32_t param1, uint32_t
 
 static void net_lwip2_check_network_ready(uint8_t adapter_index)
 {
-	int i = 0;
 	luat_ip_addr_t addr = {0};
 	char ip_string[64] = {0};
 	if (prvlwip.lwip_netif[adapter_index] == NULL)
@@ -945,7 +941,6 @@ static void net_lwip2_check_network_ready(uint8_t adapter_index)
 
 static int net_lwip2_check_socket(void *user_data, int socket_id, uint64_t tag)
 {
-	uint8_t adapter_index = (uint32_t)user_data;
 	if ((uint32_t)user_data >= NW_ADAPTER_INDEX_LWIP_NETIF_QTY) return -1;
 	if (socket_id >= MAX_SOCK_NUM) return -1;
 	if (prvlwip.socket[socket_id].tag != tag) return -1;

+ 0 - 2
components/network/libftp/luat_ftp_client.c

@@ -54,8 +54,6 @@ static uint32_t luat_ftp_cmd_send(luat_ftp_ctrl_t *ftp_ctrl, uint8_t* send_data,
 }
 
 static int luat_ftp_cmd_recv(luat_ftp_ctrl_t *ftp_ctrl,uint8_t *recv_data,uint32_t *recv_len,uint32_t timeout_ms){
-	uint32_t total_len = 0;
-	uint32_t read_len;
 	uint8_t is_break = 0,is_timeout = 0;
 	int ret = network_wait_rx(g_s_ftp.network->cmd_netc, timeout_ms, &is_break, &is_timeout);
 	LLOGD("luat_ftp_cmd_recv network_wait_rx ret:%d is_break:%d is_timeout:%d",ret,is_break,is_timeout);

+ 0 - 1
components/network/netdrv/binding/luat_lib_netdrv.c

@@ -136,7 +136,6 @@ static int l_netdrv_mac(lua_State *L) {
 static int l_netdrv_ipv4(lua_State *L) {
     int id = luaL_checkinteger(L, 1);
     const char* tmp = NULL;
-    size_t len = 0;
     luat_netdrv_t* netdrv = luat_netdrv_get(id);
     if (netdrv == NULL || netdrv->netif == NULL) {
         return 0;

+ 0 - 3
components/network/ulwip/src/napt_ipv4.c

@@ -893,7 +893,6 @@ static int alg_icmp_proc(u8 is_inet,
                          struct ip_hdr *ip_hdr,
                          ip_addr_t* gw_ip)
 {
-    int err = -1;
     struct napt_addr_4ic *napt;
     struct icmp_echo_hdr *icmp_hdr;
     u8* ptr = ((u8*)ip_hdr) - 14;
@@ -982,7 +981,6 @@ static int alg_tcp_proc(u8 is_inet,
                         struct ip_hdr *ip_hdr,
                         ip_addr_t* gw_ip)
 {
-    int err;
     u8 src_ip;
     struct napt_addr_4tu *napt;
     struct tcp_hdr *tcp_hdr;
@@ -1086,7 +1084,6 @@ static int alg_udp_proc(u8 is_inet,
                         struct ip_hdr *ip_hdr,
                         ip_addr_t* gw_ip)
 {
-    int err = 0;
     u8 src_ip;
     struct napt_addr_4tu *napt;
     struct udp_hdr *udp_hdr;

+ 1 - 1
components/tp/luat_tp.c

@@ -15,7 +15,7 @@ void luat_tp_task_entry(void* param){
     while (1){
         luat_rtos_message_recv(g_s_tp_task_handle, &message_id, &luat_tp_config, LUAT_WAIT_FOREVER);
         luat_tp_data_t* tp_data = luat_tp_config->tp_data;
-        uint8_t touch_num = luat_tp_config->opts->read(luat_tp_config,tp_data);
+        luat_tp_config->opts->read(luat_tp_config,tp_data);
 
         if (luat_tp_config->callback == NULL){
         	luat_tp_config->opts->read_done(luat_tp_config);

+ 43 - 44
components/tp/luat_tp_gt911.c

@@ -98,49 +98,49 @@ typedef struct luat_touch_info{
 
 static uint8_t gt911_init_state = 0;
 
-static uint8_t gt911_cfg_table[GT911_CONFIG_SIZE] ={
-// #if 1
-// 	0x41,0x20,0x03,0xe0,0x01,0x05,0x3d,0x00,0x01,0x08,0x28,0x05,0x50,0x32,0x03,0x05,
-// 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x1a,0x1f,0x14,0x8c,0x24,0x0a,0x1b,0x19,
-// 	0xf4,0x0a,0x00,0x00,0x00,0x21,0x04,0x1d,0x00,0x00,0x00,0x00,0x00,0x03,0x64,0x32,
-// 	0x00,0x00,0x00,0x11,0xb2,0x94,0xc5,0x02,0x07,0x00,0x00,0x04,0x8e,0x16,0x00,0x5d,
-// 	0x23,0x00,0x3d,0x38,0x00,0x2a,0x5a,0x00,0x22,0x90,0x00,0x22,0x00,0x00,0x00,0x00,
-// 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-// 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-// 	0x14,0x12,0x10,0x0e,0x0c,0x0a,0x08,0x06,0x04,0x02,0xff,0xff,0xff,0xff,0x00,0x00,
-// 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1d,0x1c,
-// 	0x18,0x16,0x14,0x13,0x12,0x10,0x0f,0x0c,0x0a,0x08,0x06,0x04,0x02,0x00,0xff,0xff,
-// 	0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-// 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x00
-// #else
-// 	0x42,0x20,0x03,0xE0,0x01,0x01,0x3D,0x00,0x01,0x08,0x28,0x05,0x50,0x32,0x03,0x05,
-// 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x1A,0x1F,0x14,0x8C,0x24,0x0A,0x1B,0x19,
-// 	0xF4,0x0A,0x00,0x00,0x00,0x20,0x04,0x1C,0x00,0x00,0x00,0x00,0x00,0x03,0x64,0x32,
-// 	0x00,0x00,0x00,0x11,0xB2,0x94,0xC5,0x02,0x07,0x00,0x00,0x04,0x8E,0x16,0x00,0x5D,
-// 	0x23,0x00,0x3D,0x38,0x00,0x2A,0x5A,0x00,0x22,0x90,0x00,0x22,0x00,0x00,0x00,0x00,
-// 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-// 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-// 	0x14,0x12,0x10,0x0E,0x0C,0x0A,0x08,0x06,0x04,0x02,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-// 	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x1D,0x1C,
-// 	0x18,0x16,0x14,0x13,0x12,0x10,0x0F,0x0C,0x0A,0x08,0x06,0x04,0x02,0x00,0xFF,0xFF,
-// 	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-// 	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x4F,0x00
-// #endif
-
-    0x6b,0x00,0x04,0x58,0x02,0x05,0x0d,0x00,0x01,0x0f,0x28,0x0f,0x50,0x32,0x03,0x05,
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8a,0x2a,0x0c,0x45,0x47,
-    0x0c,0x08,0x00,0x00,0x00,0x40,0x03,0x2c,0x00,0x01,0x00,0x00,0x00,0x03,0x64,0x32,
-    0x00,0x00,0x00,0x28,0x64,0x94,0xd5,0x02,0x07,0x00,0x00,0x04,0x95,0x2c,0x00,0x8b,
-    0x34,0x00,0x82,0x3f,0x00,0x7d,0x4c,0x00,0x7a,0x5b,0x00,0x7a,0x00,0x00,0x00,0x00,
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-    0x18,0x16,0x14,0x12,0x10,0x0e,0x0c,0x0a,0x08,0x06,0x04,0x02,0xff,0xff,0x00,0x00,
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x16,0x18,
-    0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x24,0x13,0x12,0x10,0x0f,0x0a,0x08,0x06,0x04,
-    0x02,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x79,0x01,
-
-};
+// static uint8_t gt911_cfg_table[GT911_CONFIG_SIZE] ={
+// // #if 1
+// // 	0x41,0x20,0x03,0xe0,0x01,0x05,0x3d,0x00,0x01,0x08,0x28,0x05,0x50,0x32,0x03,0x05,
+// // 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x1a,0x1f,0x14,0x8c,0x24,0x0a,0x1b,0x19,
+// // 	0xf4,0x0a,0x00,0x00,0x00,0x21,0x04,0x1d,0x00,0x00,0x00,0x00,0x00,0x03,0x64,0x32,
+// // 	0x00,0x00,0x00,0x11,0xb2,0x94,0xc5,0x02,0x07,0x00,0x00,0x04,0x8e,0x16,0x00,0x5d,
+// // 	0x23,0x00,0x3d,0x38,0x00,0x2a,0x5a,0x00,0x22,0x90,0x00,0x22,0x00,0x00,0x00,0x00,
+// // 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+// // 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+// // 	0x14,0x12,0x10,0x0e,0x0c,0x0a,0x08,0x06,0x04,0x02,0xff,0xff,0xff,0xff,0x00,0x00,
+// // 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1d,0x1c,
+// // 	0x18,0x16,0x14,0x13,0x12,0x10,0x0f,0x0c,0x0a,0x08,0x06,0x04,0x02,0x00,0xff,0xff,
+// // 	0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+// // 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x00
+// // #else
+// // 	0x42,0x20,0x03,0xE0,0x01,0x01,0x3D,0x00,0x01,0x08,0x28,0x05,0x50,0x32,0x03,0x05,
+// // 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x1A,0x1F,0x14,0x8C,0x24,0x0A,0x1B,0x19,
+// // 	0xF4,0x0A,0x00,0x00,0x00,0x20,0x04,0x1C,0x00,0x00,0x00,0x00,0x00,0x03,0x64,0x32,
+// // 	0x00,0x00,0x00,0x11,0xB2,0x94,0xC5,0x02,0x07,0x00,0x00,0x04,0x8E,0x16,0x00,0x5D,
+// // 	0x23,0x00,0x3D,0x38,0x00,0x2A,0x5A,0x00,0x22,0x90,0x00,0x22,0x00,0x00,0x00,0x00,
+// // 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+// // 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+// // 	0x14,0x12,0x10,0x0E,0x0C,0x0A,0x08,0x06,0x04,0x02,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+// // 	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x1D,0x1C,
+// // 	0x18,0x16,0x14,0x13,0x12,0x10,0x0F,0x0C,0x0A,0x08,0x06,0x04,0x02,0x00,0xFF,0xFF,
+// // 	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+// // 	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x4F,0x00
+// // #endif
+
+//     0x6b,0x00,0x04,0x58,0x02,0x05,0x0d,0x00,0x01,0x0f,0x28,0x0f,0x50,0x32,0x03,0x05,
+//     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8a,0x2a,0x0c,0x45,0x47,
+//     0x0c,0x08,0x00,0x00,0x00,0x40,0x03,0x2c,0x00,0x01,0x00,0x00,0x00,0x03,0x64,0x32,
+//     0x00,0x00,0x00,0x28,0x64,0x94,0xd5,0x02,0x07,0x00,0x00,0x04,0x95,0x2c,0x00,0x8b,
+//     0x34,0x00,0x82,0x3f,0x00,0x7d,0x4c,0x00,0x7a,0x5b,0x00,0x7a,0x00,0x00,0x00,0x00,
+//     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+//     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+//     0x18,0x16,0x14,0x12,0x10,0x0e,0x0c,0x0a,0x08,0x06,0x04,0x02,0xff,0xff,0x00,0x00,
+//     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x16,0x18,
+//     0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x24,0x13,0x12,0x10,0x0f,0x0a,0x08,0x06,0x04,
+//     0x02,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+//     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x79,0x01,
+
+// };
 
 static int gt911_obtain_config(luat_tp_config_t* luat_tp_config, uint8_t *config, uint8_t size){
     if (tp_i2c_read_reg16(luat_tp_config, GT911_CONFIG_REG, config, size, 1)){
@@ -447,7 +447,6 @@ void gt911_read_point(uint8_t *input_buff, void *buf, uint8_t touch_num){
 }
 
 static int tp_gt911_read(luat_tp_config_t* luat_tp_config, luat_tp_data_t *luat_tp_data){
-    static uint8_t pre_touch = 0;
     uint8_t touch_num=0, point_status=0;
 
     // luat_tp_info_t luat_touch_info = {0};

+ 2 - 0
lua/src/lobject.c

@@ -408,7 +408,9 @@ const char *luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) {
   volatile uint32_t ap_value;
   uint32_t d1,d2;
   double f64;
+#ifdef LUAT_CONF_VM_64bit
   unsigned long long u64;
+#endif
 #endif
   for (;;) {
     const char *e = strchr(fmt, '%');