|
@@ -1639,299 +1639,17 @@ void Check_ParamConfig(void)
|
|
|
size_t saved_value_len;
|
|
size_t saved_value_len;
|
|
|
/* 设置一个名为 ‘test_key’ 的变量,值为 ‘20250826’ */
|
|
/* 设置一个名为 ‘test_key’ 的变量,值为 ‘20250826’ */
|
|
|
ef_set_and_save_env("testkey", "20250826");
|
|
ef_set_and_save_env("testkey", "20250826");
|
|
|
- //保存默认配置
|
|
|
|
|
- if(device_status.iSave!=FLASH_FLAG)
|
|
|
|
|
- {
|
|
|
|
|
- device_status.iSave=FLASH_FLAG;
|
|
|
|
|
- /*设备类型,7孢子仪,3测报灯,默认设置测报灯*/
|
|
|
|
|
- device_status.dtype = 3;
|
|
|
|
|
- device_status.version_type = 4; //4.0
|
|
|
|
|
- device_status.Power_Type = 0; //0-交流供电;1-直流供电
|
|
|
|
|
- device_status.clt_time = 10; //收集时间
|
|
|
|
|
- device_status.heattime = 10; //加热时间
|
|
|
|
|
- device_status.heatvalue=100;//加热温度
|
|
|
|
|
- device_status.thsp = 300; //默认熄屏时间5分钟
|
|
|
|
|
- device_status.sunBar = 9; //光控定时时长
|
|
|
|
|
- device_status.startBar = 20; //定时开始时间
|
|
|
|
|
- device_status.stopBar = 0; //定时结束时间
|
|
|
|
|
- device_status.tph = 70; //高温保护阈值
|
|
|
|
|
- device_status.tpl = 5; //低温保护阈值
|
|
|
|
|
- device_status.shake_ws = 1; //震动开关,默认开
|
|
|
|
|
- device_status.shake_sec = 1; //震动时间,s
|
|
|
|
|
- device_status.vol = 7; //音量
|
|
|
|
|
- device_status.timeSwitch = 0; //工作模式:光控
|
|
|
|
|
- device_status.passWord = 8888; //屏幕密码
|
|
|
|
|
- device_status.dattim = 10; //数据上传间隔
|
|
|
|
|
- device_status.ds = 1; //设备状态
|
|
|
|
|
- device_status.update_flag = 0;
|
|
|
|
|
- /*孢子仪*/
|
|
|
|
|
- device_status.collecting_sh1 = 9;
|
|
|
|
|
- device_status.collecting_eh1 = 10;
|
|
|
|
|
- device_status.collecting_sh2 = 14;
|
|
|
|
|
- device_status.collecting_eh2 = 16;
|
|
|
|
|
- device_status.cold_sw = 0;
|
|
|
|
|
- device_status.heat_sw = 0;
|
|
|
|
|
- device_status.cul_time = 1;
|
|
|
|
|
- device_status.run_sta = 0;
|
|
|
|
|
- device_status.handle_bugger = 0; //默认排虫
|
|
|
|
|
- sprintf(device_status.driver, "%s",VERSION_HK);
|
|
|
|
|
- sprintf(device_status.deviceId,"0");
|
|
|
|
|
- rt_sprintf(device_status.tempture, "-15");
|
|
|
|
|
- rt_sprintf(device_status.humidity, "31");
|
|
|
|
|
- rt_sprintf(device_status.mqttcfg1, "8.136.98.49");
|
|
|
|
|
- ef_set_env_blob("iSave", &device_status.iSave, sizeof(device_status.iSave)); //
|
|
|
|
|
- ef_set_env_blob("ds", &device_status.ds, sizeof(device_status.ds));
|
|
|
|
|
- ef_set_env_blob("stime", &device_status.clt_time, sizeof(device_status.clt_time));
|
|
|
|
|
- ef_set_env_blob("startBar", &device_status.startBar, sizeof(device_status.startBar));
|
|
|
|
|
- ef_set_env_blob("stopBar", &device_status.stopBar, sizeof(device_status.stopBar));
|
|
|
|
|
- ef_set_env_blob("timeSwitch", &device_status.timeSwitch, sizeof(device_status.timeSwitch));
|
|
|
|
|
- ef_set_env_blob("sunBar", &device_status.sunBar, sizeof(device_status.sunBar));
|
|
|
|
|
- ef_set_env_blob("jtime", &device_status.heattime, sizeof(device_status.heattime));
|
|
|
|
|
- ef_set_env_blob("jheat", &device_status.heatvalue, sizeof(device_status.heatvalue));
|
|
|
|
|
- ef_set_env_blob("tph", &device_status.tph, sizeof(device_status.tph));
|
|
|
|
|
- ef_set_env_blob("tpl", &device_status.tpl, sizeof(device_status.tpl));
|
|
|
|
|
- ef_set_env_blob("shake_ws", &device_status.shake_ws, sizeof(device_status.shake_ws)); //震动开关
|
|
|
|
|
- ef_set_env_blob("shake_sec", &device_status.shake_sec, sizeof(device_status.shake_sec)); //震动时间
|
|
|
|
|
- ef_set_env_blob("thsp", &device_status.thsp, sizeof(device_status.thsp));
|
|
|
|
|
- ef_set_env_blob("passWord", &device_status.passWord,sizeof(device_status.passWord));
|
|
|
|
|
- ef_set_env_blob("dattim",&device_status.dattim,sizeof(device_status.dattim)); //上传时间
|
|
|
|
|
- ef_set_env_blob("version_type",&device_status.version_type,sizeof(device_status.version_type)); //版本类型
|
|
|
|
|
- ef_set_env_blob("env_t",&device_status.tempture,sizeof(device_status.tempture)); //温度
|
|
|
|
|
- ef_set_env_blob("env_h",&device_status.humidity,sizeof(device_status.humidity)); //湿度
|
|
|
|
|
- ef_set_env_blob("platform",&device_status.mqttcfg1,sizeof(device_status.mqttcfg1)); //上传平台
|
|
|
|
|
-
|
|
|
|
|
- ef_set_env_blob("cul_time",&device_status.cul_time,sizeof(device_status.cul_time)); //采集时间
|
|
|
|
|
- ef_set_env_blob("cold_sw",&device_status.cold_sw,sizeof(device_status.cold_sw)); //制冷开关
|
|
|
|
|
- ef_set_env_blob("heat_sw",&device_status.heat_sw,sizeof(device_status.heat_sw)); //加热开关
|
|
|
|
|
- ef_set_env_blob("collecting_sh1",&device_status.collecting_sh1,sizeof(device_status.collecting_sh1)); //风机开关
|
|
|
|
|
- ef_set_env_blob("collecting_eh1",&device_status.collecting_eh1,sizeof(device_status.collecting_eh1)); //采集时间
|
|
|
|
|
- ef_set_env_blob("collecting_sh2",&device_status.collecting_sh2,sizeof(device_status.collecting_sh2)); //采集时间
|
|
|
|
|
- ef_set_env_blob("collecting_eh2",&device_status.collecting_eh2,sizeof(device_status.collecting_eh2)); //采集时间
|
|
|
|
|
- ef_set_env_blob("run_sta", &device_status.run_sta, sizeof(device_status.run_sta)); //
|
|
|
|
|
- ef_set_env_blob("Power_Type", &device_status.Power_Type, sizeof(device_status.Power_Type));
|
|
|
|
|
- ef_set_env_blob("handle_bugger", &device_status.handle_bugger, sizeof(device_status.handle_bugger));
|
|
|
|
|
-
|
|
|
|
|
- LOG_I("SOFTWARE VERSION:%s",device_status.driver);
|
|
|
|
|
- LOG_I("Default paramconf is:");
|
|
|
|
|
- LOG_I("stime:%d",device_status.iSave);
|
|
|
|
|
- LOG_I("stime:%d",device_status.clt_time);
|
|
|
|
|
- LOG_I("startBar:%d",device_status.startBar);
|
|
|
|
|
- LOG_I("stopBar:%d",device_status.stopBar);
|
|
|
|
|
- LOG_I("timeSwitch:%d",device_status.timeSwitch);
|
|
|
|
|
- LOG_I("sunBar:%d",device_status.sunBar);
|
|
|
|
|
- LOG_I("jtime:%d",device_status.heattime);
|
|
|
|
|
- LOG_I("jheat:%d",device_status.heatvalue);
|
|
|
|
|
- LOG_I("thsp:%d", device_status.thsp);
|
|
|
|
|
- LOG_I("passwd:%d",device_status.passWord);
|
|
|
|
|
-
|
|
|
|
|
- }//从easyflash读取参数配置
|
|
|
|
|
- else if (device_status.iSave==FLASH_FLAG) {
|
|
|
|
|
- ef_get_env_blob("dtype",&device_status.dtype,sizeof(device_status.dtype),NULL); //设备类型
|
|
|
|
|
- ef_get_env_blob("dattim",&device_status.dattim,sizeof(device_status.dattim),NULL); //数据上传间隔
|
|
|
|
|
- ef_get_env_blob("stime", &device_status.clt_time, sizeof(device_status.clt_time), NULL); //收集时间
|
|
|
|
|
- ef_get_env_blob("startBar", &device_status.startBar,sizeof(device_status.startBar), NULL); //开始时间
|
|
|
|
|
- ef_get_env_blob("stopBar", &device_status.stopBar, sizeof(device_status.stopBar), NULL); //结束时间
|
|
|
|
|
- ef_get_env_blob("timeSwitch", &device_status.timeSwitch, sizeof(device_status.timeSwitch), NULL); //模式
|
|
|
|
|
- ef_get_env_blob("sunBar", &device_status.sunBar, sizeof(device_status.sunBar), NULL); //光控时间
|
|
|
|
|
- ef_get_env_blob("jtime", &device_status.heattime, sizeof(device_status.heattime), NULL); //加热时间
|
|
|
|
|
- ef_get_env_blob("jheat", &device_status.heatvalue, sizeof(device_status.heatvalue), NULL); //加热温度
|
|
|
|
|
- ef_get_env_blob("shake_ws", &device_status.shake_ws, sizeof(device_status.shake_ws), NULL); //震动开关
|
|
|
|
|
- ef_get_env_blob("shake_sec", &device_status.shake_sec, sizeof(device_status.shake_sec), NULL); //震动时间
|
|
|
|
|
- ef_get_env_blob("tph", &device_status.tph, sizeof(device_status.tph), NULL); //高温保护
|
|
|
|
|
- ef_get_env_blob("tpl", &device_status.tpl, sizeof(device_status.tpl), NULL); //低温保护
|
|
|
|
|
- ef_get_env_blob("dattim", &device_status.dattim, sizeof(device_status.dattim), NULL); //数据上传间隔
|
|
|
|
|
- ef_get_env_blob("thsp", &device_status.thsp, sizeof(device_status.thsp), NULL); //熄屏时间
|
|
|
|
|
- ef_get_env_blob("passWord",&device_status.passWord,sizeof(device_status.passWord),NULL); //密码
|
|
|
|
|
- ef_get_env_blob("imei",&device_status.imei,sizeof(device_status.imei),NULL); //IMEI
|
|
|
|
|
- ef_get_env_blob("iccid",&device_status.iccid,sizeof(device_status.iccid),NULL); //ICCID
|
|
|
|
|
- ef_get_env_blob("lat",&device_status.lat,sizeof(device_status.lat),NULL);
|
|
|
|
|
- ef_get_env_blob("lng",&device_status.lng,sizeof(device_status.lng),NULL);
|
|
|
|
|
- ef_get_env_blob("ds",&device_status.ds,sizeof(device_status.ds),NULL); //开关机状态
|
|
|
|
|
- ef_get_env_blob("env_t",&device_status.tempture,sizeof(device_status.tempture),NULL); //环境温度
|
|
|
|
|
- ef_get_env_blob("env_h",&device_status.humidity,sizeof(device_status.humidity),NULL); //环境湿度
|
|
|
|
|
- ef_get_env_blob("json_w_clock",&device_status.json_w_clock,sizeof(device_status.json_w_clock),NULL); //时间
|
|
|
|
|
- ef_get_env_blob("json_w_reset",&device_status.json_w_reset,sizeof(device_status.json_w_reset),NULL); //重置
|
|
|
|
|
- ef_get_env_blob("json_w_platform",&device_status.json_w_platform,sizeof(device_status.json_w_platform),NULL);//平台
|
|
|
|
|
- ef_get_env_blob("version_type",&device_status.version_type,sizeof(device_status.version_type),NULL); //版本类型
|
|
|
|
|
- ef_get_env_blob("driver_bl",&device_status.driver_bl,sizeof(device_status.driver_bl),NULL); //BL版本号 进BL的时候存储到FLASH
|
|
|
|
|
- ef_get_env_blob("platform",&device_status.mqttcfg1,sizeof(device_status.mqttcfg1),NULL); //平台地址
|
|
|
|
|
- /*孢子仪*/
|
|
|
|
|
- ef_get_env_blob("cul_time",&device_status.cul_time,sizeof(device_status.cul_time),NULL); //培养时间
|
|
|
|
|
- ef_get_env_blob("cold_sw",&device_status.cold_sw,sizeof(device_status.cold_sw),NULL); //制冷开关
|
|
|
|
|
- ef_get_env_blob("heat_sw",&device_status.heat_sw,sizeof(device_status.heat_sw),NULL); //加热开关
|
|
|
|
|
- ef_get_env_blob("collecting_sh1",&device_status.collecting_sh1,sizeof(device_status.collecting_sh1),NULL); //采集开始1
|
|
|
|
|
- ef_get_env_blob("collecting_eh1",&device_status.collecting_eh1,sizeof(device_status.collecting_eh1),NULL); //采集结束1
|
|
|
|
|
- ef_get_env_blob("collecting_sh2",&device_status.collecting_sh2,sizeof(device_status.collecting_sh2),NULL); //采集开始2
|
|
|
|
|
- ef_get_env_blob("collecting_eh2",&device_status.collecting_eh2,sizeof(device_status.collecting_eh2),NULL); //采集结束2
|
|
|
|
|
- ef_get_env_blob("run_sta",&device_status.run_sta,sizeof(device_status.run_sta),NULL); //运行状态
|
|
|
|
|
- ef_get_env_blob("Power_Type",&device_status.Power_Type,sizeof(device_status.Power_Type),NULL); //供电类型
|
|
|
|
|
- ef_get_env_blob("deviceId",&device_status.deviceId,sizeof(device_status.deviceId),NULL); //设备编码
|
|
|
|
|
- ef_get_env_blob("handle_bugger",&device_status.handle_bugger,sizeof(device_status.handle_bugger),NULL); //排虫
|
|
|
|
|
- device_status.light_over_tim = device_status.sunBar * 3600; //光控计数
|
|
|
|
|
- device_status.work_done = 0;
|
|
|
|
|
- //工作完成标志位
|
|
|
|
|
- if(device_status.dattim==0)
|
|
|
|
|
- {
|
|
|
|
|
- device_status.dattim = 10;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if(device_status.clt_time==0) device_status.clt_time = 10;
|
|
|
|
|
- if(device_status.heattime==0) device_status.heattime = 10;
|
|
|
|
|
- if(device_status.tph==0) device_status.tph = 70;
|
|
|
|
|
- if(device_status.heatvalue==0) device_status.heatvalue = 100;
|
|
|
|
|
-
|
|
|
|
|
- /*设备类型,7孢子仪,3测报灯,默认设置测报灯*/
|
|
|
|
|
- if(device_status.dtype!=7)
|
|
|
|
|
- {
|
|
|
|
|
- device_status.dtype = 3;
|
|
|
|
|
- }
|
|
|
|
|
- else {
|
|
|
|
|
- device_status.version_type = 7;
|
|
|
|
|
- }
|
|
|
|
|
- if(device_status.version_type==0)
|
|
|
|
|
- {
|
|
|
|
|
- app_partion_backup(); //固件备份至df_area
|
|
|
|
|
- device_status.version_type = 41;
|
|
|
|
|
- rt_sprintf(device_status.driver, "%s",VERSION_HK);
|
|
|
|
|
- ef_set_env_blob("version_type",&device_status.version_type,sizeof(device_status.version_type));
|
|
|
|
|
- }
|
|
|
|
|
- else if(device_status.version_type==1)
|
|
|
|
|
- {
|
|
|
|
|
- rt_sprintf(device_status.driver, "%s",VERSION_ZP);
|
|
|
|
|
- }
|
|
|
|
|
- else if (device_status.version_type==11)
|
|
|
|
|
- {
|
|
|
|
|
- rt_sprintf(device_status.driver, "%s",VERSION_GK);
|
|
|
|
|
- }
|
|
|
|
|
- else if (device_status.version_type==4)
|
|
|
|
|
- {
|
|
|
|
|
- rt_sprintf(device_status.driver, "%s",VERSION_HK_2000W);
|
|
|
|
|
- }
|
|
|
|
|
- else if (device_status.version_type==41) {
|
|
|
|
|
- rt_sprintf(device_status.driver, "%s",VERSION_HK);
|
|
|
|
|
- }
|
|
|
|
|
- /*定制三色光源*/
|
|
|
|
|
- #if LAMP_EN == 1
|
|
|
|
|
- if(device_status.sunBar%3!=0)
|
|
|
|
|
- {
|
|
|
|
|
- device_status.sunBar = 3;
|
|
|
|
|
- }
|
|
|
|
|
-// device_status.timeSwitch = 1;
|
|
|
|
|
-// device_status.startBar = 20;
|
|
|
|
|
-// device_status.stopBar = 23;
|
|
|
|
|
- #endif
|
|
|
|
|
- LOG_I("SOFTWARE VERSION:%s-imei:%s--iccid:%s",device_status.driver,device_status.imei,device_status.iccid);
|
|
|
|
|
- LOG_I("read flash paramconfis:%d-%s-%s",device_status.version_type,device_status.driver_bl,device_status.driver_compile);
|
|
|
|
|
- LOG_I("开机次数:%d",device_status.rebootcnt);
|
|
|
|
|
- LOG_I("收集时间:%d",device_status.clt_time);
|
|
|
|
|
- LOG_I("定时开始时间:%d",device_status.startBar);
|
|
|
|
|
- LOG_I("定时结束时间:%d",device_status.stopBar);
|
|
|
|
|
- LOG_I("timeSwitch:%d",device_status.timeSwitch);
|
|
|
|
|
- LOG_I("光控定时时长:%d",device_status.sunBar);
|
|
|
|
|
- LOG_I("加热开关:%d",device_status.heat_sw);
|
|
|
|
|
- LOG_I("加热时间:%d",device_status.heattime);
|
|
|
|
|
- LOG_I("加热温度:%d",device_status.heatvalue);
|
|
|
|
|
- LOG_I("震动开关:%d",device_status.shake_ws);
|
|
|
|
|
- LOG_I("震动时间:%d",device_status.shake_sec);
|
|
|
|
|
- LOG_I("高温保护:%d",device_status.tph);
|
|
|
|
|
- LOG_I("低温保护:%d",device_status.tpl);
|
|
|
|
|
- LOG_I("thsp:%d", device_status.thsp);
|
|
|
|
|
- LOG_I("密码:%d",device_status.passWord);
|
|
|
|
|
- LOG_I("数据上传间隔:%d",device_status.dattim);
|
|
|
|
|
- LOG_I("温湿度数据:%d-%d",atoi(device_status.tempture),atoi(device_status.humidity));
|
|
|
|
|
- LOG_I("上传平台:%s",device_status.mqttcfg1);
|
|
|
|
|
- LOG_I("孢子仪运行状态:%d",device_status.run_sta);
|
|
|
|
|
- LOG_I("孢子仪采集时间:[%d-%d,%d-%d]",device_status.collecting_sh1,device_status.collecting_eh1,device_status.collecting_sh2,device_status.collecting_eh2);
|
|
|
|
|
- LOG_I("PowerType:%d",device_status.Power_Type);
|
|
|
|
|
- LOG_I("deviceId:%s",device_status.deviceId);
|
|
|
|
|
- LOG_I("handle_bugger:%d",device_status.handle_bugger);
|
|
|
|
|
- }
|
|
|
|
|
- //RTC时间判断,如果当前年份小于2020,提示需要设置时间,切换为光控
|
|
|
|
|
- if(device_status.update_flag==1)
|
|
|
|
|
- {
|
|
|
|
|
- device_status.update_flag = 0;
|
|
|
|
|
- ef_set_env_blob("update_flag", &device_status.update_flag, sizeof(device_status.update_flag));
|
|
|
|
|
- ymodem_ota(1,0);
|
|
|
|
|
- }
|
|
|
|
|
- else {
|
|
|
|
|
- device_status.update_flag = 0;
|
|
|
|
|
- //初始化联网状态
|
|
|
|
|
- rt_sprintf(device_status.net,"1");
|
|
|
|
|
- rt_sprintf(device_status.csq,"0");
|
|
|
|
|
- rt_sprintf(device_status.sim,"1");
|
|
|
|
|
-#ifdef RT_USING_ALARM
|
|
|
|
|
- alarm_app_router();
|
|
|
|
|
-#endif
|
|
|
|
|
-#if MATCH_DEVICE== 0
|
|
|
|
|
- ctr_router(ON);
|
|
|
|
|
-#else
|
|
|
|
|
- ctr_router(OFF);
|
|
|
|
|
-#endif
|
|
|
|
|
- Hmi_Fresh();
|
|
|
|
|
-
|
|
|
|
|
- Control_clear();
|
|
|
|
|
- Control_Check(); //自检
|
|
|
|
|
-
|
|
|
|
|
- dtu_data_play();
|
|
|
|
|
- sht30_collect();
|
|
|
|
|
-#if SENSOR_EN==1
|
|
|
|
|
- mb_master_samlpe();
|
|
|
|
|
-#endif
|
|
|
|
|
-
|
|
|
|
|
- uint16_t connect_num=0;
|
|
|
|
|
- //等待联网,
|
|
|
|
|
- while(atoi(device_status.net)==1)
|
|
|
|
|
- {
|
|
|
|
|
- if(Read_Real_Voltage()/100>5&&device_status.power_status==0)
|
|
|
|
|
- ctr_RTU_DTU(ON);
|
|
|
|
|
- char *readinfo = makeJson_ReadInfo();
|
|
|
|
|
- DTU_Write("%s",readinfo);
|
|
|
|
|
- rt_free(readinfo);
|
|
|
|
|
- rt_thread_delay(1000);
|
|
|
|
|
- connect_num++;
|
|
|
|
|
- LOG_I("联网中......%d",connect_num);
|
|
|
|
|
- //超时时间为3分钟
|
|
|
|
|
- #if MATCH_DEVICE == 1
|
|
|
|
|
- if(connect_num==60) //180
|
|
|
|
|
- {
|
|
|
|
|
- device_status.timeSwitch = 1;
|
|
|
|
|
- LOG_W("Time not set:%04d-%02d-%02d %02d:%02d:%02d",tm.tm_year+1900,tm.tm_mon+1,tm.tm_mday,tm.tm_hour,tm.tm_min,tm.tm_sec);
|
|
|
|
|
- #if 0
|
|
|
|
|
- set_date(2020, 1, 1);
|
|
|
|
|
- set_time(0, 0, 0);
|
|
|
|
|
- #endif
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- #else
|
|
|
|
|
- if(connect_num==180) //180
|
|
|
|
|
- {
|
|
|
|
|
- device_status.timeSwitch = 0;
|
|
|
|
|
- LOG_W("Time not set:%04d-%02d-%02d %02d:%02d:%02d",tm.tm_year+1900,tm.tm_mon+1,tm.tm_mday,tm.tm_hour,tm.tm_min,tm.tm_sec);
|
|
|
|
|
- #if 0
|
|
|
|
|
- set_date(2020, 1, 1);
|
|
|
|
|
- set_time(0, 0, 0);
|
|
|
|
|
- #endif
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- #endif
|
|
|
|
|
- }
|
|
|
|
|
- connect_num = 0;
|
|
|
|
|
- while(atoi(device_status.net)==0)
|
|
|
|
|
- {
|
|
|
|
|
- char *readinfo = makeJson_ReadInfo();
|
|
|
|
|
- DTU_Write("%s",readinfo);
|
|
|
|
|
- rt_free(readinfo);
|
|
|
|
|
- rt_thread_delay(2000);
|
|
|
|
|
- connect_num++;
|
|
|
|
|
- if(connect_num>5) break;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- DTU_Write("%s",makeJson_Warn("turnon", "device_stm32"));
|
|
|
|
|
- rt_thread_delay(1000);
|
|
|
|
|
- dtu_send_data_start();
|
|
|
|
|
- Workstatus_check();
|
|
|
|
|
- Work_Loop_Task();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ LOG_I("Flash写完成...");
|
|
|
|
|
+ LOG_I("Flash读测试...");
|
|
|
|
|
+ /* 读取字符串 */
|
|
|
|
|
+ size_t len;
|
|
|
|
|
+ char *value;
|
|
|
|
|
+ value = ef_get_env("test_key");
|
|
|
|
|
+ if (value) {
|
|
|
|
|
+ LOG_I("test_key value: %s (len=%d)\n", value, sizeof(value));
|
|
|
|
|
+ } else {
|
|
|
|
|
+ LOG_E("test_key not found!\n");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
void ResetParamDefault(void)
|
|
void ResetParamDefault(void)
|
|
|
{
|
|
{
|