From: @CHENG <2393524978@qq.com> Date: Tue, 11 Jun 2024 06:56:46 +0000 (+0800) Subject: gengxin X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=df1ee22a3a229fd05fdb89ad7e1f9d6d67d6106d;p=mirrors%2FASR3603_Z5.git gengxin --- diff --git a/2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_common.c b/2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_common.c index 7baf3f5a..86237bce 100644 --- a/2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_common.c +++ b/2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_common.c @@ -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); diff --git a/2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_common.h b/2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_common.h index ae27a0d8..d54994a9 100644 --- a/2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_common.h +++ b/2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_common.h @@ -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