From e074dd96c4c832ff8258225cc684f8c2c39f0980 Mon Sep 17 00:00:00 2001 From: payton Date: Mon, 29 Jan 2024 14:13:29 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9lpa=E6=B5=8B=E8=AF=95cmd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../source/cardv/SrcCode/System/SysMain_cmd.c | 2 ++ .../lib/source/sifar/code/include/sf_common.h | 2 ++ .../sifar/code/source/common/sf_common.c | 19 ++++++++++++++++++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/code/application/source/cardv/SrcCode/System/SysMain_cmd.c b/code/application/source/cardv/SrcCode/System/SysMain_cmd.c index 2748365f5..55e72f686 100755 --- a/code/application/source/cardv/SrcCode/System/SysMain_cmd.c +++ b/code/application/source/cardv/SrcCode/System/SysMain_cmd.c @@ -284,6 +284,8 @@ SXCMD_ITEM("wifisw %", cmd_wifi_switch, "wifisw 0/1") SXCMD_ITEM("lcdbk %", sf_set_backlight_status, "lcdbk 0/1") SXCMD_ITEM("sfdump %", sf_vos_perf_list_dump, "sfdump") SXCMD_ITEM("sdfilesw %", sf_cmd_sd_file_switch, "sdfilesw") +SXCMD_ITEM("lpatest %", sf_cmd_lpa_test, "lpatest") +SXCMD_ITEM("fwup %", sf_cmd_fw_upgrade, "fwup") #endif #if FS_MULTI_STRG_FUNC /* test cmd */ diff --git a/code/lib/source/sifar/code/include/sf_common.h b/code/lib/source/sifar/code/include/sf_common.h index 2a9928ef3..4223c03af 100755 --- a/code/lib/source/sifar/code/include/sf_common.h +++ b/code/lib/source/sifar/code/include/sf_common.h @@ -183,6 +183,7 @@ UINT32 sf_cardv_wifi_send(void); void sf_set_ui_para_flag(UINT8 flag); UINT8 sf_get_ui_para_flag(void); BOOL sf_cmd_ftp_ota(unsigned char argc, char **argv); +BOOL sf_cmd_fw_upgrade(unsigned char argc, char **argv); BOOL sf_cmd_switch_esim(unsigned char argc, char **argv); void sf_set_debug_mode(void); void sf_set_wifi_socket(int fd); @@ -214,4 +215,5 @@ INT32 sf_mem_write_photo(UINT32 buf, UINT32 size); void sf_set_wifi_en(UINT32 cnt); void sf_set_bt_en(UINT32 cnt); void sf_dev_en(void); +BOOL sf_cmd_lpa_test(unsigned char argc, char **argv); #endif diff --git a/code/lib/source/sifar/code/source/common/sf_common.c b/code/lib/source/sifar/code/source/common/sf_common.c index e4053b2ce..4c59cc6ef 100755 --- a/code/lib/source/sifar/code/source/common/sf_common.c +++ b/code/lib/source/sifar/code/source/common/sf_common.c @@ -1400,7 +1400,12 @@ BOOL sf_cmd_ftp_ota(unsigned char argc, char **argv) return TRUE; } - +BOOL sf_cmd_fw_upgrade(unsigned char argc, char **argv) +{ + printf("[%s:%d] s\n", __FUNCTION__, __LINE__); + BKG_PostEvent(NVTEVT_BKW_CAMERA_FW_UPGRADE); + printf("[%s:%d] e\n", __FUNCTION__, __LINE__); +} BOOL sf_cmd_switch_esim(unsigned char argc, char **argv) { //UINT32 value; @@ -3662,4 +3667,16 @@ void sf_dev_en(void) sf_usb_mux_s(1); } } +} + +BOOL sf_cmd_lpa_test(unsigned char argc, char **argv) +{ + //UINT32 value; + + SF_MESSAGE_BUF_S stMessageBuf = {0}; + stMessageBuf.arg1 = SF_DEV_CMD_LPA; + stMessageBuf.cmdId = CMD_DEV; + sf_com_message_send_to_app(&stMessageBuf); + + return TRUE; } \ No newline at end of file