取消U8的Cat1相关配置
authorSnickerSun <snickersun@163.com>
Sun, 22 Dec 2024 08:02:33 +0000 (16:02 +0800)
committerSnickerSun <snickersun@163.com>
Sun, 22 Dec 2024 08:02:33 +0000 (16:02 +0800)
code/sdk/application/wstp/at_service/app/app_at_process.c
code/sdk/build/config/target_config/brandy/config.py
code/sdk/zhihui/config/src/ConfigModel.cpp
code/sdk/zhihui/utils/custom_cmd_service.c
code/sdk/zhihui/utils/custom_utils.c
code/sdk/zhihui/utils/custom_utils_at_cmd.c

index 1b771ba..5fc6248 100644 (file)
@@ -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);\r
     return 0;\r
 }\r
-\r
+#ifdef SUPPORT_CAT1_SERVICE\r
 #include "cat1_ctl.h"\r
 static uint32_t cat1_power_on(uint8_t *para, uint32_t para_len)\r
 {\r
@@ -1689,6 +1689,18 @@ static uint32_t cat1_reset(uint8_t *para, uint32_t para_len)
     wstp_print("cat1_reset\r\n" );\r
     return 0;\r
 }\r
+\r
+#else\r
+\r
+static uint32_t cat1_power_on(uint8_t *para, uint32_t para_len)\r
+{\r
+    return 0;\r
+}\r
+static uint32_t cat1_reset(uint8_t *para, uint32_t para_len)\r
+{\r
+    return 0;\r
+}\r
+#endif\r
 static void pm_lcd_off_handle(void)\r
 {\r
     writew(0x570000c0, 0x0);   // display logic crg reset\r
index fa2c399..219cbd0 100644 (file)
@@ -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'
index 555ec38..cd8ae1e 100644 (file)
@@ -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
     }
 
     /*
index 65bef53..07b07f7 100644 (file)
@@ -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
index 65c5b1f..4e351c7 100644 (file)
@@ -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)
 {
index 647673c..7aa2d63 100644 (file)
@@ -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;
 }