From: luozheng <1732036298@qq.com> Date: Mon, 24 Mar 2025 09:05:46 +0000 (+0800) Subject: 增加宏开关,使公共函数的接口能通过编译 X-Git-Tag: leiniao_debug_1.0.0_20250922_020716~409 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=5c66280d2ac4932a4354ef4f966bb7ca3416a3af;p=mirrors%2FFD230.git 增加宏开关,使公共函数的接口能通过编译 --- diff --git a/code/sdk/application/audio/sample_audio_api.h b/code/sdk/application/audio/sample_audio_api.h index 8d8b6be3e..afdd3d9dd 100755 --- a/code/sdk/application/audio/sample_audio_api.h +++ b/code/sdk/application/audio/sample_audio_api.h @@ -10,7 +10,8 @@ #include "soc_uapi_aenc.h" #include "soc_uapi_sound.h" #include "soc_uapi_sea.h" -#include "chip_type.h" +// #include "chip_type.h" +#include "../../drivers/drivers/driver/audio/source/core/include/chip_type.h" #include "circ_buf.h" #include "cmsis_os.h" #include "audio_debug.h" diff --git a/code/sdk/build/config/target_config/brandy/config.py b/code/sdk/build/config/target_config/brandy/config.py index 0b51bc144..8c4257fee 100755 --- a/code/sdk/build/config/target_config/brandy/config.py +++ b/code/sdk/build/config/target_config/brandy/config.py @@ -393,9 +393,9 @@ target = { # "cat1_service", "audio_manager", # "CustomUIcomponentTool", - # "custom_utils", - # "custom_utilscpp", - # "custom_config", + "custom_utils", + "custom_utilscpp", + "custom_config", "rotary_encoder", "nativelauncher", # "ppg_service", diff --git a/code/sdk/drivers/drivers/driver/audio/source/core/common/include/audio_debug.h b/code/sdk/drivers/drivers/driver/audio/source/core/common/include/audio_debug.h index df78e904f..59dd61497 100755 --- a/code/sdk/drivers/drivers/driver/audio/source/core/common/include/audio_debug.h +++ b/code/sdk/drivers/drivers/driver/audio/source/core/common/include/audio_debug.h @@ -7,7 +7,8 @@ #ifndef __AUDIO_DEBUG_H__ #define __AUDIO_DEBUG_H__ -#include "chip_type.h" +// #include "chip_type.h" +#include "../../drivers/drivers/driver/audio/source/core/include/chip_type.h" #if (SAP_OS_TYPE == os_type_xtensa) #ifdef SAP_IPC_LOG_SUPPORT diff --git a/code/sdk/middleware/chips/brandy/nv/nv_config/include/common.h b/code/sdk/middleware/chips/brandy/nv/nv_config/include/common.h index 5c13a49a4..2f3fc7d97 100755 --- a/code/sdk/middleware/chips/brandy/nv/nv_config/include/common.h +++ b/code/sdk/middleware/chips/brandy/nv/nv_config/include/common.h @@ -102,4 +102,11 @@ typedef struct { uint32_t data[NV_AUDIO_VQE_PARAM_SIZE]; } audio_vqe_param_t; +#define CUSTOM_KEY_SERIAL_NUM_SIZE 32 +typedef struct { + uint8_t size; /* 序列号长度 */ + uint8_t sn[CUSTOM_KEY_SERIAL_NUM_SIZE]; /* 序列号数组 */ +} custom_key_sn_t; + + #endif /* __COMMON_H__ */ diff --git a/code/sdk/middleware/chips/brandy/nv/nv_config/include/key_id.h b/code/sdk/middleware/chips/brandy/nv/nv_config/include/key_id.h index 295291945..266871d66 100755 --- a/code/sdk/middleware/chips/brandy/nv/nv_config/include/key_id.h +++ b/code/sdk/middleware/chips/brandy/nv/nv_config/include/key_id.h @@ -3,41 +3,42 @@ * Description: NV - key_id. */ -#ifndef __KEY_ID_H__ -#define __KEY_ID_H__ - -#define REGION_KEY_NUMS 0x1000 /* 每个区域容纳key_id的个数 */ - - -/* Please use the format of NV_ID_XXX */ - -/* system factory key_id [0x0001,0x1000) */ - - -/* user factory key_id [0x1000,0x2000) */ - - -/* system normal key_id [0x2000,0x3000) */ -#define NV_ID_SECURE_CONN 0x2001 /* secure connect */ -#define NV_ID_OFFLINELOG_ENBALE_FLAG 0x2002 /* Offline log enable flag */ - -#define NV_ID_BTSRV_LOCAL_DEV_INFO 0x2101 /* btsrv_local_device_info_t */ -#define NV_ID_BTSRV_PAIRED_DEV_INFO 0x2102 /* btsrv_paired_device_info_t */ - -#define NV_ID_BTSRV_CALIBRATION_CONFIG 0x2103 /* btsrv_local_tx_power_info_t */ -#define BTH_NV_SEC_ID 0x2104 /* bth_product_data_config_t */ -/* user normal key_id [0x3000,0x4000) */ -#define NV_ID_AUDIO_VQE_PARAM 0x320C /* 3A params for VOIP scene, audio_vqe_param_t */ -#define NV_ID_AUDIO_VQE_KWS_PARAM 0x320D /* 3A params for KWS scene, audio_vqe_param_t */ - -/* reserved key_id [0x4000,0xFFFF) */ -#define NV_ID_SAMPLE_0 0x4000 /* Eg. */ -#define NV_ID_SAMPLE_1 0x4001 /* Eg. */ -#define NV_ID_SAMPLE_2 0x4002 /* Eg. */ -#define NV_ID_SAMPLE_3 0x4003 /* Eg. */ -#define NV_ID_SAMPLE_4 0x4004 /* Eg. */ -#define NV_ID_FTM_CONFIG 0x4109 -#define NV_ID_RESTORE_ENABLE 0xA000 /* NV restore factory region flag */ - - -#endif /* __KEY_ID_H__ */ + #ifndef __KEY_ID_H__ + #define __KEY_ID_H__ + + #define REGION_KEY_NUMS 0x1000 /* 每个区域容纳key_id的个数 */ + + + /* Please use the format of NV_ID_XXX */ + + /* system factory key_id [0x0001,0x1000) */ + + + /* user factory key_id [0x1000,0x2000) */ + #define NV_ID_CUSTOM_KEY_SERIAL_NUM 0x1010 /* 序列号 */ + + /* system normal key_id [0x2000,0x3000) */ + #define NV_ID_SECURE_CONN 0x2001 /* secure connect */ + #define NV_ID_OFFLINELOG_ENBALE_FLAG 0x2002 /* Offline log enable flag */ + + #define NV_ID_BTSRV_LOCAL_DEV_INFO 0x2101 /* btsrv_local_device_info_t */ + #define NV_ID_BTSRV_PAIRED_DEV_INFO 0x2102 /* btsrv_paired_device_info_t */ + + #define NV_ID_BTSRV_CALIBRATION_CONFIG 0x2103 /* btsrv_local_tx_power_info_t */ + #define BTH_NV_SEC_ID 0x2104 /* bth_product_data_config_t */ + /* user normal key_id [0x3000,0x4000) */ + #define NV_ID_AUDIO_VQE_PARAM 0x320C /* 3A params for VOIP scene, audio_vqe_param_t */ + #define NV_ID_AUDIO_VQE_KWS_PARAM 0x320D /* 3A params for KWS scene, audio_vqe_param_t */ + + /* reserved key_id [0x4000,0xFFFF) */ + #define NV_ID_SAMPLE_0 0x4000 /* Eg. */ + #define NV_ID_SAMPLE_1 0x4001 /* Eg. */ + #define NV_ID_SAMPLE_2 0x4002 /* Eg. */ + #define NV_ID_SAMPLE_3 0x4003 /* Eg. */ + #define NV_ID_SAMPLE_4 0x4004 /* Eg. */ + #define NV_ID_FTM_CONFIG 0x4109 + #define NV_ID_RESTORE_ENABLE 0xA000 /* NV restore factory region flag */ + + + #endif /* __KEY_ID_H__ */ + \ No newline at end of file diff --git a/code/sdk/open_source/7-zip-lzma-sdk/lzma_21.07/C/7zFile.h b/code/sdk/open_source/7-zip-lzma-sdk/lzma_21.07/C/7zFile.h index c7a30fc2b..a06afbf19 100755 --- a/code/sdk/open_source/7-zip-lzma-sdk/lzma_21.07/C/7zFile.h +++ b/code/sdk/open_source/7-zip-lzma-sdk/lzma_21.07/C/7zFile.h @@ -13,8 +13,8 @@ #include #else // note: USE_FOPEN mode is limited to 32-bit file size -// #define USE_FOPEN -// #include +#define USE_FOPEN +#include #endif #include "7zTypes.h" diff --git a/code/sdk/zhihui/config/include/ConfigModel.h b/code/sdk/zhihui/config/include/ConfigModel.h index 602d6ea17..87d229f4a 100755 --- a/code/sdk/zhihui/config/include/ConfigModel.h +++ b/code/sdk/zhihui/config/include/ConfigModel.h @@ -7,8 +7,8 @@ #include "cJSON.h" #include "wearable_log.h" #include "vector" -#ifdef FD230 -// #include "ui_resource_string.h" +#ifdef FD230_650 +#include "ui_resource_string.h" #endif diff --git a/code/sdk/zhihui/config/src/ConfigModel.cpp b/code/sdk/zhihui/config/src/ConfigModel.cpp index 575499947..6708317c7 100755 --- a/code/sdk/zhihui/config/src/ConfigModel.cpp +++ b/code/sdk/zhihui/config/src/ConfigModel.cpp @@ -7,7 +7,7 @@ #endif #include "kv_store.h" #include "kvstore_env.h" -#ifdef FD230 +#ifdef FD230_650 #include "player/include/PlayersModelC.h" #include "message/include/MessageModel.h" #include "../../../../../application/wearable/fd230/nativeapp/nativeui/sleepmode/include/SleepModeModel.h" @@ -1511,7 +1511,7 @@ void set_config_spo2_min(int spo2Min) { } void mmi_ancs_simulate(void) { -#ifdef FD230 +#ifdef FD230_650 OHOS::MessageModel::GetInstance().at_message_test(); #endif } @@ -1554,7 +1554,7 @@ void mmi_sleep_mode_switch_read(void) uapi_sleep_mode_flag_set(flag); if(flag) { - #ifdef FD230 + #ifdef FD230_650 OHOS::SleepModeModel::GetInstance().SetSleepModeEnabled(); #endif } @@ -1623,7 +1623,7 @@ void cm_set_HFP_switch(bool value) // stop play music void mmi_stop_music_play(void) { - #ifdef FD230 + #ifdef FD230_650 stopPlayingMusic(); #endif } diff --git a/code/sdk/zhihui/utils/custom_cmd_service.c b/code/sdk/zhihui/utils/custom_cmd_service.c index 9ccffd351..921e1fafd 100755 --- a/code/sdk/zhihui/utils/custom_cmd_service.c +++ b/code/sdk/zhihui/utils/custom_cmd_service.c @@ -31,7 +31,7 @@ #include "custom_utils.h" -#ifdef FD230 +#ifdef FD230_650 #include "BluetoothModelC.h" #include "PhoneServiceC.h" #include "ui_serviceC.h" diff --git a/code/sdk/zhihui/utils/custom_fileoperate_service.c b/code/sdk/zhihui/utils/custom_fileoperate_service.c index 47e98d635..16f8142f3 100755 --- a/code/sdk/zhihui/utils/custom_fileoperate_service.c +++ b/code/sdk/zhihui/utils/custom_fileoperate_service.c @@ -31,7 +31,7 @@ #include "custom_utils.h" -#ifdef FD230 +#ifdef FD230_650 #include "BluetoothModelC.h" #include "PhoneServiceC.h" #include "ui_serviceC.h" @@ -89,10 +89,11 @@ void CheckRecordingSpaceOutC(void){} #include "factorytest_protocol.h" #endif +#ifdef FD230_650 #include "mmc5603_hal.h" #include "cywee_hal.h" - +#endif typedef struct { diff --git a/code/sdk/zhihui/utils/custom_runtime.c b/code/sdk/zhihui/utils/custom_runtime.c index 04e1656b8..90d316f5f 100755 --- a/code/sdk/zhihui/utils/custom_runtime.c +++ b/code/sdk/zhihui/utils/custom_runtime.c @@ -314,9 +314,11 @@ void uapi_dev_runtime_set_time_hour_show_model(uint8_t hour_type) //关机前,把runtime数据同步到config文件里 void uapi_dev_runtime_sync_runtime_env_to_config(void) { - uint16_t timezone_quarters=uapi_get_timezone(); + #ifdef FD230_650 + uint16_t timezone_quarters=uapi_get_timezone();//uapi_get_timezon一直未定义故暂时屏蔽 cm_set_timezone_quarters(timezone_quarters); cm_set_hour_show_model(g_runtime.time_hour_show_model); + #endif } void uapi_dev_runtime_set_ancs_clientid(uint16_t clientid) diff --git a/code/sdk/zhihui/utils/custom_save_runtime.c b/code/sdk/zhihui/utils/custom_save_runtime.c index 603373e67..ce43b9bf4 100755 --- a/code/sdk/zhihui/utils/custom_save_runtime.c +++ b/code/sdk/zhihui/utils/custom_save_runtime.c @@ -30,7 +30,7 @@ #include "los_printf.h" #include "custom_utils.h" -#ifdef FD230 +#ifdef FD230_650 #include "BluetoothModelC.h" #include "PhoneServiceC.h" #include "ui_serviceC.h" diff --git a/code/sdk/zhihui/utils/custom_utils.c b/code/sdk/zhihui/utils/custom_utils.c index 984e50a11..1dbfc5420 100755 --- a/code/sdk/zhihui/utils/custom_utils.c +++ b/code/sdk/zhihui/utils/custom_utils.c @@ -77,19 +77,24 @@ void system_init_uart(void){} #include "custom_utils.h" #include "custom_save_runtime.h" -#ifdef +#ifdef FD230_650 #include "cywee_service.h" #include "microtar.h" #include "mag_service.h" #include "ppg_service.h" +#include "broadcast_feature.h" +#include "battery_service.h" +#include "cywee_hal.h" + +#include "MMC5603.h" +#include "mmc5603_hal.h" +#include "mag_service.h" +#endif #ifdef SUPPORT_A5133_SERVICE #include "A5133main.h" #include "service/a5133_service.h" #include "input_app.h" #endif -#include "broadcast_feature.h" -#include "battery_service.h" -#include "cywee_hal.h" #ifdef FD230_COMPONENT #include "bluetooth/include/BluetoothModelC.h" #endif @@ -310,7 +315,9 @@ void shutdown_reboot_prejobs_task(void) //保存步数 // do_cywee_service_check_msg(CYWEE_SERVICE_CMD_SAVE_DATA,NULL); + #ifdef FD230_650 cywee_save_data(); + #endif // addressbookTowrite();//同步数据存储 @@ -334,7 +341,9 @@ void shutdown_reboot_prejobs_task(void) // cm_sync_all_config_to_disk(); //保存电量 + #ifdef FD230_650 send_battery_svr_cmd_msg(BATTERY_CMD_SAVE_PERCENT); + #endif //重启前要保存时间 @@ -526,7 +535,9 @@ void startup_post_init_task(void) PRINT("startup_post_init_task !\r\n"); + #ifdef FD230_650 do_cywee_service_check_msg(CYWEE_SERVICE_CMD_TIME_SYNC,NULL); + #endif if(!cm_custom_ble_service_on_flag()) { stop_custom_ble_service(); @@ -589,7 +600,9 @@ void startup_post_init_task(void) timeinfo = localtime(&rawtime); if(day > 0 && day != timeinfo->tm_mday) { + #ifdef FD230_650 CustomEventPublish(TOPIC_EVENT_NEXTDAY_UPDATE, NULL , 0); + #endif //do_cywee_service_check_msg(CYWEE_SERVICE_CMD_RESET_DAILY_DATA,NULL); } #ifdef A5133_DEMO_SERVER @@ -1894,10 +1907,12 @@ errcode_t uapi_get_fw_version(uint8_t *_major, uint8_t *_mid,uint8_t *_minor) void uapi_take_to_wake(int cmd) { + #ifdef FD230_650 if(cmd == 1) do_cywee_service_check_msg(CYWEE_SERVICE_CMD_OPEN_HAND_UPDOWN,NULL); else do_cywee_service_check_msg(CYWEE_SERVICE_CMD_CLOSE_HAND_UPDOWN,NULL); + #endif } #include "lcd_common.h" @@ -2011,14 +2026,13 @@ void touch_getstate(void) PRINT("Screen On state : %d\r\n",state); } -#include "MMC5603.h" -#include "mmc5603_hal.h" -#include "mag_service.h" void mmc5603_getid(unsigned char *id) { + #ifdef FD230_650 mmc5603_poweron(); CUSTOM_MMC5603_GETID(id); mmc5603_poweroff(); + #endif } void mmc5603_getdata(float *fAzimuth) @@ -2047,6 +2061,7 @@ void flash_erase(void) void get_gsensor_single(uint8_t *databuf) { + #ifdef FD230_650 gsenson_t t; get_gsonsen_xyz(&t); int16_t x, y, z; @@ -2065,12 +2080,15 @@ void get_gsensor_single(uint8_t *databuf) { PRINT("x : %.2f, y : %.2f, z : %.2f \r\n",t.x,t.y,t.z); PRINT("x : %d, y : %d, z : %d \r\n", x, y, z); PRINT("GSENSOR: %02X %02X %02X %02X %02X %02X\r\n", databuf[0], databuf[1], databuf[2], databuf[3], databuf[4], databuf[5]); + #endif } +#ifdef FD230_650 void gsensor_get_single_data(gsenson_t *t) { get_gsonsen_xyz(t); } +#endif #include @@ -2197,6 +2215,7 @@ void uapi_check_tar_file_count(char *folderpath) int uapi_tar_file(const char *src_path,const char *tar_path,char *tarfilename) { + #if FD230_650 struct dirent *entry; mtar_t tar; size_t bytesRead = 0; @@ -2303,6 +2322,9 @@ int uapi_tar_file(const char *src_path,const char *tar_path,char *tarfilename) } free(buffer); return ret; + + #endif + return 0; } @@ -2779,6 +2801,7 @@ errcode_t custom_spi_init(uint8_t bus_index) /*省电模式*/ void uapi_enter_power_saving_mode(void) { + #if FD230_650 PRINT("Enter Power Saving Mode !!! \r\n"); //配置runtime uapi_dev_runtime_set_saveele_status(1); @@ -2819,11 +2842,12 @@ void uapi_enter_power_saving_mode(void) //关闭音乐 mmi_stop_music_play(); - + #endif } void uapi_exit_power_saving_mode(void) { + #ifdef FD230_650 PRINT("Exit Power Saving Mode !!! \r\n"); //打开抬腕亮屏 @@ -2858,18 +2882,23 @@ void uapi_exit_power_saving_mode(void) //配置runtime uapi_dev_runtime_set_saveele_status(0); + #endif } //cywee清空每日数据 void uapi_cywee_reset_daily_data(void) { + #ifdef FD230_650 do_cywee_service_check_msg(CYWEE_SERVICE_CMD_RESET_DAILY_DATA,NULL); + #endif } //cywee时间更新 void uapi_cywee_time_sync(void) { + #ifdef FD230_650 do_cywee_service_check_msg(CYWEE_SERVICE_CMD_TIME_SYNC,NULL); + #endif } void uapi_cywee_get_id(uint8_t *id) @@ -2880,7 +2909,9 @@ void uapi_cywee_get_id(uint8_t *id) void uapi_cywee_get_chipinfo(char *databuf,uint8_t len) { + #ifdef FD230_650 cywee_get_chipinfo(databuf,len); + #endif } void uapi_cywee_get_version(char *databuf,uint8_t len) @@ -3057,7 +3088,10 @@ void uapi_gei_btmac_and_chipinfo(void) uint8_t uapi_get_cywee_active_state(void) { + #ifdef FD230_650 return cywee_get_active_state(); + #endif + return 0; } void uapi_get_file_data(char *path,uint8_t *data,uint16_t *len) @@ -3115,6 +3149,7 @@ void uapi_save_file_data(char *path,uint8_t *data,uint16_t len,char *mode) void uapi_aging_test(uint32_t test_time) { + #if FD230_650 int32_t ret = 0; uint32_t enter_age_time = 0; uint32_t age_time = 0; @@ -3200,6 +3235,7 @@ void uapi_aging_test(uint32_t test_time) return; } } + #endif } void uapi_vibrator_test(uint32_t test_time) @@ -3210,7 +3246,9 @@ void uapi_vibrator_test(uint32_t test_time) while(total_time) { uapi_get_timestampe_ss(&enter_time); + #ifdef FD230_650 custom_VibratorFunc_int(4); + #endif LOS_Msleep(4000); uapi_get_timestampe_ss(&age_time); total_time -= (age_time - enter_time); @@ -3362,6 +3400,7 @@ uint8_t* uapi_cywee_get_mac_key(void) fclose(file); return data; #endif + return NULL; } void uapi_get_a5133_rxdata(uint8_t *databuf,uint8_t len) diff --git a/code/sdk/zhihui/utils/custom_utils.h b/code/sdk/zhihui/utils/custom_utils.h index ed203beca..1e6777601 100755 --- a/code/sdk/zhihui/utils/custom_utils.h +++ b/code/sdk/zhihui/utils/custom_utils.h @@ -60,7 +60,6 @@ errcode_t uapi_get_timestampe_ms(uint32_t *tm); errcode_t uapi_get_timestampe_ss(uint32_t *tm); errcode_t uapi_get_timestampe_ss_extend(uint32_t *tm,int year, int month, int day, int hour, int minute, int second); /**返回timezone quarters*/ -uint16_t uapi_get_timezone(void); /**set timezone quarters*/ void uapi_set_timezone(uint16_t timezone_quarters); diff --git a/code/sdk/zhihui/utils/custom_utils_at_cmd.c b/code/sdk/zhihui/utils/custom_utils_at_cmd.c index a2fb652d4..f1ec472a0 100755 --- a/code/sdk/zhihui/utils/custom_utils_at_cmd.c +++ b/code/sdk/zhihui/utils/custom_utils_at_cmd.c @@ -16,9 +16,17 @@ // #include "message_notification.h" // #include "MessageModel.h" -#ifdef FD230 +#ifdef FD230_650 #include "system/include/SystemLogModelC.h" #include "PhoneServiceC.h" + +#include "battery_hal.h" +#include "cywee_hal.h" +#include "Bluetooyhpabpserver.h" + +#include "dial_sos_c.h" +#include "battery_service.h" +#include "cywee_hal.h" #endif // #include "msg_center_customerC.h" #ifdef SUPPORT_A5133_SERVICE @@ -33,6 +41,8 @@ #include "common.h" +#include "broadcast_feature.h" +#include "custom_save_runtime.h" static int ConvertCmdToParam(uint8_t *para, uint32_t paraLen, uint8_t argv[CUSTOM_UTILS_MAX_ARGC][CUSTOM_UTILS_MAX_ARGV_LEN], uint32_t* argc) @@ -374,16 +384,17 @@ static uint32_t custom_mmc5603_getdata(uint8_t *para, uint32_t paraLen, char *st return ERRCODE_SUCC; } -#include "battery_hal.h" static uint32_t custom_charge_getstate(uint8_t *para, uint32_t paraLen, char *strCommonCmd) { UNUSED(strCommonCmd); + #ifdef FD230_650 if(get_charge_stat()) wstp_print("charging\r\n"); else wstp_print("uncharged\r\n"); + #endif return ERRCODE_SUCC; } @@ -392,23 +403,25 @@ static uint32_t custom_battery_getpower(uint8_t *para, uint32_t paraLen, char *s { UNUSED(strCommonCmd); - + #ifdef FD230_650 float vol = 0; uint8_t percent = battery_get_voltage(&vol); wstp_print("voltage : %f , percent %02D\%\r\n",vol,percent); + #endif return ERRCODE_SUCC; } static uint32_t custom_battery_gettemp(uint8_t *para, uint32_t paraLen, char *strCommonCmd) { - + #ifdef FD230_650 UNUSED(strCommonCmd); float temp=0.0f; int ret = battery_get_battery_temp(&temp); wstp_print("battery temp %.4f , ret %d\r\n",temp,ret); ret = battery_get_pcb_temp(&temp); wstp_print("pcb temp %.4f , ret %d\r\n",temp,ret); + #endif return ERRCODE_SUCC; } @@ -432,7 +445,7 @@ static uint32_t custom_at_message_test(uint8_t *para, uint32_t paraLen, char *st return ERRCODE_SUCC; } -#include "cywee_hal.h" + static uint32_t custom_gsensor_getdata(uint8_t *para, uint32_t paraLen, char *strCommonCmd) { @@ -790,8 +803,9 @@ static uint32_t custom_task_sched_debug(uint8_t *para, uint32_t paraLen, char *s } uint32_t enable = atol((char*)argv[0]); - + #ifdef fd230_650 los_sched_debug_enable(enable); + #endif return ERRCODE_SUCC; } @@ -1032,9 +1046,6 @@ static uint32_t custom_a5133_rssi(uint8_t *para, uint32_t paraLen, char *strComm #endif -#ifdef FD230 -#include "Bluetooyhpabpserver.h" -#endif static uint32_t PBAP_ENTRY_ADDRESS(uint8_t *para, uint32_t paraLen, char *strCommonCmd) { UNUSED(strCommonCmd); @@ -1048,7 +1059,7 @@ static uint32_t PBAP_ENTRY_ADDRESS(uint8_t *para, uint32_t paraLen, char *strCom return ERRCODE_FAIL; } - #ifdef FD230 + #ifdef FD230_650 uapi_pbap_cmd_pull_vcard_entry((char *)argv[0]); #endif @@ -1068,7 +1079,7 @@ static uint32_t PBAP_CONNECT(uint8_t *para, uint32_t paraLen, char *strCommonCmd return ERRCODE_FAIL; } - #ifdef FD230 + #ifdef FD230_650 uapi_pbap_cmd_start_client(); #endif return ERRCODE_SUCC; @@ -1087,7 +1098,7 @@ static uint32_t PBAP_PULL(uint8_t *para, uint32_t paraLen, char *strCommonCmd) return ERRCODE_FAIL; } - #ifdef FD230 + #ifdef FD230_650 uapi_pbap_cmd_pull_phonebook(); #endif return ERRCODE_SUCC; @@ -1106,7 +1117,7 @@ static uint32_t PBAP_LS(uint8_t *para, uint32_t paraLen, char *strCommonCmd) return ERRCODE_FAIL; } - #ifdef FD230 + #ifdef FD230_650 uapi_pbap_cmd_pull_vcard_listing((unsigned char *)argv[0],11); #endif return ERRCODE_SUCC; @@ -1118,13 +1129,6 @@ static uint32_t PBAP_LS(uint8_t *para, uint32_t paraLen, char *strCommonCmd) #endif #endif -#ifdef FD230 -#include "dial_sos_c.h" -#endif -#include "battery_service.h" -#include "cywee_hal.h" -#include "broadcast_feature.h" -#include "custom_save_runtime.h" static uint32_t BLE_TEST(uint8_t *para, uint32_t paraLen, char *strCommonCmd) { @@ -1139,7 +1143,7 @@ static uint32_t BLE_TEST(uint8_t *para, uint32_t paraLen, char *strCommonCmd) return ERRCODE_FAIL; } printf("BLE_TEST \n"); - #ifdef FD230 + #ifdef FD230_650 uint8_t type =atoi( (char *)argv[0]); uint8_t type_2= atoi( (char *)argv[1]); @@ -1364,9 +1368,11 @@ static uint32_t enabledrag(uint8_t *para, uint32_t paraLen, char *strCommonCmd) uint8_t direction = atol((char*)argv[0]); uint8_t enable = atol((char*)argv[1]); + #ifdef FD230_650 enable_drag(direction,enable); uint8_t limit=get_drag_limit(direction); wstp_print("%s %s , current limit %d\r\n",enable==1?"enable":"disable",direction==0?"x":"y",limit); + #endif return ERRCODE_SUCC; } @@ -1393,9 +1399,11 @@ static uint32_t setdraglimit(uint8_t *para, uint32_t paraLen, char *strCommonCmd uint8_t direction = atol((char*)argv[0]); uint8_t value = atol((char*)argv[1]); + #ifdef FD230_650 set_drag_limit(direction,value); uint8_t limit=get_drag_limit(direction); wstp_print("set drag %s limit %d (current limit %d) \r\n",direction==0?"x":"y",value,limit); + #endif return ERRCODE_SUCC; } diff --git a/code/sdk/zhihui/utilscpp/7zFile.cpp b/code/sdk/zhihui/utilscpp/7zFile.cpp index e486901e3..d3eb17dcd 100755 --- a/code/sdk/zhihui/utilscpp/7zFile.cpp +++ b/code/sdk/zhihui/utilscpp/7zFile.cpp @@ -1,9 +1,12 @@ /* 7zFile.c -- File IO 2017-04-03 : Igor Pavlov : Public domain */ -#include "Precomp.h" +#include +// #include "Precomp.h" +#include "../../open_source/7-zip-lzma-sdk/lzma_21.07/C/Precomp.h" -#include "7zFile.h" +// #include "7zFile.h" +#include "../../open_source/7-zip-lzma-sdk/lzma_21.07/C/7zFile.h" #ifndef USE_WINDOWS_FILE