gengxin
author@CHENG <2393524978@qq.com>
Tue, 11 Jun 2024 06:56:46 +0000 (14:56 +0800)
committer@CHENG <2393524978@qq.com>
Tue, 11 Jun 2024 06:56:46 +0000 (14:56 +0800)
2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_common.c
2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_common.h

index 7baf3f5..86237bc 100644 (file)
@@ -238,14 +238,18 @@ bool mmi_unicode_hex_str_to_utf8_str(unsigned char * src, uint32_t src_len, unsi
 }
 
 
-bool mmi_debug_info_write_to_file(char * info_buf)
+bool mmi_debug_info_write_to_file(char * path, char * info_buf, uint32_t info_size)
 {
        lv_fs_file_t file_p;
        lv_fs_res_t res;
        uint32_t bytes_write = 0;
-       uint32_t info_size = strlen(info_buf);
+       //uint32_t info_size = strlen(info_buf);
 
-       res = lv_fs_open(&file_p, MMI_DEBUG_LOG_FILE, LV_FS_MODE_WR | LV_FS_MODE_APPEND);
+       if(NULL != path)
+               res = lv_fs_open(&file_p, path, LV_FS_MODE_WR | LV_FS_MODE_APPEND);
+       else
+               res = lv_fs_open(&file_p, MMI_DEBUG_LOG_FILE, LV_FS_MODE_WR | LV_FS_MODE_APPEND);
+       
        if(LV_FS_RES_OK != res) 
        {
                printf("[@CHENG_DEBUG][%s][%d]: errno=%d\n", __FUNCTION__, __LINE__, res);
index ae27a0d..d54994a 100644 (file)
@@ -41,7 +41,7 @@ signed int mmi_hex_string_to_number(signed char* hex_str, unsigned char hex_str_
 
 bool mmi_unicode_hex_str_to_utf8_str(unsigned char * src, uint32_t src_len, unsigned char * dest, uint32_t * dest_len);
 
-bool mmi_debug_info_write_to_file(char * info_buf);
+bool mmi_debug_info_write_to_file(char * path, char * info_buf, uint32_t info_size);
 
 #endif