From: SnickerSun Date: Sun, 22 Dec 2024 08:02:33 +0000 (+0800) Subject: 取消U8的Cat1相关配置 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=968f8e2de625eabf2477163794b26c8f6c789c48;p=mirrors%2FFD230.git 取消U8的Cat1相关配置 --- diff --git a/code/sdk/application/wstp/at_service/app/app_at_process.c b/code/sdk/application/wstp/at_service/app/app_at_process.c index 1b771ba82..5fc624830 100644 --- a/code/sdk/application/wstp/at_service/app/app_at_process.c +++ b/code/sdk/application/wstp/at_service/app/app_at_process.c @@ -1645,7 +1645,7 @@ static uint32_t adc_manu_sample_adc(uint8_t *para, uint32_t para_len) wstp_print("manu adc sample , channel = %x , voltage = %.03f , percent = %u\r\n", channel,voltage,percent); return 0; } - +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_ctl.h" static uint32_t cat1_power_on(uint8_t *para, uint32_t para_len) { @@ -1689,6 +1689,18 @@ static uint32_t cat1_reset(uint8_t *para, uint32_t para_len) wstp_print("cat1_reset\r\n" ); return 0; } + +#else + +static uint32_t cat1_power_on(uint8_t *para, uint32_t para_len) +{ + return 0; +} +static uint32_t cat1_reset(uint8_t *para, uint32_t para_len) +{ + return 0; +} +#endif static void pm_lcd_off_handle(void) { writew(0x570000c0, 0x0); // display logic crg reset diff --git a/code/sdk/build/config/target_config/brandy/config.py b/code/sdk/build/config/target_config/brandy/config.py index fa2c399bf..219cbd072 100644 --- a/code/sdk/build/config/target_config/brandy/config.py +++ b/code/sdk/build/config/target_config/brandy/config.py @@ -439,7 +439,8 @@ target = { 'SUPPORT_AT_CYWEE', 'MAG_MMC5603', 'ENABLE_VIBRATOR', - 'ENABLE_SLIP', + # 'ENABLE_SLIP', + # 'CUSTOM_HID_SERVICE', 'ENCODER_SUPPORT', 'SUPPORT_SPO2_NOTIFICATION', 'SUPPORT_SPO2_NOTIFICATION_TEST', @@ -450,10 +451,10 @@ target = { 'SUPPORT_AT_CUSTOMUTILS', 'CYWEE_SPORT', 'CYWEE_MAC_ACTIVE', - 'SUPPORT_TCPIP', + # 'SUPPORT_TCPIP', 'SUPPORT_HID_SERVICE', 'SUPPORT_BAIDU_MAP', - 'CFG_FLASH_SIZE=16', + 'CFG_FLASH_SIZE=8', # 'SUPPORT_BLE_SERVICE', # 'FD230', #"MEM_CHECK", @@ -475,9 +476,9 @@ target = { "mag_sensor", "vibrator", "vibrator_service", - "lwIP", - "slip", - "cat1_service", + # "lwIP", + # "slip", + # "cat1_service", "audio_manager", # "CustomUIcomponentTool", "custom_utils", @@ -493,7 +494,7 @@ target = { # "blemoder", # "factorytest_service", # "hid_service", - "gnss", + "gnss", "gnss_sample", "cywee" ], @@ -504,7 +505,7 @@ target = { 'brandy-native-js-u8-r': { 'base_target_name': 'brandy-native-js-r', 'defines': ['FT_SINGLE_UART', - 'CFG_FLASH_SIZE=16', + 'CFG_FLASH_SIZE=8', 'SINGLE_USER_PARTITION', 'BOARD_U8', 'TPTYPE_CST86XX', @@ -517,7 +518,7 @@ target = { 'defines': ['ENABLE_ECC', 'CFG_DRIVERS_NANDFLASH', 'SINGLE_USER_PARTITION', - 'CFG_FLASH_SIZE=16', + 'CFG_FLASH_SIZE=8', 'FT_SINGLE_UART', 'BOARD_U8', 'NANDFLASH_DS35X' diff --git a/code/sdk/zhihui/config/src/ConfigModel.cpp b/code/sdk/zhihui/config/src/ConfigModel.cpp index 555ec38ee..cd8ae1e97 100644 --- a/code/sdk/zhihui/config/src/ConfigModel.cpp +++ b/code/sdk/zhihui/config/src/ConfigModel.cpp @@ -2,7 +2,9 @@ #include "ConfigModelC.h" #include "custom_utils.h" #include "custom_runtime.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_server.h" +#endif #include "kv_store.h" #include "kvstore_env.h" #ifdef FD230 @@ -1092,7 +1094,9 @@ namespace OHOS void ConfigModel::SetVoLTE_Call(bool state) { set_condigData_Bool(CONFIGMODEL_ITEM_VOLTE_CALL,state); + #ifdef SUPPORT_CAT1_SERVICE send_volte_switch_toCat1(); + #endif } /* diff --git a/code/sdk/zhihui/utils/custom_cmd_service.c b/code/sdk/zhihui/utils/custom_cmd_service.c index 65bef53d6..07b07f7c4 100644 --- a/code/sdk/zhihui/utils/custom_cmd_service.c +++ b/code/sdk/zhihui/utils/custom_cmd_service.c @@ -161,7 +161,9 @@ static void custom_cmd_service_check_task(void const *arg) touch_screen_resume(); break; case CUSTOM_CMD_MSG_TYPE_ADD_CAT1VOTE: + #ifdef SUPPORT_CAT1_SERVICE uapi_cat1_add_cat1_vote(); + #endif //中断会在此添加休眠投票,在收到cat1的消息后,会移除投票进入休眠。 //之前的5秒后移除投票延迟太久,与5秒更新一次信号强度 #ifdef USE_CAT1_SLEEP_TIMER diff --git a/code/sdk/zhihui/utils/custom_utils.c b/code/sdk/zhihui/utils/custom_utils.c index 65c5b1f48..4e351c7d7 100644 --- a/code/sdk/zhihui/utils/custom_utils.c +++ b/code/sdk/zhihui/utils/custom_utils.c @@ -540,8 +540,9 @@ void startup_post_init_task(void) #endif ble_SOS_data_init(); +#ifdef SUPPORT_CAT1_SERVICE up_report_timer(); - +#endif read_jsonHistory_weather(); ota_updata_init(); @@ -1444,6 +1445,7 @@ int uapi_callVolumeGet(void) return CallVolumeGet(); } +#ifdef SUPPORT_CAT1_SERVICE void power_on_cat1(void) { @@ -1471,6 +1473,17 @@ void power_off_cat1(void) uapi_cat1_power_on(1); #endif } + + +#else +void power_on_cat1(void) +{ +} +void power_off_cat1(void) +{ +} + +#endif //设置4G能力开关是否开启 void uapi_set4GCapability(bool isopen) { diff --git a/code/sdk/zhihui/utils/custom_utils_at_cmd.c b/code/sdk/zhihui/utils/custom_utils_at_cmd.c index 647673ca4..7aa2d63b5 100644 --- a/code/sdk/zhihui/utils/custom_utils_at_cmd.c +++ b/code/sdk/zhihui/utils/custom_utils_at_cmd.c @@ -8,7 +8,9 @@ #include "debug_print.h" #include "custom_runtime.h" #include "ConfigModelC.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_tcpServer.h" +#endif // #include "message_notification.h" // #include "MessageModel.h" @@ -100,7 +102,7 @@ static uint32_t custom_utils_getsn(uint8_t *para, uint32_t paraLen, char *strCom wstp_print("get sn len %d , %s , ret = 0x%X\r\n",len,sn_buf,ret); return 0; } - +#ifdef SUPPORT_CAT1_SERVICE #include "lwip/altcp_tls.h" #include "lwip/apps/http_client.h" #define USING_HTTPS @@ -282,6 +284,13 @@ static uint32_t custom_start_ota_download(uint8_t *para, uint32_t paraLen, char return ERRCODE_SUCC; } +#else +static uint32_t custom_start_ota_download(uint8_t *para, uint32_t paraLen, char *strCommonCmd) +{ + return ERRCODE_SUCC; +} +#endif + static uint32_t custom_dsp_power_test(uint8_t *para, uint32_t paraLen, char *strCommonCmd) { UNUSED(strCommonCmd); @@ -672,6 +681,7 @@ static uint32_t custom_test_time_showtype(uint8_t *para, uint32_t paraLen, char } +#ifdef SUPPORT_CAT1_SERVICE #include "lwip/apps/sntp.h" static uint32_t custom_test_sntp(uint8_t *para, uint32_t paraLen, char *strCommonCmd) { @@ -687,7 +697,13 @@ static uint32_t custom_test_sntp(uint8_t *para, uint32_t paraLen, char *strCommo wstp_print("CUSTOM_UTILSTEST ATCMD custom_test_sntp sntp_init \n"); return ERRCODE_SUCC; } +#else +static uint32_t custom_test_sntp(uint8_t *para, uint32_t paraLen, char *strCommonCmd) +{ + return ERRCODE_SUCC; +} +#endif static uint32_t custom_uapi_efuse_test_write(uint8_t *para, uint32_t paraLen, char *strCommonCmd) { @@ -956,17 +972,24 @@ static uint32_t custom_get_aging_data(uint8_t *para, uint32_t paraLen, char *str } static uint32_t custom_cat1_start_ota_pyupdate(uint8_t *para, uint32_t paraLen, char *strCommonCmd) { +#ifdef SUPPORT_CAT1_SERVICE Cat1_OTA(CAT1_TCP_START_OTA); +#endif return ERRCODE_SUCC; } static uint32_t custom_cat1_stop_ota_pyupdate(uint8_t *para, uint32_t paraLen, char *strCommonCmd) { +#ifdef SUPPORT_CAT1_SERVICE Cat1_OTA(CAT1_TCP_STOP_OTA); +#endif return ERRCODE_SUCC; } static uint32_t custom_cat1_send_bak_mode(uint8_t *para, uint32_t paraLen, char *strCommonCmd) { + +#ifdef SUPPORT_CAT1_SERVICE send_bak_mode_toCat1(); +#endif return ERRCODE_SUCC; }