From: CCC <2393524978@qq.com> Date: Thu, 24 Aug 2023 01:16:47 +0000 (+0800) Subject: gengxin X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=42c22ba43df9b770bae0e39341d3eb7d6b3dee5b;p=mirrors%2FASR3603_Z5.git gengxin --- diff --git a/2.sdk/sdk/gui/lv_watch/framework/nvm/ui_nvm.h b/2.sdk/sdk/gui/lv_watch/framework/nvm/ui_nvm.h index 612119a1..6e4a5193 100644 --- a/2.sdk/sdk/gui/lv_watch/framework/nvm/ui_nvm.h +++ b/2.sdk/sdk/gui/lv_watch/framework/nvm/ui_nvm.h @@ -35,17 +35,20 @@ extern "C" { #define NV_SECTION_UI_SMSMSG_LEN (sizeof(nv_watch_sms_msg_t)) #define NV_SECTION_UI_GPS_AIDPOS_LEN (sizeof(nv_watch_gps_aidpos_t)) //#if __MMI_ZHSX_SUPPORT__ -#define NV_SECTION_UI_WEHAT_MSG_LEN (sizeof(nv_watch_wechat_msg_info_t)) +#define NV_SECTION_UI_WEHAT_MSG_LEN (sizeof(nv_watch_wechat_msg_info_t)) #define NV_SECTION_UI_HEALTH_MEASURE_LEN (sizeof(nv_watch_health_measure_timed_t)) #define NV_SECTION_UI_PROTOCOL_DATA_LEN (sizeof(nv_watch_protocol_data_t)) #define NV_SECTION_UI_HEALTH_INFO_LEN (sizeof(nv_watch_health_info_t)) #define NV_SECTION_UI_SOS_NUMBER_LEN (sizeof(nv_watch_sos_number_t)) #define NV_SECTION_UI_CENTER_NUMBER_LEN (sizeof(nv_watch_center_number_t)) -#define NV_SECTION_UI_VC_CONTACT_LEN (sizeof(nv_watch_vc_contact_t)) +#define NV_SECTION_UI_VC_CONTACT_LEN (sizeof(nv_watch_vc_contact_t)) #define NV_SECTION_UI_DO_NOT_DISTURB_LEN (sizeof(nv_watch_do_not_disturb_t)) +#define NV_SECTION_UI_DIAL_PAD_SWITCH_LEN (sizeof(nv_watch_switch_t)) +#define NV_SECTION_UI_WHITE_LIST_SWITCH_LEN (sizeof(nv_watch_switch_t)) //#endif + #define NV_SECTION_LEN(sectionid) (sectionid ## _LEN) /* definition of section start address */ @@ -124,17 +127,20 @@ typedef lv_fs_dir_t ui_dir_t; #define NV_SECTION_UI_SMSMSG_FILE "ui_smsmsg.nv" #define NV_SECTION_UI_GPS_AIDPOS_FILE "ui_gps_aidpos.nv" //#if __MMI_ZHSX_SUPPORT__ -#define NV_SECTION_UI_WEHAT_MSG_FILE "ui_wechat_msg.nv" +#define NV_SECTION_UI_WEHAT_MSG_FILE "ui_wechat_msg.nv" #define NV_SECTION_UI_HEALTH_MEASURE_FILE "ui_health_measure.nv" #define NV_SECTION_UI_PROTOCOL_DATA_FILE "ui_protocol_data.nv" #define NV_SECTION_UI_HEALTH_INFO_FILE "ui_health_info.nv" #define NV_SECTION_UI_SOS_NUMBER_FILE "ui_sos_number.nv" #define NV_SECTION_UI_CENTER_NUMBER_FILE "ui_center_number.nv" -#define NV_SECTION_UI_VC_CONTACT_FILE "ui_vc_contact.nv" +#define NV_SECTION_UI_VC_CONTACT_FILE "ui_vc_contact.nv" #define NV_SECTION_UI_DO_NOT_DISTURB_FILE "ui_do_not_disturb.nv" +#define NV_SECTION_UI_DIAL_PAD_SWITCH_FILE "ui_dial_pad_switch.nv" +#define NV_SECTION_UI_WHITE_LIST_SWITCH_FILE "ui_white_list_switch.nv" //#endif + #define NV_SECTION_FILE_PATH(sectionid) (sectionid ## _FILE) extern char *UI_NV_Get_Section_path(NV_UI_SECTION_ID SectionId); diff --git a/2.sdk/sdk/gui/lv_watch/framework/nvm/ui_nvm_api.c b/2.sdk/sdk/gui/lv_watch/framework/nvm/ui_nvm_api.c index eaebba3f..931b8db8 100644 --- a/2.sdk/sdk/gui/lv_watch/framework/nvm/ui_nvm_api.c +++ b/2.sdk/sdk/gui/lv_watch/framework/nvm/ui_nvm_api.c @@ -89,6 +89,11 @@ uint32_t UI_NV_Get_Section_Len(NV_UI_SECTION_ID SectionId) return (NV_SECTION_LEN(NV_SECTION_UI_VC_CONTACT)); case NV_SECTION_UI_DO_NOT_DISTURB: return (NV_SECTION_LEN(NV_SECTION_UI_DO_NOT_DISTURB)); + case NV_SECTION_UI_DIAL_PAD_SWITCH: + return (NV_SECTION_LEN(NV_SECTION_UI_DIAL_PAD_SWITCH)); + case NV_SECTION_UI_WHITE_LIST_SWITCH: + return (NV_SECTION_LEN(NV_SECTION_UI_WHITE_LIST_SWITCH)); + //#endif @@ -178,6 +183,11 @@ char * UI_NV_Get_Section_path(NV_UI_SECTION_ID SectionId) return (NV_SECTION_FILE_PATH(NV_SECTION_UI_VC_CONTACT)); case NV_SECTION_UI_DO_NOT_DISTURB: return (NV_SECTION_FILE_PATH(NV_SECTION_UI_DO_NOT_DISTURB)); + case NV_SECTION_UI_DIAL_PAD_SWITCH: + return (NV_SECTION_FILE_PATH(NV_SECTION_UI_DIAL_PAD_SWITCH)); + case NV_SECTION_UI_WHITE_LIST_SWITCH: + return (NV_SECTION_FILE_PATH(NV_SECTION_UI_WHITE_LIST_SWITCH)); + //#endif @@ -225,6 +235,9 @@ uint8_t UI_NV_Reset_Default(NV_UI_SECTION_ID SectionId) nv_watch_center_number_t * center_number; nv_watch_vc_contact_t * vc_contact; nv_watch_do_not_disturb_t * do_not_disturb; + nv_watch_switch_t * dial_pad_switch; + nv_watch_switch_t * white_list_switch; + //#endif switch(SectionId) { @@ -426,6 +439,18 @@ uint8_t UI_NV_Reset_Default(NV_UI_SECTION_ID SectionId) memset(do_not_disturb, 0x0, SectionLen); TempData = (char *)do_not_disturb; break; + + case NV_SECTION_UI_DIAL_PAD_SWITCH: + dial_pad_switch = lv_mem_alloc(SectionLen); + memset(dial_pad_switch, 0x0, SectionLen); + TempData = (char *)dial_pad_switch; + break; + + case NV_SECTION_UI_WHITE_LIST_SWITCH: + white_list_switch = lv_mem_alloc(SectionLen); + memset(white_list_switch, 0x0, SectionLen); + TempData = (char *)white_list_switch; + break; //#endif diff --git a/2.sdk/sdk/gui/lv_watch/include/ui_nvm_interface.h b/2.sdk/sdk/gui/lv_watch/include/ui_nvm_interface.h index ca2116fa..b3737314 100644 --- a/2.sdk/sdk/gui/lv_watch/include/ui_nvm_interface.h +++ b/2.sdk/sdk/gui/lv_watch/include/ui_nvm_interface.h @@ -236,7 +236,6 @@ typedef struct } __packed nv_watch_vc_contact_t; -//#ifdef __MMI_ZHSX_SUPPORT_DO_NOT_DISTURB__ #define NV_WATCH_DO_NOT_DISTURB_ITEM_MAX (3) typedef struct @@ -253,12 +252,19 @@ typedef struct { nv_watch_do_not_disturb_item_t item_info[NV_WATCH_DO_NOT_DISTURB_ITEM_MAX]; } __packed nv_watch_do_not_disturb_t; -//#endif + + +typedef struct +{ + uint8_t switch_flag; +} __packed nv_watch_switch_t; //#endif + + typedef struct { uint8_t autoanswerflg; // 1: auto answer enable, 0: auto answer disable @@ -434,7 +440,7 @@ enum NV_SECTION_UI_AGNSS, // nv_watch_agnss_t NV_SECTION_UI_SMSMSG, // nv_watch_sms_msg_t NV_SECTION_UI_GPS_AIDPOS, // nv_watch_gps_aidpos_t -//#if __MMI_ZHSX_SUPPORT__ +//#ifdef __MMI_ZHSX_SUPPORT__ NV_SECTION_UI_WEHAT_MSG, // nv_watch_wechat_msg_info_t NV_SECTION_UI_HEALTH_MEASURE, // nv_watch_health_measure_timed_t NV_SECTION_UI_PROTOCOL_DATA, // nv_watch_protocol_data_t @@ -442,9 +448,9 @@ enum NV_SECTION_UI_SOS_NUMBER, // nv_watch_sos_number_t NV_SECTION_UI_CENTER_NUMBER, // nv_watch_center_number_t NV_SECTION_UI_VC_CONTACT, // nv_watch_vc_contact_t - //#ifdef __MMI_ZHSX_SUPPORT_DO_NOT_DISTURB__ - NV_SECTION_UI_DO_NOT_DISTURB, // nv_watch_do_not_disturb_t - //#endif + NV_SECTION_UI_DO_NOT_DISTURB, // nv_watch_do_not_disturb_t + NV_SECTION_UI_DIAL_PAD_SWITCH, // nv_watch_switch_t + NV_SECTION_UI_WHITE_LIST_SWITCH, // nv_watch_switch_t //#endif