Browse Source

区分一位和二三六位按键触发

zzw 5 months ago
parent
commit
0deca44f95
43 changed files with 932 additions and 600 deletions
  1. 1 1
      Projects/macro/switch_ota_app_V1.1.06/Listings/CRC.lst
  2. 4 4
      Projects/macro/switch_ota_app_V1.1.06/Listings/EEPROM.lst
  3. 3 3
      Projects/macro/switch_ota_app_V1.1.06/Listings/GLOBAL.lst
  4. 25 25
      Projects/macro/switch_ota_app_V1.1.06/Listings/HLW8110.lst
  5. 212 212
      Projects/macro/switch_ota_app_V1.1.06/Listings/HSW_3KEY_APP_V10.m51
  6. 5 5
      Projects/macro/switch_ota_app_V1.1.06/Listings/STARTUP_TENX52.lst
  7. 3 3
      Projects/macro/switch_ota_app_V1.1.06/Listings/TM52F1386_bsp.lst
  8. 173 139
      Projects/macro/switch_ota_app_V1.1.06/Listings/gpio_ctrl.lst
  9. 6 6
      Projects/macro/switch_ota_app_V1.1.06/Listings/iap.lst
  10. 24 24
      Projects/macro/switch_ota_app_V1.1.06/Listings/main.lst
  11. 11 11
      Projects/macro/switch_ota_app_V1.1.06/Listings/mcu_api.lst
  12. 44 44
      Projects/macro/switch_ota_app_V1.1.06/Listings/protocol.lst
  13. 1 1
      Projects/macro/switch_ota_app_V1.1.06/Listings/sTimeout.lst
  14. 13 13
      Projects/macro/switch_ota_app_V1.1.06/Listings/system.lst
  15. 2 2
      Projects/macro/switch_ota_app_V1.1.06/Listings/time2.lst
  16. 4 4
      Projects/macro/switch_ota_app_V1.1.06/Listings/uart.lst
  17. 7 7
      Projects/macro/switch_ota_app_V1.1.06/Listings/uart2.lst
  18. BIN
      Projects/macro/switch_ota_app_V1.1.06/Objects/CRC.obj
  19. BIN
      Projects/macro/switch_ota_app_V1.1.06/Objects/EEPROM.obj
  20. BIN
      Projects/macro/switch_ota_app_V1.1.06/Objects/GLOBAL.obj
  21. BIN
      Projects/macro/switch_ota_app_V1.1.06/Objects/HLW8110.obj
  22. BIN
      Projects/macro/switch_ota_app_V1.1.06/Objects/HSW_3KEY_APP_V10
  23. 151 12
      Projects/macro/switch_ota_app_V1.1.06/Objects/HSW_3KEY_APP_V10.build_log.htm
  24. 4 4
      Projects/macro/switch_ota_app_V1.1.06/Objects/HSW_3KEY_APP_V10.tenx
  25. 19 19
      Projects/macro/switch_ota_app_V1.1.06/Objects/HSW_3KEY_APP_V10.tenx.crc2
  26. BIN
      Projects/macro/switch_ota_app_V1.1.06/Objects/STARTUP_TENX52.obj
  27. BIN
      Projects/macro/switch_ota_app_V1.1.06/Objects/TM52F1386_bsp.obj
  28. BIN
      Projects/macro/switch_ota_app_V1.1.06/Objects/gpio_ctrl.obj
  29. BIN
      Projects/macro/switch_ota_app_V1.1.06/Objects/iap.obj
  30. BIN
      Projects/macro/switch_ota_app_V1.1.06/Objects/main.obj
  31. BIN
      Projects/macro/switch_ota_app_V1.1.06/Objects/mcu_api.obj
  32. BIN
      Projects/macro/switch_ota_app_V1.1.06/Objects/protocol.obj
  33. BIN
      Projects/macro/switch_ota_app_V1.1.06/Objects/sTimeout.obj
  34. BIN
      Projects/macro/switch_ota_app_V1.1.06/Objects/system.obj
  35. BIN
      Projects/macro/switch_ota_app_V1.1.06/Objects/time2.obj
  36. BIN
      Projects/macro/switch_ota_app_V1.1.06/Objects/uart.obj
  37. BIN
      Projects/macro/switch_ota_app_V1.1.06/Objects/uart2.obj
  38. 33 1
      Projects/macro/switch_ota_app_V1.1.06/gpio_ctrl.c
  39. 89 26
      Projects/macro/switch_ota_app_V1.1.06/main.uvgui.CHENSIR
  40. 90 27
      Projects/macro/switch_ota_app_V1.1.06/main.uvgui_CHENSIR.bak
  41. 4 4
      Projects/macro/switch_ota_app_V1.1.06/main.uvopt
  42. 2 2
      Projects/macro/switch_ota_app_V1.1.06/main_uvopt.bak
  43. 2 1
      Projects/macro/版本记录.txt

+ 1 - 1
Projects/macro/switch_ota_app_V1.1.06/Listings/CRC.lst

@@ -1,4 +1,4 @@
-C51 COMPILER V9.53.0.0   CRC                                                               11/12/2024 10:08:03 PAGE 1   
+C51 COMPILER V9.53.0.0   CRC                                                               11/12/2024 17:02:20 PAGE 1   
 
 
 C51 COMPILER V9.53.0.0, COMPILATION OF MODULE CRC

+ 4 - 4
Projects/macro/switch_ota_app_V1.1.06/Listings/EEPROM.lst

@@ -1,4 +1,4 @@
-C51 COMPILER V9.53.0.0   EEPROM                                                            11/12/2024 10:08:01 PAGE 1   
+C51 COMPILER V9.53.0.0   EEPROM                                                            11/12/2024 17:02:18 PAGE 1   
 
 
 C51 COMPILER V9.53.0.0, COMPILATION OF MODULE EEPROM
@@ -62,7 +62,7 @@ line level    source
   43          ** 函数描述: iap_EEPROM写数据配置函数  
   44          ** 输入参数: addr:存储地址,范围0~127
   45                       buf:数据的首地址
-C51 COMPILER V9.53.0.0   EEPROM                                                            11/12/2024 10:08:01 PAGE 2   
+C51 COMPILER V9.53.0.0   EEPROM                                                            11/12/2024 17:02:18 PAGE 2   
 
   46                len:数据长度(addr+len不要超过128)
   47          ** 输出参数: 无 
@@ -126,7 +126,7 @@ line level    source
  102   2          IAPTE_6P4_MS;        //设置IAP看门狗复位时间
  103   2          eeprom_address_write_backup[addr + i] = *buf;//
  104   2          buf++;
-C51 COMPILER V9.53.0.0   EEPROM                                                            11/12/2024 10:08:01 PAGE 3   
+C51 COMPILER V9.53.0.0   EEPROM                                                            11/12/2024 17:02:18 PAGE 3   
 
  105   2        }
  106   1        
@@ -190,7 +190,7 @@ line level    source
  160            gpio_init();
  161            write_mileage[0] = 0x22;
  162            write_mileage[1] = 0x33;
-C51 COMPILER V9.53.0.0   EEPROM                                                            11/12/2024 10:08:01 PAGE 4   
+C51 COMPILER V9.53.0.0   EEPROM                                                            11/12/2024 17:02:18 PAGE 4   
 
  163            write_mileage[2] = 0x44;
  164            write_mileage[3] = 0x55;

+ 3 - 3
Projects/macro/switch_ota_app_V1.1.06/Listings/GLOBAL.lst

@@ -1,4 +1,4 @@
-C51 COMPILER V9.53.0.0   GLOBAL                                                            11/12/2024 10:08:01 PAGE 1   
+C51 COMPILER V9.53.0.0   GLOBAL                                                            11/12/2024 17:02:19 PAGE 1   
 
 
 C51 COMPILER V9.53.0.0, COMPILATION OF MODULE GLOBAL
@@ -62,7 +62,7 @@ line level    source
   52          unsigned int gRadarKeepTimer=0;//有人存在时,LED灯等相关动作保持时间
   53          byte gRadarCheckNull;//雷达监测,1为无人,0为有人
   54          
-C51 COMPILER V9.53.0.0   GLOBAL                                                            11/12/2024 10:08:01 PAGE 2   
+C51 COMPILER V9.53.0.0   GLOBAL                                                            11/12/2024 17:02:19 PAGE 2   
 
   55          byte shockCounter;//震动计数器
   56          byte shockStart;//按键按下震动触发
@@ -126,7 +126,7 @@ line level    source
  114   1          char s8Temp;
  115   1          int s32Flag = 0;
  116   1        
-C51 COMPILER V9.53.0.0   GLOBAL                                                            11/12/2024 10:08:01 PAGE 3   
+C51 COMPILER V9.53.0.0   GLOBAL                                                            11/12/2024 17:02:19 PAGE 3   
 
  117   1          if (ps8Dest==NULL || ps8Source==NULL || s32InLen<=0)
  118   1          {

+ 25 - 25
Projects/macro/switch_ota_app_V1.1.06/Listings/HLW8110.lst

@@ -1,4 +1,4 @@
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 1   
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 1   
 
 
 C51 COMPILER V9.53.0.0, COMPILATION OF MODULE HLW8110
@@ -62,7 +62,7 @@ line level    source
   46          union LongData
   47          {
   48            unsigned long word_;
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 2   
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 2   
 
   49            unsigned int inte_[2];
   50            unsigned char byte_[4];
@@ -126,7 +126,7 @@ line level    source
   99          unsigned long U32_RMSIA_RegData = 0;   // A通道电流有效值寄存器
  100          unsigned long U32_RMSU_RegData = 0;    // 电压有效值寄存器
  101          unsigned long U32_POWERPA_RegData = 0;   // A通道功率有效值寄存器
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 3   
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 3   
 
  102          unsigned long U32_ENERGY_PA_RegData = 0; // A通道有功电能(量)有效值寄存器
  103          
@@ -190,7 +190,7 @@ line level    source
  155          /*========================================================================================================
              -=
  156           * Function : unsigned char HLW8110_checkSum_Write(unsigned char u8_Reg_length)
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 4   
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 4   
 
  157           * Describe :
  158           * Input    : none
@@ -254,7 +254,7 @@ line level    source
  212           * Describe :
  213           * Input    : none
  214           * Output   : none
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 5   
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 5   
 
  215           * Return   : none
  216           * Record   : 2019/04/03
@@ -318,7 +318,7 @@ line level    source
  269   1        u8_TxBuf[1] = 0xea;
  270   1        u8_TxBuf[2] = 0x5a;
  271   1        //  u8_TxBuf[3] = 0x16;  //checksum
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 6   
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 6   
 
  272   1        u8_TxBuf[3] = HLW8110_checkSum_Write(u8_TX_Length);
  273   1      
@@ -382,7 +382,7 @@ line level    source
  326   1      }
  327          
  328          /*========================================================================================================
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 7   
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 7   
 
              -=
  329           * Function : void Uart_HLW8110_Reset(void)
@@ -446,7 +446,7 @@ line level    source
  382   2          else if (nun == 3) // 第三路
  383   2          {
  384   3            U16_RMSIAC_RegData[2] = (b << 8) + u8_RxBuf[1]; // printf("A通道电流转换系数:%x\n " ,U16_RMSIAC_RegData
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 8   
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 8   
 
              -);
  385   3          }
@@ -510,7 +510,7 @@ line level    source
  439   2          else if (nun == 2) // 第二路
  440   2          {
  441   3            U16_PowerPAC_RegData[1] = (b << 8) + u8_RxBuf[1]; // printf("A通道功率转换系数:%x\n " ,U16_PowerPAC_Reg
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 9   
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 9   
 
              -Data);
  442   3          }
@@ -574,7 +574,7 @@ line level    source
  493   2          {
  494   3            U16_EnergyAC_RegData[0] = (b << 8) + u8_RxBuf[1]; // printf("A通道电量转换系数:%x\n " ,U16_EnergyAC_Reg
              -Data);
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 10  
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 10  
 
  495   3          }
  496   2          else if (nun == 2) // 第二路
@@ -638,7 +638,7 @@ line level    source
  549   1        {
  550   2          a = ~(0xffff + U16_RMSIAC_RegData[0] + U16_RMSIBC_RegData[0] + U16_RMSUC_RegData[0] +
  551   2              U16_PowerPAC_RegData[0] + U16_PowerPBC_RegData[0] + U16_PowerSC_RegData[0] +
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 11  
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 11  
 
  552   2              U16_EnergyAC_RegData[0] + U16_EnergyBC_RegData[0]);
  553   2      
@@ -702,7 +702,7 @@ line level    source
  611   1      
  612   1        return d;
  613   1      }
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 12  
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 12  
 
  614          
  615          /*========================================================================================================
@@ -766,7 +766,7 @@ line level    source
  666   2        }
  667   1        else
  668   1        {
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 13  
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 13  
 
  669   2          // printf("SysconReg寄存器读取出错\r\n");
  670   2          B_Read_Error = 1;
@@ -830,7 +830,7 @@ line level    source
              -ng)(u8_RxBuf[2]);
  726   2          // printf("A通道电流寄存器:%lx\n " ,U32_RMSIA_RegData);
  727   2        }
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 14  
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 14  
 
  728   1        else
  729   1        {
@@ -894,7 +894,7 @@ line level    source
  787   2        }
  788   1      }
  789          /*========================================================================================================
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 15  
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 15  
 
              -=
  790           * Function : void Read_HLW8110_U(void)
@@ -958,7 +958,7 @@ line level    source
  846   2          a_u = a_u / 100;   // 计算出a = 22083.12mV,a/100表示220.8312V,电压转换成V
  847   2          a_u = a_u * D_CAL_U; // D_CAL_U是校正系数,默认是1,
  848   2          // F_AC_V = a;
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 16  
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 16  
 
  849   2          // switchState.dp_cur_voltage = (unsigned long)(a * 10);
  850   2          if (nun == 1)
@@ -1022,7 +1022,7 @@ line level    source
  905   3            c_pa = (c_pa << 8) + u8_RxBuf[1];
  906   3            c_pa = (c_pa << 8) + u8_RxBuf[2];
  907   3            c_pa = (c_pa << 8) + u8_RxBuf[3];
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 17  
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 17  
 
  908   3            U32_POWERPA_RegData = c_pa;
  909   3            // U32_POWERPA_RegData = (unsigned long)(u8_RxBuf[0]<<24) + (unsigned long)(u8_RxBuf[1]<<16) + (unsigne
@@ -1086,7 +1086,7 @@ line level    source
  965           * Describe : 读取A通道有功电量
  966           * Input    : none
  967           * Output   : none
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 18  
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 18  
 
  968           * Return   : none
  969           * Record   : 2019/04/03
@@ -1150,7 +1150,7 @@ line level    source
 1025   1        a_ea = a_ea / 0.5319;   // 1 = 电压系数
 1026   1        a_ea = a_ea * D_CAL_A_E;  // D_CAL_A_E是校正系数,默认是1
 1027   1        // F_AC_E = a;
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 19  
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 19  
 
 1028   1        // F_AC_BACKUP_E = F_AC_E;
 1029   1        // switchState.dp_add_ele =  (unsigned long)(a*100);
@@ -1214,7 +1214,7 @@ line level    source
 1084   1        // 功率因素*100,最大为100,最小负100
 1085   1        F_AC_PF = a_pf;
 1086   1      }
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 20  
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 20  
 
 1087          
 1088          /*========================================================================================================
@@ -1278,7 +1278,7 @@ line level    source
 1143   4              // HLW8110Msg = HLW8110_1;//HLW8110_IDEL; 测试用直接跳转
 1144   4              // 增加上电读取存储的电量数据 start
 1145   4              Raed_ele_data();
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 21  
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 21  
 
 1146   4              // 增加上电读取存储的电量数据 end
 1147   4              open_second_passageway(); // 第一路初始化成功以后开启第二路
@@ -1342,7 +1342,7 @@ line level    source
 1201   4              HLW8110Msg = HLW8110_3int;
 1202   4            }
 1203   3            sTimeout(&SystemTimer, 0);
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 22  
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 22  
 
 *** WARNING C182 IN LINE 1203 OF HLW8110.c: pointer to different objects
 1204   3          }
@@ -1406,7 +1406,7 @@ line level    source
 *** WARNING C182 IN LINE 1255 OF HLW8110.c: pointer to different objects
 1256   2          {
 1257   3            open_first_passageway(); // 打开第一通道
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 23  
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 23  
 
 1258   3                         // open_second_passageway();
 1259   3            // open_third_passageway();      // 打开第三通道
@@ -1470,7 +1470,7 @@ line level    source
 1311   4              {
 1312   5                Save_data_nun = 0;
 1313   5                //  Flash_dp_add_ele_backups[0] = switchState.dp_add_ele[0];
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 24  
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 24  
 
 1314   5                //  Flash_dp_add_ele_backups[1] = switchState.dp_add_ele[1];
 1315   5                //  Flash_dp_add_ele_backups[2] = switchState.dp_add_ele[2];
@@ -1534,7 +1534,7 @@ line level    source
 1372   2          Flash_dp_add_ele[2] = (Flash_dp_add_ele[2] << 8) + power_data[9];
 1373   2          Flash_dp_add_ele[2] = (Flash_dp_add_ele[2] << 8) + power_data[10];
 1374   2          Flash_dp_add_ele[2] = (Flash_dp_add_ele[2] << 8) + power_data[11];
-C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 10:08:03 PAGE 25  
+C51 COMPILER V9.53.0.0   HLW8110                                                           11/12/2024 17:02:20 PAGE 25  
 
 1375   2        }
 1376   1      

File diff suppressed because it is too large
+ 212 - 212
Projects/macro/switch_ota_app_V1.1.06/Listings/HSW_3KEY_APP_V10.m51


+ 5 - 5
Projects/macro/switch_ota_app_V1.1.06/Listings/STARTUP_TENX52.lst

@@ -1,4 +1,4 @@
-A51 MACRO ASSEMBLER  STARTUP_TENX52                                                       11/12/2024 10:08:00 PAGE     1
+A51 MACRO ASSEMBLER  STARTUP_TENX52                                                       11/12/2024 17:02:18 PAGE     1
 
 
 MACRO ASSEMBLER A51 V8.02b
@@ -65,7 +65,7 @@ LOC  OBJ            LINE     SOURCE
                       54     ; <o> PDATASTART: PDATA memory start address <0x0-0xFFFF> 
                       55     ;     <i> The absolute start address of PDATA memory
   0000                56     PDATASTART      EQU     0H              ; the absolute start-address of PDATA memory
-A51 MACRO ASSEMBLER  STARTUP_TENX52                                                       11/12/2024 10:08:00 PAGE     2
+A51 MACRO ASSEMBLER  STARTUP_TENX52                                                       11/12/2024 17:02:18 PAGE     2
 
                       57     ;
                       58     ; <o> PDATALEN: PDATA memory size <0x0-0xFF> 
@@ -133,7 +133,7 @@ LOC  OBJ            LINE     SOURCE
                      120     
                      121     ; Standard SFR Symbols 
   00E0               122     ACC     DATA    0E0H
-A51 MACRO ASSEMBLER  STARTUP_TENX52                                                       11/12/2024 10:08:00 PAGE     3
+A51 MACRO ASSEMBLER  STARTUP_TENX52                                                       11/12/2024 17:02:18 PAGE     3
 
   00F0               123     B       DATA    0F0H
   0081               124     SP      DATA    81H
@@ -201,7 +201,7 @@ LOC  OBJ            LINE     SOURCE
                                              CLR     A
                              PDATALOOP:      MOVX    @R0,A
                                              INC     R0
-A51 MACRO ASSEMBLER  STARTUP_TENX52                                                       11/12/2024 10:08:00 PAGE     4
+A51 MACRO ASSEMBLER  STARTUP_TENX52                                                       11/12/2024 17:02:18 PAGE     4
 
                                              DJNZ    R7,PDATALOOP
                              ENDIF
@@ -238,7 +238,7 @@ LOC  OBJ            LINE     SOURCE
 0009 020000   F      221                     LJMP    ?C_START    ;call main() function in the C code
                      222     
                      223                     END
-A51 MACRO ASSEMBLER  STARTUP_TENX52                                                       11/12/2024 10:08:00 PAGE     5
+A51 MACRO ASSEMBLER  STARTUP_TENX52                                                       11/12/2024 17:02:18 PAGE     5
 
 SYMBOL TABLE LISTING
 ------ ----- -------

+ 3 - 3
Projects/macro/switch_ota_app_V1.1.06/Listings/TM52F1386_bsp.lst

@@ -1,4 +1,4 @@
-C51 COMPILER V9.53.0.0   TM52F1386_BSP                                                     11/12/2024 10:08:03 PAGE 1   
+C51 COMPILER V9.53.0.0   TM52F1386_BSP                                                     11/12/2024 17:02:20 PAGE 1   
 
 
 C51 COMPILER V9.53.0.0, COMPILATION OF MODULE TM52F1386_BSP
@@ -62,7 +62,7 @@ line level    source
   47          **函数名称  bsp_SXT_clock_init()
   48          **函数描述 :设置SXT外部慢速晶体振荡器/2为系统时钟
   49          **输    入 :无
-C51 COMPILER V9.53.0.0   TM52F1386_BSP                                                     11/12/2024 10:08:03 PAGE 2   
+C51 COMPILER V9.53.0.0   TM52F1386_BSP                                                     11/12/2024 17:02:20 PAGE 2   
 
   50          **输    出 :无
   51          **说    明 :注意 P20 P21需要配置为接外部快速晶振
@@ -126,7 +126,7 @@ line level    source
  104   3            delay_10nop();
  105   3            delay_10nop();
  106   3            delay_10nop();
-C51 COMPILER V9.53.0.0   TM52F1386_BSP                                                     11/12/2024 10:08:03 PAGE 3   
+C51 COMPILER V9.53.0.0   TM52F1386_BSP                                                     11/12/2024 17:02:20 PAGE 3   
 
  107   3          }
  108   2        }

+ 173 - 139
Projects/macro/switch_ota_app_V1.1.06/Listings/gpio_ctrl.lst

@@ -1,4 +1,4 @@
-C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 10:08:01 PAGE 1   
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 1   
 
 
 C51 COMPILER V9.53.0.0, COMPILATION OF MODULE GPIO_CTRL
@@ -62,7 +62,7 @@ line level    source
   48           else
   49           {
   50             CTRL2=0;
-C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 10:08:01 PAGE 2   
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 2   
 
   51           }
   52          }
@@ -126,7 +126,7 @@ line level    source
  110          {
  111   1        REL1_OFF = 0;
  112   1      } // gpio_bit_write(GPIOA, GPIO_PIN_6, RESET)
-C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 10:08:01 PAGE 3   
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 3   
 
  113          
  114          /*********************************************************************************************************
@@ -190,7 +190,7 @@ line level    source
  170   5      
  171   5              // add by zzw 20240302
  172   5              switchState.relay_new_status[0] = 0x00;
-C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 10:08:01 PAGE 4   
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 4   
 
  173   5              // write_mileage[0] = switchState.relay_new_status[0];
  174   5              // iap_eeprom_write(10, write_mileage, 1); // 写入1字节
@@ -254,7 +254,7 @@ line level    source
  232   5              switchState.relay_new_status[1] = 0x00;
  233   5              // write_mileage[0] = switchState.relay_new_status[1];
  234   5              // iap_eeprom_write(11, write_mileage, 1); // 写入1字节
-C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 10:08:01 PAGE 5   
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 5   
 
  235   5              iap_eeprom_read(0, write_mileage, 30); // 读取30字节
  236   5              write_mileage[11] = switchState.relay_new_status[1];
@@ -318,7 +318,7 @@ line level    source
  294   5              // iap_eeprom_write(12, write_mileage, 1); // 写入1字节
  295   5              iap_eeprom_read(0, write_mileage, 30); // 读取30字节
  296   5              write_mileage[12] = switchState.relay_new_status[2];
-C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 10:08:01 PAGE 6   
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 6   
 
  297   5              iap_eeprom_write(0, write_mileage, 30); // 写入1字节
  298   5              // add by zzw 20240302
@@ -382,7 +382,7 @@ line level    source
                       HIGH_RELAY2_ON(); // 正向脉冲开灯
                       mRelayPulseTimer2++;
                       if (mRelayPulseTimer2 >= RelayPulseTime) // test 50ms
-C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 10:08:01 PAGE 7   
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 7   
 
                       {
                         LOW_RELAY2_ON();
@@ -446,7 +446,7 @@ line level    source
                       mRelayPulseTimer3++;
                       if (mRelayPulseTimer3 >= RelayPulseTime)
                       {
-C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 10:08:01 PAGE 8   
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 8   
 
                         LOW_RELAY3_ON();
                         gRelayState |= 0x04;
@@ -510,7 +510,7 @@ line level    source
                   LOW_RELAY3_ON(); // 正向脉冲全部关闭(IO口设置低电平)
                   LOW_RELAY1_OFF();
                   LOW_RELAY2_OFF();
-C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 10:08:01 PAGE 9   
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 9   
 
                   LOW_RELAY3_OFF(); // 反向脉冲全部关闭(IO口设置低电平)
                 }
@@ -574,7 +574,7 @@ line level    source
                         mcu_dp_bool_update(DPID_SWITCH_2, 1);
                       }
                     }
-C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 10:08:01 PAGE 10  
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 10  
 
                     else if ((gRelayOnOff & 0x02) == 0x00) // 继电器2关闭
                     {
@@ -638,7 +638,7 @@ line level    source
                   switchState.SWITCH[1] = 1;
                 }
                 else
-C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 10:08:01 PAGE 11  
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 11  
 
                 {
                   switchState.SWITCH[1] = 0;
@@ -702,7 +702,7 @@ line level    source
  661          /*********************************************************************************************************
              -*
  662          **函数名称 :gpio_light_init()
-C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 10:08:01 PAGE 12  
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 12  
 
  663          **函数描述 :P26/P17/P00/P32/P33/P50配置coms推挽输出,按键指示灯
  664          **输    入 :None
@@ -766,7 +766,7 @@ line level    source
  719   1        P5_7 = 1;          */
  720   1        // P14
  721   1        SET_REG(PORTIDX, 1);
-C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 10:08:01 PAGE 13  
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 13  
 
  722   1        SET_REG_BITS(PINMOD54, PINMOD4, PIN_MODE_OD_IPU);
  723   1        P1_4 = 1; // 使能上拉
@@ -830,7 +830,7 @@ line level    source
  779   1      
  780   1        // p11,p15
  781   1        SET_REG(PORTIDX, 0);
-C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 10:08:01 PAGE 14  
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 14  
 
  782   1        SET_REG_BITS(PINMOD10, PINMOD1, PIN_MODE_PP); // 配置为CMOS推挽输出
  783   1        P0_1 = 0;
@@ -894,7 +894,7 @@ line level    source
  839          Input:      onCycle -- LED亮时间,单位10ms,最大255
  840                  ledCycle -- LED控制周期,单位10ms,最大255
  841          Output:     no
-C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 10:08:01 PAGE 15  
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 15  
 
  842          Return:     no
  843          Others:     no
@@ -958,7 +958,7 @@ line level    source
  901   3            pwm_set_duty(n, 255);
  902   3            ledTimer[n].ticket = 0;
  903   3          }
-C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 10:08:01 PAGE 16  
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 16  
 
  904   2        }
  905   1      }
@@ -1022,7 +1022,7 @@ line level    source
  963          /*******************************************************************************
  964          Function:     key_led_pwm_ctl()
  965          Description:   按键指示灯控制函数,10ms调用,硬件PWM
-C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 10:08:01 PAGE 17  
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 17  
 
  966          Calls:
  967          Called By:
@@ -1086,7 +1086,7 @@ line level    source
 1022   4              switchState.step[ledn] = 0x01; // 闪烁结束进入正常背光状态
 1023   4            }
 1024   3            else
-C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 10:08:01 PAGE 18  
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 18  
 
 1025   3            {
 1026   4              pwmLedSetParam(25, 50, ledn); // 500ms一个周期
@@ -1150,7 +1150,7 @@ line level    source
 1083   3          case 0x06:            // 正常待机模式
 1084   3            if (gRadarKeepTimer == 0) // 检测到无人
 1085   3            {
-C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 10:08:01 PAGE 19  
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 19  
 
 1086   4              pwm_set_duty(ledn, 0); // 全灭
 1087   4                           // pwm_set_duty(ledn, PWMLEVEL1); // 微亮
@@ -1214,7 +1214,7 @@ line level    source
 1139   1        SET_REG_BITS(PINMOD10, PINMOD0, PIN_MODE_AF); // pwm2 p50 --LED6
 1140   1        // SET_REG_BITS(PINMOD76, PINMOD7, PIN_MODE_AF);
 1141   1        // SET_REG_BITS(PINMOD76, PINMOD6, PIN_MODE_AF);
-C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 10:08:01 PAGE 20  
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 20  
 
 1142   1        SET_REG_BITS(PWMEN, PWM2EN, 1);
 1143   1      }
@@ -1278,7 +1278,7 @@ line level    source
 1199          *******************************************************************************************/
 1200          void pwm3_clock_config(unsigned char value) // PWM时钟源模式
 1201          {
-C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 10:08:01 PAGE 21  
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 21  
 
 1202   1        SET_REG_BITS(PWMCON, PWM3CKS, value);
 1203   1      }
@@ -1342,7 +1342,7 @@ line level    source
              -/
 1257          void pwm_set_duty(unsigned char ledn, unsigned char duty)
 1258          {
-C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 10:08:01 PAGE 22  
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 22  
 
 1259   1        if (ledn == 5) // 按键1灯1
 1260   1        {
@@ -1391,127 +1391,161 @@ line level    source
 1303   1        static byte row; // 扫描输出列计数
 1304   1        unsigned char i;
 1305   1        u08 ReadValue;
-1306   1      
-1307   1        for (i = 0; i < KEY_MAX_NUM; i++) // 每次(10ms)扫键值,如1号键暂存入1
-1308   1        {
-1309   2          sScanKey[i].KeyIn = 0xff;
-1310   2        }
-1311   1        if (KEY1_READ() == 0x00)
-1312   1        {
-1313   2          sScanKey[0].KeyIn = KEY1; // 键值
-1314   2        }
-1315   1        if (KEY2_READ() == 0x00)
-1316   1        {
-1317   2          sScanKey[1].KeyIn = KEY2; // 键值
-1318   2        }
-1319   1        if (KEY3_READ() == 0x00)
-1320   1        {
-C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 10:08:01 PAGE 23  
+1306   1      #ifdef ZIGBEE_ZTU_T1_SW
+                for (i = 0; i < KEY_MAX_NUM; i++) // 每次(10ms)扫键值,如1号键暂存入1
+                {
+                  sScanKey[i].KeyIn = 0xff;
+                }
+                if (KEY1_READ() == 0x00)
+                {
+                  sScanKey[0].KeyIn = KEY1; // 键值
+                }
+                if (KEY2_READ() == 0x00)
+                {
+                  sScanKey[0].KeyIn = KEY2; // 键值
+                }
+                if (KEY3_READ() == 0x00)
+                {
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 23  
 
-1321   2          sScanKey[2].KeyIn = KEY3; // 键值
-1322   2        }
-1323   1        if (KEY4_READ() == 0x00)
-1324   1        {
-1325   2          sScanKey[3].KeyIn = KEY4; // 键值
-1326   2        }
-1327   1      
-1328   1        if (KEY5_READ() == 0x00)
-1329   1        {
-1330   2          sScanKey[4].KeyIn = KEY5; // 键值
-1331   2        }
-1332   1      
-1333   1        if (KEY6_READ() == 0x00)
-1334   1        {
-1335   2          sScanKey[5].KeyIn = KEY6; // 键值
-1336   2        }
-1337   1      
-1338   1        for (i = 0; i < KEY_MAX_NUM; i++) // 每次(10ms)扫键值,如1号键暂存入1
-1339   1        {
-1340   2          if (sScanKey[i].KeyIn == 0xff)
-1341   2          {
-1342   3            if (sScanKey[i].key_l > 1) // 有键按下释放
-1343   3            {              // 释放按键
-1344   4      
-1345   4              if (sScanKey[i].key_h < 100) // 按键时间少于1000mS则为短按键,存入键值
-1346   4              {
-1347   5                if (++KeyCodeHead >= KEYBUFLENGTH)
-1348   5                  KeyCodeHead = 0;
-1349   5                KeyCodeBuf[KeyCodeHead].bKey = sScanKey[i].KeyInpush; // 说明键值释放了,存键值
-1350   5              }
-1351   4            }
-1352   3            sScanKey[i].KeyPrsed = 0;
-1353   3            // KeyCodeBuf[KeyCodeHead].wKeyTime = 0;
-1354   3            sScanKey[i].key_l = 0;
-1355   3            sScanKey[i].key_h = 0;
-1356   3          }
-1357   2          else
-1358   2          {
-1359   3            sScanKey[i].KeyPrsTurn = 0;
-1360   3            sScanKey[i].KeyPrsed = 1;
-1361   3            sScanKey[i].KeyInpush = sScanKey[i].KeyIn;
-1362   3            sScanKey[i].key_l++; // 每10mS加1
-1363   3      
-1364   3            if (sScanKey[i].key_l <= 1) // 一个按键按下只震动一次
-1365   3            {
-1366   4              shockStart = 1;
-1367   4              shockCounter = 0; // 有短按键按下,震动触发
-1368   4            }
-1369   3          }
-1370   2      
-1371   2          if (sScanKey[i].key_l > 100) // 长按键处理,1000mS检测一次
-1372   2          {
-1373   3      
-1374   3            if (sScanKey[i].key_h != 0x000000ff)
-1375   3            {
-1376   4              if (++KeyCodeHead >= KEYBUFLENGTH)
-1377   4                KeyCodeHead = 0;
-1378   4              sScanKey[i].key_h += 100;
-1379   4              KeyCodeBuf[KeyCodeHead].bKey = sScanKey[i].KeyInpush | LONG_KEY_MASK;
-1380   4              KeyCodeBuf[KeyCodeHead].wKeyTime = sScanKey[i].key_h;
-1381   4              sScanKey[i].key_l = 1; // 清除键值标志
-1382   4            }
-C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 10:08:01 PAGE 24  
+                  sScanKey[0].KeyIn = KEY3; // 键值
+                }
+                if (KEY4_READ() == 0x00)
+                {
+                  sScanKey[0].KeyIn = KEY4; // 键值
+                }
+              
+                if (KEY5_READ() == 0x00)
+                {
+                  sScanKey[0].KeyIn = KEY5; // 键值
+                }
+              
+                if (KEY6_READ() == 0x00)
+                {
+                  sScanKey[0].KeyIn = KEY6; // 键值
+                }
+              #endif
+1338   1      #ifndef ZIGBEE_ZTU_T1_SW
+1339   1        for (i = 0; i < KEY_MAX_NUM; i++) // 每次(10ms)扫键值,如1号键暂存入1
+1340   1        {
+1341   2          sScanKey[i].KeyIn = 0xff;
+1342   2        }
+1343   1        if (KEY1_READ() == 0x00)
+1344   1        {
+1345   2          sScanKey[0].KeyIn = KEY1; // 键值
+1346   2        }
+1347   1        if (KEY2_READ() == 0x00)
+1348   1        {
+1349   2          sScanKey[1].KeyIn = KEY2; // 键值
+1350   2        }
+1351   1        if (KEY3_READ() == 0x00)
+1352   1        {
+1353   2          sScanKey[2].KeyIn = KEY3; // 键值
+1354   2        }
+1355   1        if (KEY4_READ() == 0x00)
+1356   1        {
+1357   2          sScanKey[3].KeyIn = KEY4; // 键值
+1358   2        }
+1359   1      
+1360   1        if (KEY5_READ() == 0x00)
+1361   1        {
+1362   2          sScanKey[4].KeyIn = KEY5; // 键值
+1363   2        }
+1364   1      
+1365   1        if (KEY6_READ() == 0x00)
+1366   1        {
+1367   2          sScanKey[5].KeyIn = KEY6; // 键值
+1368   2        }
+1369   1      #endif
+1370   1        for (i = 0; i < KEY_MAX_NUM; i++) // 每次(10ms)扫键值,如1号键暂存入1
+1371   1        {
+1372   2          if (sScanKey[i].KeyIn == 0xff)
+1373   2          {
+1374   3            if (sScanKey[i].key_l > 1) // 有键按下释放
+1375   3            {              // 释放按键
+1376   4      
+1377   4              if (sScanKey[i].key_h < 100) // 按键时间少于1000mS则为短按键,存入键值
+1378   4              {
+1379   5                if (++KeyCodeHead >= KEYBUFLENGTH)
+1380   5                  KeyCodeHead = 0;
+1381   5                KeyCodeBuf[KeyCodeHead].bKey = sScanKey[i].KeyInpush; // 说明键值释放了,存键值
+1382   5              }
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 24  
 
-1383   3            else
-1384   3            {
-1385   4              sScanKey[i].key_l = 1; // 清除键值标志
-1386   4            }
-1387   3          }
-1388   2        }
-1389   1      }
+1383   4            }
+1384   3            sScanKey[i].KeyPrsed = 0;
+1385   3            // KeyCodeBuf[KeyCodeHead].wKeyTime = 0;
+1386   3            sScanKey[i].key_l = 0;
+1387   3            sScanKey[i].key_h = 0;
+1388   3          }
+1389   2          else
+1390   2          {
+1391   3            sScanKey[i].KeyPrsTurn = 0;
+1392   3            sScanKey[i].KeyPrsed = 1;
+1393   3            sScanKey[i].KeyInpush = sScanKey[i].KeyIn;
+1394   3            sScanKey[i].key_l++; // 每10mS加1
+1395   3      
+1396   3            if (sScanKey[i].key_l <= 1) // 一个按键按下只震动一次
+1397   3            {
+1398   4              shockStart = 1;
+1399   4              shockCounter = 0; // 有短按键按下,震动触发
+1400   4            }
+1401   3          }
+1402   2      
+1403   2          if (sScanKey[i].key_l > 100) // 长按键处理,1000mS检测一次
+1404   2          {
+1405   3      
+1406   3            if (sScanKey[i].key_h != 0x000000ff)
+1407   3            {
+1408   4              if (++KeyCodeHead >= KEYBUFLENGTH)
+1409   4                KeyCodeHead = 0;
+1410   4              sScanKey[i].key_h += 100;
+1411   4              KeyCodeBuf[KeyCodeHead].bKey = sScanKey[i].KeyInpush | LONG_KEY_MASK;
+1412   4              KeyCodeBuf[KeyCodeHead].wKeyTime = sScanKey[i].key_h;
+1413   4              sScanKey[i].key_l = 1; // 清除键值标志
+1414   4            }
+1415   3            else
+1416   3            {
+1417   4              sScanKey[i].key_l = 1; // 清除键值标志
+1418   4            }
+1419   3          }
+1420   2        }
+1421   1      }
 *** WARNING C280 IN LINE 1303 OF gpio_ctrl.c: 'row': unreferenced local variable
 *** WARNING C280 IN LINE 1305 OF gpio_ctrl.c: 'ReadValue': unreferenced local variable
-1390          
-1391          /*******************************************************************************
-1392          Function:     GetKey()
-1393          Description:  按键键值处理函数
-1394          Calls:
-1395          Called By:
-1396          Input:      no
-1397          Output:     长按时间,单位:ms
-1398          Return:     no
-1399          Others:     no
-1400          ********************************************************************************/
-1401          byte GetKey(word *wTime)
-1402          {
-1403   1        if (KeyCodeTail != KeyCodeHead)
-1404   1        {
-1405   2          if (++KeyCodeTail >= KEYBUFLENGTH)
-1406   2            KeyCodeTail = 0;
-1407   2      
-1408   2          if (wTime != NULL)
-1409   2          {
-1410   3            *wTime = KeyCodeBuf[KeyCodeTail].wKeyTime * 10; // 长按键时间,时间为wTime*10mS
-1411   3            KeyCodeBuf[KeyCodeTail].wKeyTime = 0;
-1412   3          }
-1413   2      
-1414   2          return (KeyCodeBuf[KeyCodeTail].bKey);
-1415   2        }
-1416   1        else
-1417   1        {
-1418   2          return (NO_KEY_MSG);
-1419   2        }
-1420   1      }
+1422          
+1423          /*******************************************************************************
+1424          Function:     GetKey()
+1425          Description:  按键键值处理函数
+1426          Calls:
+1427          Called By:
+1428          Input:      no
+1429          Output:     长按时间,单位:ms
+1430          Return:     no
+1431          Others:     no
+1432          ********************************************************************************/
+1433          byte GetKey(word *wTime)
+1434          {
+1435   1        if (KeyCodeTail != KeyCodeHead)
+1436   1        {
+1437   2          if (++KeyCodeTail >= KEYBUFLENGTH)
+1438   2            KeyCodeTail = 0;
+1439   2      
+1440   2          if (wTime != NULL)
+1441   2          {
+1442   3            *wTime = KeyCodeBuf[KeyCodeTail].wKeyTime * 10; // 长按键时间,时间为wTime*10mS
+C51 COMPILER V9.53.0.0   GPIO_CTRL                                                         11/12/2024 17:02:19 PAGE 25  
+
+1443   3            KeyCodeBuf[KeyCodeTail].wKeyTime = 0;
+1444   3          }
+1445   2      
+1446   2          return (KeyCodeBuf[KeyCodeTail].bKey);
+1447   2        }
+1448   1        else
+1449   1        {
+1450   2          return (NO_KEY_MSG);
+1451   2        }
+1452   1      }
 
 
 MODULE INFORMATION:   STATIC OVERLAYABLE

+ 6 - 6
Projects/macro/switch_ota_app_V1.1.06/Listings/iap.lst

@@ -1,4 +1,4 @@
-C51 COMPILER V9.53.0.0   IAP                                                               11/12/2024 10:08:03 PAGE 1   
+C51 COMPILER V9.53.0.0   IAP                                                               11/12/2024 17:02:20 PAGE 1   
 
 
 C51 COMPILER V9.53.0.0, COMPILATION OF MODULE IAP
@@ -62,7 +62,7 @@ line level    source
   52   1        {
   53   2          iap_flag = 1;        //iap_flag标志置位
   54   2        }
-C51 COMPILER V9.53.0.0   IAP                                                               11/12/2024 10:08:03 PAGE 2   
+C51 COMPILER V9.53.0.0   IAP                                                               11/12/2024 17:02:20 PAGE 2   
 
   55   1        
   56   1        AUX2 = AUX2&0xF9;      //关闭IAP看门狗
@@ -126,7 +126,7 @@ line level    source
  114   1        {
  115   2          *p_info_addr = buf[i];//触发写
  116   2          p_info_addr++;
-C51 COMPILER V9.53.0.0   IAP                                                               11/12/2024 10:08:03 PAGE 3   
+C51 COMPILER V9.53.0.0   IAP                                                               11/12/2024 17:02:20 PAGE 3   
 
  117   2        }
  118   1        
@@ -190,7 +190,7 @@ line level    source
  176          void user_read_INFO_byte(unsigned int addr, unsigned char *buf, unsigned int len)
  177          {
  178   1        read_INFO_byte(addr, buf,len);  
-C51 COMPILER V9.53.0.0   IAP                                                               11/12/2024 10:08:03 PAGE 4   
+C51 COMPILER V9.53.0.0   IAP                                                               11/12/2024 17:02:20 PAGE 4   
 
  179   1      }
  180          
@@ -254,7 +254,7 @@ line level    source
  238   1        p_read_app_addr =(unsigned char*)addr;
  239   1        
  240   1        for(i = 0; i<len; i++)
-C51 COMPILER V9.53.0.0   IAP                                                               11/12/2024 10:08:03 PAGE 5   
+C51 COMPILER V9.53.0.0   IAP                                                               11/12/2024 17:02:20 PAGE 5   
 
  241   1        {
  242   2          buf[i] = *p_read_app_addr;
@@ -318,7 +318,7 @@ line level    source
  300          ** 函数名称: user_write_APP_byte
  301          ** 函数描述: 存储APP数据的函数,供用户使用
  302          ** 输入参数: 地址 数组的首地址、长度 
-C51 COMPILER V9.53.0.0   IAP                                                               11/12/2024 10:08:03 PAGE 6   
+C51 COMPILER V9.53.0.0   IAP                                                               11/12/2024 17:02:20 PAGE 6   
 
  303          ** 输出参数: 状态:0 正常, 1 异常
  304          *******************************************************************************************/

+ 24 - 24
Projects/macro/switch_ota_app_V1.1.06/Listings/main.lst

@@ -1,4 +1,4 @@
-C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 10:08:01 PAGE 1   
+C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 17:02:18 PAGE 1   
 
 
 C51 COMPILER V9.53.0.0, COMPILATION OF MODULE MAIN
@@ -62,7 +62,7 @@ line level    source
   48   1        {
   49   1          if (switchState.KeyPress == 0)
   50   1          {                  // 原来没按下
-C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 10:08:01 PAGE 2   
+C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 17:02:18 PAGE 2   
 
   51   1            switchState.KeyPress = 1;    // 更新按键状态为按下
   52   1            switchState.buttonPressTime = 0; // 按下计数器清理
@@ -126,7 +126,7 @@ line level    source
  108   4              break;
  109   4            case KEY2:          // 长按2号键
  110   4              if (wKeyTime >= 5000) // 5S
-C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 10:08:01 PAGE 3   
+C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 17:02:18 PAGE 3   
 
  111   4              {
  112   5                if (ZG_Joining == CONDITION_JOINGING_TO_NORMAL) // 设备入网状态,长按后触发
@@ -190,7 +190,7 @@ line level    source
  170   3            switch (bKey & SHORT_KEY_MASK) // 短按键处理
  171   3            {
  172   4            case KEY1:
-C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 10:08:01 PAGE 4   
+C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 17:02:18 PAGE 4   
 
  173   4              if (ZG_Joining == CONDITION_NORMAL_TO_BEFOR_JOINING) //&& (switchState.KeyPress == 0)) // 长按触发了配
              -网,需在10秒操作
@@ -254,7 +254,7 @@ line level    source
  231   8                      iap_eeprom_write(0, write_mileage, 30); // 写入1字节
  232   8                    }
  233   7                  }
-C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 10:08:01 PAGE 5   
+C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 17:02:18 PAGE 5   
 
  234   6                  else if ((gLedState & 0x01) == 0x01) // 原状态灯亮
  235   6                  {
@@ -318,7 +318,7 @@ line level    source
  292   7      
  293   7                    if (switchState.plus_mod[1] == 0x01) // 点动开启
  294   7                    {
-C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 10:08:01 PAGE 6   
+C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 17:02:18 PAGE 6   
 
  295   8                      switchState.plus_en[1] = 0x01;
  296   8                      switchState.plus_counter[1] = switchState.plus_auto_time[1];
@@ -382,7 +382,7 @@ line level    source
                           else if ((gLedState & 0x02) == 0x02) //  原状态灯亮
                           {
                             gLedState = gLedState & (~0x02); // 按键2清除
-C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 10:08:01 PAGE 7   
+C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 17:02:18 PAGE 7   
 
                             gRelayOnOff &= (~0x02);      // 继电器关闭
                           }                     
@@ -446,7 +446,7 @@ line level    source
  414   7                      // iap_eeprom_write(16, write_mileage, 1); // 写入1字节
  415   7                      iap_eeprom_read(0, write_mileage, 30); // 读取30字节
  416   7                      write_mileage[16] = switchState.plus_en[2];
-C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 10:08:01 PAGE 8   
+C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 17:02:18 PAGE 8   
 
  417   7                      iap_eeprom_write(0, write_mileage, 30); // 写入1字节
  418   7                    }
@@ -510,7 +510,7 @@ line level    source
  475   6                    gLedState = gLedState | 0x02; // // 按键2开启
  476   6                    gRelayOnOff |= 0x02;      // 继电器动作开启
  477   6      
-C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 10:08:01 PAGE 9   
+C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 17:02:18 PAGE 9   
 
  478   6                    if (switchState.plus_mod[1] == 0x01) // 点动开启
  479   6                    {
@@ -574,7 +574,7 @@ line level    source
                         switchState.step[5] = 0x02; // 按键触发背光灯状态
                         mcu_dp_enum_update(DPID_SCENE_6, 0);
               #endif
-C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 10:08:01 PAGE 10  
+C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 17:02:18 PAGE 10  
 
  539   5      #if ((defined ZIGBEE_ZTU_T3_SW) && (defined ZIGBEE_3SWITCH_SW))|| (defined ZIGBEE_ZTU_T2_SW)
  540   5                
@@ -638,7 +638,7 @@ line level    source
  598          
  599          
  600          
-C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 10:08:01 PAGE 11  
+C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 17:02:18 PAGE 11  
 
  601          /*******************************************************************************
  602          Function:     Keyinit()
@@ -702,7 +702,7 @@ line level    source
  660          Others:     no
  661          ********************************************************************************/
  662          void taskInit(void)
-C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 10:08:01 PAGE 12  
+C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 17:02:18 PAGE 12  
 
  663          {
  664   1        u08 i = 0;
@@ -766,7 +766,7 @@ line level    source
  719   1        if (read_mileage_backup[1] != 0xff)
  720   1          switchState.relay_allstatus = read_mileage_backup[1]; // 开关上电状态设置,全局
  721   1        if (read_mileage_backup[2] != 0xff)
-C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 10:08:01 PAGE 13  
+C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 17:02:18 PAGE 13  
 
  722   1          switchState.relay_status[0] = read_mileage_backup[2]; // 开关上电状态设置,1-3键
  723   1        if (read_mileage_backup[3] != 0xff)
@@ -830,7 +830,7 @@ line level    source
  778   1        /***************关机前实时状态数据******************************/
  779   1      
  780   1        if (read_mileage[10] != 0xff)
-C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 10:08:01 PAGE 14  
+C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 17:02:18 PAGE 14  
 
  781   1          switchState.relay_new_status[0] = read_mileage[10]; // 关机前最新继电器状态,1-3键
  782   1        if (read_mileage[11] != 0xff)
@@ -894,7 +894,7 @@ line level    source
  839   3              gLedState = gLedState & (~0x04); // 按键1清除
  840   3              gRelayOnOff &= (~0x04);      // 继电器关闭
  841   3              gRelayState |= 0x04;
-C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 10:08:01 PAGE 15  
+C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 17:02:18 PAGE 15  
 
  842   3            }
  843   2            else if (switchState.relay_status[0] == 0x01) // 通电
@@ -958,7 +958,7 @@ line level    source
  901   1      //    }
  902   1      //    else
  903   1      //    {
-C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 10:08:01 PAGE 16  
+C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 17:02:18 PAGE 16  
 
  904   1      //      switchState.plus_en[1] = 0x00;
  905   1      //      switchState.plus_counter[1] = 0;
@@ -1022,7 +1022,7 @@ line level    source
                     }
                     else if (switchState.relay_status[0] == 0x01) // 通电
                     {
-C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 10:08:01 PAGE 17  
+C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 17:02:18 PAGE 17  
 
                       gLedState = gLedState | 0x02; // // 按键2开启
                       gRelayOnOff |= 0x02;      // 继电器动作开启
@@ -1086,7 +1086,7 @@ line level    source
                     {
               
                       if (switchState.relay_new_status[2] == 0x01)
-C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 10:08:01 PAGE 18  
+C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 17:02:18 PAGE 18  
 
                       {
                         gLedState = gLedState | 0x01; // // 按键3开启
@@ -1150,7 +1150,7 @@ line level    source
 1084   1      
 1085   1      #ifdef REALSE // 生产模式,开启看门狗
                 WDGT_Init();
-C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 10:08:01 PAGE 19  
+C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 17:02:18 PAGE 19  
 
               #endif
 1088   1      }
@@ -1214,7 +1214,7 @@ line level    source
 1144   5              }
 1145   4            }
 1146   3            else if (ZG_Joining == CONDITION_BEFOR_JOINING_TO_JOINING) // 已进入配网状态
-C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 10:08:01 PAGE 20  
+C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 17:02:18 PAGE 20  
 
 1147   3            {
 1148   4              if (++ZG_JoinCounter <= 18000) // 配网快速闪烁180秒
@@ -1278,7 +1278,7 @@ line level    source
 1205   6                    switchState.gRadarCheckNull = 1; // 清空有人标志
 1206   6                                     // write_mileage[0] = switchState.gRadarCheckNull;
 1207   6                    // iap_eeprom_write(13, write_mileage, 1); // 写入1字节
-C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 10:08:01 PAGE 21  
+C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 17:02:18 PAGE 21  
 
 1208   6                    iap_eeprom_read(0, write_mileage, 30); // 读取30字节
 1209   6                    write_mileage[13] = switchState.gRadarCheckNull;
@@ -1342,7 +1342,7 @@ line level    source
 1267   5                {
 1268   6                  gLedState = gLedState & (~0x04); // // 按键3清除
 1269   6                  gRelayOnOff &= (~0x04);      // 继电器关闭
-C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 10:08:01 PAGE 22  
+C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 17:02:18 PAGE 22  
 
 1270   6                                   // write_mileage[0] = 0;
 1271   6                  // iap_eeprom_write(16, write_mileage, 1); // 写入1字节
@@ -1406,7 +1406,7 @@ line level    source
 1327   1            }
 1328   1            //继电器3
 1329   1            if (gRelayOnOff & 0x04) // 继电器3开启
-C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 10:08:01 PAGE 23  
+C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 17:02:18 PAGE 23  
 
 1330   1            {
 1331   1              relay3_control(1);
@@ -1470,7 +1470,7 @@ line level    source
 1389          Input:      no
 1390          Output:     no
 1391          Return:     no
-C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 10:08:01 PAGE 24  
+C51 COMPILER V9.53.0.0   MAIN                                                              11/12/2024 17:02:18 PAGE 24  
 
 1392          Others:     no
 1393          ********************************************************************************/

+ 11 - 11
Projects/macro/switch_ota_app_V1.1.06/Listings/mcu_api.lst

@@ -1,4 +1,4 @@
-C51 COMPILER V9.53.0.0   MCU_API                                                           11/12/2024 10:08:01 PAGE 1   
+C51 COMPILER V9.53.0.0   MCU_API                                                           11/12/2024 17:02:19 PAGE 1   
 
 
 C51 COMPILER V9.53.0.0, COMPILATION OF MODULE MCU_API
@@ -62,7 +62,7 @@ line level    source
   52          /**
   53          * @brief get string len 
   54          * @param[in] {str} higher bits data 
-C51 COMPILER V9.53.0.0   MCU_API                                                           11/12/2024 10:08:01 PAGE 2   
+C51 COMPILER V9.53.0.0   MCU_API                                                           11/12/2024 17:02:19 PAGE 2   
 
   55          * @return string len 
   56          */
@@ -126,7 +126,7 @@ line level    source
  114   2          for(i = count; i > 0; i --){  
  115   3            pdest[i - 1] = psrc[i - 1];  
  116   3          }  
-C51 COMPILER V9.53.0.0   MCU_API                                                           11/12/2024 10:08:01 PAGE 3   
+C51 COMPILER V9.53.0.0   MCU_API                                                           11/12/2024 17:02:19 PAGE 3   
 
  117   2        }  
  118   1        
@@ -190,7 +190,7 @@ line level    source
  176   1        nubmer = (unsigned long)value[0];
  177   1        nubmer <<= 8;
  178   1        nubmer |= (unsigned long)value[1];
-C51 COMPILER V9.53.0.0   MCU_API                                                           11/12/2024 10:08:01 PAGE 4   
+C51 COMPILER V9.53.0.0   MCU_API                                                           11/12/2024 17:02:19 PAGE 4   
 
  179   1        nubmer <<= 8;
  180   1        nubmer |= (unsigned long)value[2];
@@ -254,7 +254,7 @@ line level    source
  238   1      }
  239          
  240          
-C51 COMPILER V9.53.0.0   MCU_API                                                           11/12/2024 10:08:01 PAGE 5   
+C51 COMPILER V9.53.0.0   MCU_API                                                           11/12/2024 17:02:19 PAGE 5   
 
  241          /**
  242          * @brief report bitmap type DP data to zigbee module 
@@ -318,7 +318,7 @@ line level    source
  300   2          length = set_zigbee_uart_byte(length,value >> 8);
  301   2          length = set_zigbee_uart_byte(length,value & 0xff);
  302   2        }
-C51 COMPILER V9.53.0.0   MCU_API                                                           11/12/2024 10:08:01 PAGE 6   
+C51 COMPILER V9.53.0.0   MCU_API                                                           11/12/2024 17:02:19 PAGE 6   
 
  303   1        else{
  304   2          length = set_zigbee_uart_byte(length,4);
@@ -382,7 +382,7 @@ line level    source
  362   1      }
  363          
  364          /**
-C51 COMPILER V9.53.0.0   MCU_API                                                           11/12/2024 10:08:01 PAGE 7   
+C51 COMPILER V9.53.0.0   MCU_API                                                           11/12/2024 17:02:19 PAGE 7   
 
  365          * @brief report raw type DP data to zigbee module 
  366          * @param[in]  {dpid}  dp id
@@ -446,7 +446,7 @@ line level    source
 *** WARNING C280 IN LINE 418 OF mcu_api.c: 'len': unreferenced local variable
  422          
  423          
-C51 COMPILER V9.53.0.0   MCU_API                                                           11/12/2024 10:08:01 PAGE 8   
+C51 COMPILER V9.53.0.0   MCU_API                                                           11/12/2024 17:02:19 PAGE 8   
 
  424          /**
  425          * @brief mcu start zigbee module test 
@@ -510,7 +510,7 @@ line level    source
  483          
  484          
  485          /**
-C51 COMPILER V9.53.0.0   MCU_API                                                           11/12/2024 10:08:01 PAGE 9   
+C51 COMPILER V9.53.0.0   MCU_API                                                           11/12/2024 17:02:19 PAGE 9   
 
  486          * @brief init paramter and set rx_buf with zero
  487          * @param[in]  {void}
@@ -574,7 +574,7 @@ line level    source
  545   1          while((rx_in < sizeof(zigbee_uart_rx_buf)) && (with_data_rxbuff() > 0)){
  546   2              zigbee_uart_rx_buf[rx_in++] = Queue_Read_Byte();
  547   2          }
-C51 COMPILER V9.53.0.0   MCU_API                                                           11/12/2024 10:08:01 PAGE 10  
+C51 COMPILER V9.53.0.0   MCU_API                                                           11/12/2024 17:02:19 PAGE 10  
 
  548   1      
  549   1          if(rx_in < PROTOCOL_HEAD){
@@ -638,7 +638,7 @@ MODULE INFORMATION:   STATIC OVERLAYABLE
    CODE SIZE        =   3430    ----
    CONSTANT SIZE    =   ----    ----
    XDATA SIZE       =      2     106
-C51 COMPILER V9.53.0.0   MCU_API                                                           11/12/2024 10:08:01 PAGE 11  
+C51 COMPILER V9.53.0.0   MCU_API                                                           11/12/2024 17:02:19 PAGE 11  
 
    PDATA SIZE       =   ----    ----
    DATA SIZE        =   ----    ----

+ 44 - 44
Projects/macro/switch_ota_app_V1.1.06/Listings/protocol.lst

@@ -1,4 +1,4 @@
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 1   
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 1   
 
 
 C51 COMPILER V9.53.0.0, COMPILATION OF MODULE PROTOCOL
@@ -62,7 +62,7 @@ line level    source
   44          7:上电之�,mcu何时上报数�给网关�适,在收到网络状�为已�网,或者接收
              -到读�dp数�的时候。
   45          8: 在mcu ota过程中��固件内容请求未收到zigbee模�的应答时,需�mcu端�好超时
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 2   
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 2   
 
              -�新请求的处�,和存储image
   46          处�,校验和�以自行设计或者使用�考。
@@ -126,7 +126,7 @@ line level    source
                 {DPID_SWITCH_1, DP_TYPE_BOOL},
                 {DPID_RELAY_STATUS, DP_TYPE_ENUM},
                 {DPID_SWITCH_INCHING, DP_TYPE_STRING},
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 3   
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 3   
 
                 {DPID_ADD_ELE, DP_TYPE_VALUE},
                 {DPID_CUR_CURRENT, DP_TYPE_VALUE},
@@ -190,7 +190,7 @@ line level    source
  165          {
  166   1          // static unsigned char buf;
  167   1          // buf = value;
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 4   
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 4   
 
  168   1          // #error "please use your own uart send fuction complete this fuction, exmaple"
  169   1          /*
@@ -254,7 +254,7 @@ line level    source
                       hex_data[i * 3] = 0xff;
                       hex_data[i * 3 + 1] = 0xff;
                       hex_data[i * 3 + 2] = 0xff;
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 5   
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 5   
 
                   }
                   hex_data[0 * 3] = switchState.plus_mod[1];
@@ -318,7 +318,7 @@ line level    source
  280          //#ifdef ZIGBEE_ZTU_T3_SW
  281          void all_data_update(void)
  282          {
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 6   
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 6   
 
  283   1          // #error "mcu must realize function internal function"
  284   1          /*
@@ -382,7 +382,7 @@ line level    source
                   if (switchState.mod[0] == 0)
                       mcu_dp_bool_update(DPID_SWITCH_1, switchState.SWITCH[2]); // BOOL型数�上报;
               
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 7   
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 7   
 
                   // 场景�需�主动上报,APP�需�查询状�
                   /*
@@ -446,7 +446,7 @@ line level    source
              -e.dp_cur_voltage<2500))
                   {
                     data_dp_cur_voltage = switchState.dp_cur_voltage;
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 8   
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 8   
 
                     mcu_dp_value_update(DPID_CUR_VOLTAGE,switchState.dp_cur_voltage); //VALUE型数�上报;
                   }
@@ -510,7 +510,7 @@ line level    source
  451   1      //    if((switchState.dp_add_ele[0] !=0)&&((switchState.dp_add_ele[0]  - data_dp_add_ele[0])>=1))
  452   1      //    {
  453   1            mcu_dp_value_update(DPID_ADD_ELE,switchState.dp_add_ele[0]); //VALUE型数�上报;
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 9   
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 9   
 
  454   1            if(data_dp_add_ele[0] != switchState.dp_add_ele[0])
  455   1            {
@@ -574,7 +574,7 @@ line level    source
  507   1      //    {
  508   1      //      data_dp_cur_current[2] = switchState.dp_cur_current[2];
  509   1            mcu_dp_value_update(DPID_CUR_CURRENT_3,switchState.dp_cur_current[2]); //VALUE型数�上报;
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 10  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 10  
 
  510   1      //    }
  511   1      //    if((switchState.dp_cur_power[2] != 0)&&(switchState.dp_cur_power[2] != data_dp_cur_power[2])&&(switc
@@ -638,7 +638,7 @@ line level    source
               *****************************************************************************/
               static unsigned char dp_download_scene_2_handle(const unsigned char value[], unsigned short length)
               {
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 11  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 11  
 
                   // 示例:当�DP类型为ENUM
                   unsigned char ret;
@@ -702,7 +702,7 @@ line level    source
               返回�数 : �功返回:SUCCESS/失败返回:ERROR
               使用说明 : �下��上报类型,需�在处�完数��上报处�结果至app
               *****************************************************************************/
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 12  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 12  
 
               static unsigned char dp_download_scene_4_handle(const unsigned char value[], unsigned short length)
               {
@@ -766,7 +766,7 @@ line level    source
               输入�数 : value:数��数�
                       : length:数�长度
               返回�数 : �功返回:SUCCESS/失败返回:ERROR
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 13  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 13  
 
               使用说明 : �下��上报类型,需�在处�完数��上报处�结果至app
               *****************************************************************************/
@@ -830,7 +830,7 @@ line level    source
               
                   // add by zzw 20240312  增加eeprom�数�置区
                   iap_eeprom_read_backup(0, write_mileage_backup, 30); // 读�30字节
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 14  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 14  
 
                   write_mileage_backup[6] = switchState.mod[0];
                   iap_eeprom_write_backup(0, write_mileage_backup, 30); // 写入1字节
@@ -894,7 +894,7 @@ line level    source
                   {
                       read_mileage_backup[7] = switchState.mod[1];
                       iap_eeprom_write_backup(0, read_mileage_backup, 30); // 写入1字节
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 15  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 15  
 
                   }
                   // add by zzw 20240312  增加eeprom�数�置区
@@ -958,7 +958,7 @@ line level    source
                   ret = mcu_dp_enum_update(DPID_MODE_3, mode_3);
                   if (ret == SUCCESS)
                       return SUCCESS;
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 16  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 16  
 
                   else
                       return ERROR;
@@ -1022,7 +1022,7 @@ line level    source
  939          功能�述 : 针对DPID_SWITCH_2的处�函数
  940          输入�数 : value:数��数�
  941                  : length:数�长度
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 17  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 17  
 
  942          返回�数 : �功返回:SUCCESS/失败返回:ERROR
  943          使用说明 : �下��上报类型,需�在处�完数��上报处�结果至app
@@ -1086,7 +1086,7 @@ line level    source
 1001   1          // 0:off/1:on
 1002   1          unsigned char switch_3;
 1003   1      
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 18  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 18  
 
 1004   1          switch_3 = mcu_get_dp_download_bool(value, length);
 1005   1          if (switch_3 == 0)
@@ -1150,7 +1150,7 @@ line level    source
 1063   2      
 1064   2          case 2:
 1065   2              break;
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 19  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 19  
 
 1066   2      
 1067   2          default:
@@ -1214,7 +1214,7 @@ line level    source
 1125   1          light_mode = mcu_get_dp_download_enum(value, length);
 1126   1          switch (light_mode) // 枚举范围:Level1,Level2,Level3
 1127   1          {
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 20  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 20  
 
 1128   2          case 0:
 1129   2              switchState.led_level = 0;
@@ -1278,7 +1278,7 @@ line level    source
 1186   1          {
 1187   2              // bool off
 1188   2              // switchState.bluelight = 0;
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 21  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 21  
 
 1189   2              switchState.human = 0;
 1190   2          }
@@ -1342,7 +1342,7 @@ line level    source
 1247   1          // STRING type data processing
 1248   1          unsigned char string_H16_data[32];    // 16进制字符串
 1249   1          unsigned char string_base64_data[32]; // base64标�字符串
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 22  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 22  
 
 1250   1          unsigned char hex_data[32];           // 转��的16进制字节数�
 1251   1      
@@ -1406,7 +1406,7 @@ line level    source
                       else if (hex_data[0] == 0x00) // 开关1关闭
                       {
                           switchState.plus_mod[0] = 0;
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 23  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 23  
 
                           switchState.plus_auto_time[0] = (hex_data[1] * 256 + hex_data[2]) * 10; // 高字节在�,秒
              -转100ms为基数
@@ -1470,7 +1470,7 @@ line level    source
 1362   2              else
 1363   2              {
 1364   3                  switchState.plus_mod[0] = 0xff; // 清除
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 24  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 24  
 
 1365   3                  write_mileage_backup[20] = switchState.plus_mod[0];
 1366   3                  write_mileage_backup[21] = 0xff;
@@ -1534,7 +1534,7 @@ line level    source
 1420   1          {
 1421   2              // char source[32] = "abc";
 1422   2              // char dest[32];
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 25  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 25  
 
 1423   2      
 1424   2              /*将字符串abc进行base64编�*/
@@ -1598,7 +1598,7 @@ line level    source
 1481   5                          switchState.plus_auto_time[1] = (hex_data[1] * 256 + hex_data[2]) * 10; // 高字节åœ
              -¨å‰�,秒转100ms为基数
 1482   5                          write_mileage_backup[23] = switchState.plus_mod[1];
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 26  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 26  
 
 1483   5                          write_mileage_backup[24] = hex_data[1];
 1484   5                          write_mileage_backup[25] = hex_data[2];
@@ -1662,7 +1662,7 @@ line level    source
 1540          {
 1541   1          // 示例:当�DP类型为ENUM
 1542   1          unsigned char ret;
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 27  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 27  
 
 1543   1          unsigned char relay_status_1;
 1544   1      
@@ -1726,7 +1726,7 @@ line level    source
 1602          使用说明 : �下��上报类型,需�在处�完数��上报处�结果至app
 1603          *****************************************************************************/
 1604          static unsigned char dp_download_relay_status_2_handle(const unsigned char value[], unsigned short length)
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 28  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 28  
 
 1605          {
 1606   1          // 示例:当�DP类型为ENUM
@@ -1790,7 +1790,7 @@ line level    source
 1664   1          // 示例:当�DP类型为ENUM
 1665   1          unsigned char ret;
 1666   1          unsigned char relay_status_3;
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 29  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 29  
 
 1667   1      
 1668   1          relay_status_3 = mcu_get_dp_download_enum(value, length);
@@ -1854,7 +1854,7 @@ line level    source
 1726   1          
 1727   1          add_ele = mcu_get_dp_download_value(value,length);
 1728   1          /*
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 30  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 30  
 
 1729   1          //VALUE type data processing
 1730   1          
@@ -1918,7 +1918,7 @@ line level    source
 1787   3              }
 1788   2              else
 1789   2              {
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 31  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 31  
 
 1790   3                  // test failure
 1791   3              }
@@ -1982,7 +1982,7 @@ line level    source
                       break;
                   case DPID_RELAY_STATUS_1:
                       // 开关1上电状�设置处�函数
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 32  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 32  
 
                       ret = dp_download_relay_status_1_handle(value, length);
                       break;
@@ -2046,7 +2046,7 @@ line level    source
                       ret = dp_download_relay_status_1_handle(value, length);
                       break;
                   case DPID_RELAY_STATUS_2:
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 33  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 33  
 
                       // 开关2上电状�设置处�函数
                       ret = dp_download_relay_status_2_handle(value, length);
@@ -2110,7 +2110,7 @@ line level    source
 1973   2              // 开关1上电状�设置处�函数
 1974   2              ret = dp_download_relay_status_1_handle(value, length);
 1975   2              break;
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 34  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 34  
 
 1976   2          case DPID_RELAY_STATUS_2:
 1977   2              // 开关2上电状�设置处�函数
@@ -2174,7 +2174,7 @@ line level    source
                       break;
                       case DPID_MODE_3:
                           //模�3处�函数
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 35  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 35  
 
                           ret = dp_download_mode_3_handle(value,length);
                       break;
@@ -2238,7 +2238,7 @@ line level    source
 2097          /**
 2098           * @brief received zigbee net_work state handle
 2099           * @param[in] {zigbee_work_state}  zigbee current network state
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 36  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 36  
 
 2100           * @return  void
 2101           */
@@ -2302,7 +2302,7 @@ line level    source
 2155   2          default:
 2156   2              break;
 2157   2          }
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 37  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 37  
 
 2158   1      }
 2159          
@@ -2366,7 +2366,7 @@ line level    source
 2216   1          // add by zzw �级通知接收�功,第一次调用接收固件命令
 2217   1          if (update)
 2218   1          {
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 38  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 38  
 
 2219   2              // zzw  ota must  add  20240326 OTA  存入标志�
 2220   2      
@@ -2430,7 +2430,7 @@ line level    source
 2277   1          static unsigned int current_checksum = 0;
 2278   1      
 2279   1          if (zigbee_uart_rx_buf[offset + DATA_START] == 0x01) // status check
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 39  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 39  
 
 2280   1              return;
 2281   1          while (i < 8)
@@ -2494,7 +2494,7 @@ line level    source
 2337   4                      // ota failure report ota failure and clear ota struct
 2338   4                      mcu_ota_result_report(1); // failed
 2339   4                  }
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 40  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 40  
 
 2340   3                  else
 2341   3                  {
@@ -2558,7 +2558,7 @@ line level    source
 2397   2          }
 2398   1      }
 *** WARNING C280 IN LINE 2372 OF protocol.c: 'k': unreferenced local variable
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 41  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 41  
 
 *** WARNING C280 IN LINE 2372 OF protocol.c: 'Ret': unreferenced local variable
 *** WARNING C280 IN LINE 2373 OF protocol.c: 'temp_buff': unreferenced local variable
@@ -2622,7 +2622,7 @@ line level    source
 2455   3                      write_data = (write_data << 8) + data[i * 4 + 1];
 2456   3                      write_data = (write_data << 8) + data[i * 4];
 2457   3                      flash_word_write(app_newcode_add, write_data);
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 42  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 42  
 
 2458   3                      app_newcode_add = app_newcode_add + 4;
 2459   3                  }*/
@@ -2686,7 +2686,7 @@ line level    source
 2515   1          unsigned short i;
 2516   1          length = set_zigbee_uart_byte(length, 0x01);
 2517   1          zigbee_uart_write_frame(ZIGBEE_FACTORY_NEW_CMD, length);
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 43  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 43  
 
 2518   1          // then start test
 2519   1          // add by zzw 20240207  APP删除设备�自动入网开�
@@ -2750,7 +2750,7 @@ line level    source
 2575   2              {
 2576   3                  buf[0] = c0 - 10 + 'a';
 2577   3              }
-C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 10:08:02 PAGE 44  
+C51 COMPILER V9.53.0.0   PROTOCOL                                                          11/12/2024 17:02:19 PAGE 44  
 
 2578   2              c1 = *src++ & 0x0F;
 2579   2              if (c1 >= 0x0 && c1 <= 0x9)

+ 1 - 1
Projects/macro/switch_ota_app_V1.1.06/Listings/sTimeout.lst

@@ -1,4 +1,4 @@
-C51 COMPILER V9.53.0.0   STIMEOUT                                                          11/12/2024 10:08:02 PAGE 1   
+C51 COMPILER V9.53.0.0   STIMEOUT                                                          11/12/2024 17:02:19 PAGE 1   
 
 
 C51 COMPILER V9.53.0.0, COMPILATION OF MODULE STIMEOUT

+ 13 - 13
Projects/macro/switch_ota_app_V1.1.06/Listings/system.lst

@@ -1,4 +1,4 @@
-C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 10:08:02 PAGE 1   
+C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 17:02:19 PAGE 1   
 
 
 C51 COMPILER V9.53.0.0, COMPILATION OF MODULE SYSTEM
@@ -62,7 +62,7 @@ line level    source
                 nwk_paremeter.fast_poll_period = 0xfffe;
                 nwk_paremeter.heart_period = 0xfffe;
                 nwk_paremeter.join_nwk_time = 0xfffe;
-C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 10:08:02 PAGE 2   
+C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 17:02:19 PAGE 2   
 
                 nwk_paremeter.rejion_period = 0xfffe;
                 nwk_paremeter.poll_period = 0xfffe;
@@ -126,7 +126,7 @@ line level    source
  112          * @param[in] {in} the head address of send data
  113          * @param[in] {len}  the length of send data
  114          * @return  void
-C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 10:08:02 PAGE 3   
+C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 17:02:19 PAGE 3   
 
  115          */
  116          void zigbee_uart_write_data(unsigned char *in, unsigned short len)
@@ -190,7 +190,7 @@ line level    source
  174   1        zigbee_uart_tx_buf[len -1] = check_sum;
  175   1        
  176   1        zigbee_uart_write_data((unsigned char *)zigbee_uart_tx_buf, len);
-C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 10:08:02 PAGE 4   
+C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 17:02:19 PAGE 4   
 
  177   1      }
  178          
@@ -254,7 +254,7 @@ line level    source
  235   2        }
  236   1        else{
  237   2          ret = dp_download_handle(dp_id,value + 4,dp_len);
-C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 10:08:02 PAGE 5   
+C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 17:02:19 PAGE 5   
 
  238   2        }
  239   1        
@@ -318,7 +318,7 @@ line level    source
  296   4              else{
  297   5                  
  298   5              }      
-C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 10:08:02 PAGE 6   
+C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 17:02:19 PAGE 6   
 
  299   4              i += (dp_len + 4);  
  300   4            } 
@@ -382,7 +382,7 @@ line level    source
  358   3          }
  359   2          break;
  360   2          
-C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 10:08:02 PAGE 7   
+C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 17:02:19 PAGE 7   
 
  361   2      #ifdef  BEACON_TEST
                   case SEND_BEACON_NOTIFY_CMD:{
@@ -446,7 +446,7 @@ line level    source
               */
               static void response_mcu_type(void)
               {
-C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 10:08:02 PAGE 8   
+C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 17:02:19 PAGE 8   
 
                 unsigned short length = 0;
                 length = set_zigbee_uart_byte(length,mcu_type);
@@ -510,7 +510,7 @@ line level    source
                     if(Is_Leap_Year(tmp1)){
                       if(tmp>=366)    
                         tmp-=366;
-C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 10:08:02 PAGE 9   
+C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 17:02:19 PAGE 9   
 
                       else{
                         break;
@@ -574,7 +574,7 @@ line level    source
                  unsigned short length = 0;
                    length = set_zigbee_uart_buffer(length,(unsigned char *)buf, buf_len);
                    zigbee_uart_write_frame(SEND_BROADCAST_DATA_CMD,length);
-C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 10:08:02 PAGE 10  
+C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 17:02:19 PAGE 10  
 
               }
               #endif
@@ -638,7 +638,7 @@ line level    source
  606   1          current_mcu_fw_ver |= (assic_to_hex(fw_ver[2]) & 0x03) << 4;  //mid ver
  607   1          current_mcu_fw_ver |= ((assic_to_hex(fw_ver[4])*10 + assic_to_hex(fw_ver[5])) & 0x0F);  //low ver
  608   1        }
-C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 10:08:02 PAGE 11  
+C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 17:02:19 PAGE 11  
 
  609   1        return current_mcu_fw_ver;*/
  610   1        //modified by zzw ÓÅ»¯°æ±¾²éѯº¯Êý
@@ -702,7 +702,7 @@ line level    source
  668   1      }
  669          
  670          /**
-C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 10:08:02 PAGE 12  
+C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 17:02:19 PAGE 12  
 
  671          * @brief mcu ota offset requset 
  672          * @param[in] {packet_offset}  packet offset 
@@ -766,7 +766,7 @@ line level    source
  729   1         unsigned char i;
  730   1         for(i = 0; i < len; i++){
  731   2          if(str1[i] < str2[i]){
-C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 10:08:02 PAGE 13  
+C51 COMPILER V9.53.0.0   SYSTEM                                                            11/12/2024 17:02:19 PAGE 13  
 
  732   3            return -1; //str1 < str2
  733   3          }

+ 2 - 2
Projects/macro/switch_ota_app_V1.1.06/Listings/time2.lst

@@ -1,4 +1,4 @@
-C51 COMPILER V9.53.0.0   TIME2                                                             11/12/2024 10:08:02 PAGE 1   
+C51 COMPILER V9.53.0.0   TIME2                                                             11/12/2024 17:02:19 PAGE 1   
 
 
 C51 COMPILER V9.53.0.0, COMPILATION OF MODULE TIME2
@@ -62,7 +62,7 @@ line level    source
   48   1        int i=0;
   49   1        if (TF2)
   50   1        {
-C51 COMPILER V9.53.0.0   TIME2                                                             11/12/2024 10:08:02 PAGE 2   
+C51 COMPILER V9.53.0.0   TIME2                                                             11/12/2024 17:02:19 PAGE 2   
 
   51   2          TF2 = 0; // 除了用作串口的时基外,其他应用必须清零
   52   2          

+ 4 - 4
Projects/macro/switch_ota_app_V1.1.06/Listings/uart.lst

@@ -1,4 +1,4 @@
-C51 COMPILER V9.53.0.0   UART                                                              11/12/2024 10:08:03 PAGE 1   
+C51 COMPILER V9.53.0.0   UART                                                              11/12/2024 17:02:20 PAGE 1   
 
 
 C51 COMPILER V9.53.0.0, COMPILATION OF MODULE UART
@@ -62,7 +62,7 @@ line level    source
   47   1        /*SET_REG(PORTIDX, PORT3);
   48   1        SET_REG_BITS(PINMOD10, PINMOD1, PIN_MODE_PP);
   49   1        SET_REG_BITS(PINMOD10, PINMOD0, PIN_MODE_OD_IPU);*/
-C51 COMPILER V9.53.0.0   UART                                                              11/12/2024 10:08:03 PAGE 2   
+C51 COMPILER V9.53.0.0   UART                                                              11/12/2024 17:02:20 PAGE 2   
 
   50   1      
   51   1        ////modified by  zzw  修改串口为P4.4和P4.5
@@ -126,7 +126,7 @@ line level    source
  105   1        TMOD = TMOD & ~0X30 | 0x20;
  106   1        TL1 = 256 - 5;
  107   1        TH1 = 256 - 5; // 115200
-C51 COMPILER V9.53.0.0   UART                                                              11/12/2024 10:08:03 PAGE 3   
+C51 COMPILER V9.53.0.0   UART                                                              11/12/2024 17:02:20 PAGE 3   
 
  108   1      
  109   1        //TL1 = 256 - 60;
@@ -190,7 +190,7 @@ line level    source
  163          /*********************************************************************************************************
              -*
  164          **函数名称 UART1_send_buf
-C51 COMPILER V9.53.0.0   UART                                                              11/12/2024 10:08:03 PAGE 4   
+C51 COMPILER V9.53.0.0   UART                                                              11/12/2024 17:02:20 PAGE 4   
 
  165          **函数描述 :uart1发送字符串
  166          **输    入 char

+ 7 - 7
Projects/macro/switch_ota_app_V1.1.06/Listings/uart2.lst

@@ -1,4 +1,4 @@
-C51 COMPILER V9.53.0.0   UART2                                                             11/12/2024 10:08:03 PAGE 1   
+C51 COMPILER V9.53.0.0   UART2                                                             11/12/2024 17:02:20 PAGE 1   
 
 
 C51 COMPILER V9.53.0.0, COMPILATION OF MODULE UART2
@@ -62,7 +62,7 @@ line level    source
   48   1        P1_1 = 1;     // tx
   49   1        P1_0 = 1;     // rx
   50   1      
-C51 COMPILER V9.53.0.0   UART2                                                             11/12/2024 10:08:03 PAGE 2   
+C51 COMPILER V9.53.0.0   UART2                                                             11/12/2024 17:02:20 PAGE 2   
 
   51   1          
   52   1          // p55,54
@@ -126,7 +126,7 @@ line level    source
  110          ** 函数描述: uart2接收函数
  111          ** 输入参数: 无
  112          ** 输出参数: 无
-C51 COMPILER V9.53.0.0   UART2                                                             11/12/2024 10:08:03 PAGE 3   
+C51 COMPILER V9.53.0.0   UART2                                                             11/12/2024 17:02:20 PAGE 3   
 
  113          *******************************************************************************************/
  114          /*void uart_recv (unsigned char *buf, unsigned char len)
@@ -190,7 +190,7 @@ line level    source
  170          ////    {
  171          ////      B_Rx_Finish = TRUE;                   // 数据接收完毕
  172          ////      u8_RX_Index = 0;
-C51 COMPILER V9.53.0.0   UART2                                                             11/12/2024 10:08:03 PAGE 4   
+C51 COMPILER V9.53.0.0   UART2                                                             11/12/2024 17:02:20 PAGE 4   
 
  173          
  174          ////    }
@@ -254,7 +254,7 @@ line level    source
  231   4      //        if(u8_RX_Index>9)
  232   4      //        {
  233   4      //          u8_RX_Index = 0;
-C51 COMPILER V9.53.0.0   UART2                                                             11/12/2024 10:08:03 PAGE 5   
+C51 COMPILER V9.53.0.0   UART2                                                             11/12/2024 17:02:20 PAGE 5   
 
  234   4      //        }
  235   4            }
@@ -318,7 +318,7 @@ line level    source
  291   2        }
  292   1        #if CKS_EVEN_ODD  
                 if((total%2)!=0)        //奇为1,偶为0
-C51 COMPILER V9.53.0.0   UART2                                                             11/12/2024 10:08:03 PAGE 6   
+C51 COMPILER V9.53.0.0   UART2                                                             11/12/2024 17:02:20 PAGE 6   
 
                 {SCON2 &= ~TB82;}
                 else
@@ -382,7 +382,7 @@ line level    source
  351          ** 输出参数: 无
  352          *******************************************************************************************/
  353          /*void main (void)
-C51 COMPILER V9.53.0.0   UART2                                                             11/12/2024 10:08:03 PAGE 7   
+C51 COMPILER V9.53.0.0   UART2                                                             11/12/2024 17:02:20 PAGE 7   
 
  354          {
  355            bsp_clock_init();         // 系统快钟18.432 div 2 =  9.216Mhz

BIN
Projects/macro/switch_ota_app_V1.1.06/Objects/CRC.obj


BIN
Projects/macro/switch_ota_app_V1.1.06/Objects/EEPROM.obj


BIN
Projects/macro/switch_ota_app_V1.1.06/Objects/GLOBAL.obj


BIN
Projects/macro/switch_ota_app_V1.1.06/Objects/HLW8110.obj


BIN
Projects/macro/switch_ota_app_V1.1.06/Objects/HSW_3KEY_APP_V10


+ 151 - 12
Projects/macro/switch_ota_app_V1.1.06/Objects/HSW_3KEY_APP_V10.build_log.htm

@@ -8,23 +8,162 @@ Copyright (C) 2014 ARM Ltd and ARM Germany GmbH. All rights reserved.
 License Information: LUXCON 273380647@qq.com, LUXCON, LIC=ZBD7S-LJL1L-D8FFM-XR6G3-B2KW1-M4LPX
  
 Tool Versions:
-Toolchain:       PK51 Prof. Developers Kit  Version: <unknown>
-Toolchain Path:  
-C Compiler:      C51.exe
-Assembler:       A51.exe
-Linker/Locator:  BL51.exe
-Library Manager: LIB51.exe
-Hex Converter:   OH51.exe
-CPU DLL:         S8051.DLL
-Dialog DLL:      DP51.DLL
-    Target DLL: C:\Keil_v5_51\SampTarg.DLL
-Dialog DLL:      TP51.DLL
+Toolchain:       PK51 Prof. Developers Kit  Version: 9.53.0.0
+Toolchain Path:  C:\Keil_v5_51\C51\BIN
+C Compiler:      C51.exe V9.53.0.0
+Assembler:       A51.exe V8.02b
+Linker/Locator:  BL51.exe V6.22
+Library Manager: LIB51.exe V4.30.0.2
+Hex Converter:   OH51.exe V2.7.0.0
+CPU DLL:         S8051.DLL V3.95.0.0
+Dialog DLL:      DP51.DLL V2.62.0.1
+Target DLL:      C:\Keil_v5_51\SampTarg.DLL V1.06.44.75.R
+Dialog DLL:      TP51.DLL V2.58
  
 <h2>Project:</h2>
-D:\SVN\GIT_CHENSIR\ZB_TM52_SWITCH\Projects\macro\switch_ota_app_V1.1.06\main.uvproj
+D:\주桂黛\淃커\鈴껄셕좆\鈴껄셕좆老경닸도\셕좆역밑\객숩겼\넋埼匡도\ZB_SW4_TM52F1386_SDK_v0_0_1\Projects\macro\switch_ota_app_V1.1.06\main.uvproj
 Project File Date:  10/28/2024
 
 <h2>Output:</h2>
+Rebuild target 'Target 1'
+assembling STARTUP_TENX52.A51...
+compiling main.c...
+HLW8110.h(3): warning C318: can't open file 'sys.h'
+HLW8110.h(4): warning C318: can't open file 'core_cm3.h'
+main.c(1083): warning C182: pointer to different objects
+compiling EEPROM.c...
+compiling GLOBAL.c...
+compiling gpio_ctrl.c...
+gpio_ctrl.c(627): warning C280: 'state': unreferenced local variable
+gpio_ctrl.c(638): warning C280: 'state': unreferenced local variable
+gpio_ctrl.c(649): warning C280: 'state': unreferenced local variable
+gpio_ctrl.c(1228): warning C280: 'ledprd': unreferenced local variable
+gpio_ctrl.c(1303): warning C280: 'row': unreferenced local variable
+gpio_ctrl.c(1305): warning C280: 'ReadValue': unreferenced local variable
+compiling mcu_api.c...
+mcu_api.c(396): warning C280: 'len': unreferenced local variable
+mcu_api.c(407): warning C280: 'len': unreferenced local variable
+mcu_api.c(418): warning C280: 'len': unreferenced local variable
+compiling protocol.c...
+HLW8110.h(3): warning C318: can't open file 'sys.h'
+HLW8110.h(4): warning C318: can't open file 'core_cm3.h'
+protocol.c(368): warning C280: 'i': unreferenced local variable
+protocol.c(1248): warning C280: 'string_H16_data': unreferenced local variable
+protocol.c(2372): warning C280: 'k': unreferenced local variable
+protocol.c(2372): warning C280: 'Ret': unreferenced local variable
+protocol.c(2373): warning C280: 'temp_buff': unreferenced local variable
+protocol.c(2406): warning C280: 'data1': unreferenced local variable
+protocol.c(2412): warning C280: 'write_data': unreferenced local variable
+compiling sTimeout.c...
+compiling system.c...
+HLW8110.h(3): warning C318: can't open file 'sys.h'
+HLW8110.h(4): warning C318: can't open file 'core_cm3.h'
+system.c(267): warning C206: 'zigbee_notify_factory_new_hanlde': missing function-prototype
+compiling time2.c...
+compiling uart.c...
+compiling CRC.c...
+compiling iap.c...
+compiling HLW8110.c...
+HLW8110.h(3): warning C318: can't open file 'sys.h'
+HLW8110.h(4): warning C318: can't open file 'core_cm3.h'
+HLW8110.c(1125): warning C182: pointer to different objects
+HLW8110.c(1154): warning C182: pointer to different objects
+HLW8110.c(1165): warning C182: pointer to different objects
+HLW8110.c(1185): warning C182: pointer to different objects
+HLW8110.c(1189): warning C182: pointer to different objects
+HLW8110.c(1203): warning C182: pointer to different objects
+HLW8110.c(1208): warning C182: pointer to different objects
+HLW8110.c(1222): warning C182: pointer to different objects
+HLW8110.c(1227): warning C182: pointer to different objects
+HLW8110.c(1240): warning C182: pointer to different objects
+HLW8110.c(1245): warning C182: pointer to different objects
+HLW8110.c(1249): warning C182: pointer to different objects
+HLW8110.c(1255): warning C182: pointer to different objects
+HLW8110.c(1327): warning C182: pointer to different objects
+compiling uart2.c...
+HLW8110.h(3): warning C318: can't open file 'sys.h'
+HLW8110.h(4): warning C318: can't open file 'core_cm3.h'
+compiling TM52F1386_bsp.c...
+linking...
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?BUTTON1LONGPRESSCHECK?MAIN
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?RELAY_CTL?MAIN
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?WDGT_INIT?MAIN
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?WDGT_FEED?MAIN
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?_BASE64ENCODE?GLOBAL
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?_KEY1_LED_CONTROL?GPIO_CTRL
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?_KEY2_LED_CONTROL?GPIO_CTRL
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?_KEY3_LED_CONTROL?GPIO_CTRL
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?KEY_LED_CTL?GPIO_CTRL
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?_HEX_TO_BCD?MCU_API
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?_MY_MEMSET?MCU_API
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?_MY_STRCPY?MCU_API
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?_MY_STRCMP?MCU_API
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?_INT_TO_BYTE?MCU_API
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?_MCU_DP_BITMAP_UPDATE?MCU_API
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?_MCU_DP_FAULT_UPDATE?MCU_API
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?_MCU_DP_RAW_UPDATE?MCU_API
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?_MCU_START_ZIGBEE_TEST?MCU_API
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?MCU_RESET_ZIGBEE?MCU_API
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?MCU_NETWORK_START?MCU_API
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?ZIGBEE_TEST_RESULT?PROTOCOL
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?_REPORT_MCU_OTA_RESULT?PROTOCOL
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?MCU_EXIT_ZIGBEE?SYSTEM
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?MCU_GET_ZIGBEE_STATE?SYSTEM
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?_UART0_SEND_BUF?UART
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?_USER_WRITE_APP_BYTE?IAP
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?UART_HLW8110_RESET?HLW8110
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?CHECK_WRITEREG_SUCCESS?HLW8110
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?READ_HLW8110_PF?HLW8110
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?CLOSE_ALL_PASSAGEWAY?UART2
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?_UART2_SEND_BUF?UART2
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?_UART_SEND?UART2
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?BSP_FXT_CLOCK_INIT?TM52F1386_BSP
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?BSP_SXT_CLOCK_INIT?TM52F1386_BSP
+*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
+    SEGMENT: ?PR?_BSP_DELAY_100US?TM52F1386_BSP
+Program Size: data=9.3 xdata=2751 code=30668
+creating hex file from ".\Objects\HSW_3KEY_APP_V10"...
+User command #1: .\_MakeTenx_main\run.bat
+D:\주桂黛\淃커\鈴껄셕좆\鈴껄셕좆老경닸도\셕좆역밑\객숩겼\넋埼匡도\ZB_SW4_TM52F1386_SDK_v0_0_1\Projects\macro\switch_ota_app_V1.1.06>".\_MakeTenx_main\CallKeilDll.exe"
+".\Objects\HSW_3KEY_APP_V10" - 0 Error(s), 77 Warning(s).
+Load "D:\\주桂黛\\淃커\\鈴껄셕좆\\鈴껄셕좆老경닸도\\셕좆역밑\\객숩겼\\넋埼匡도\\ZB_SW4_TM52F1386_SDK_v0_0_1\\Projects\\macro\\switch_ota_app_V1.1.06\\Objects\\HSW_3KEY_APP_V10" 
+Flash Write Done: 30608 bytes programmed.
+Flash Verify Done: 30608 bytes verified.
+Code checksum: 0x2371.
 </pre>
 </body>
 </html>

+ 4 - 4
Projects/macro/switch_ota_app_V1.1.06/Objects/HSW_3KEY_APP_V10.tenx

@@ -4353,7 +4353,7 @@
 :100FF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF01
 :00000001FF
 :020000000000FE
-:02000200F513F4
+:02000200BDE659
 :02000400763153
 :020006002E309A
 :02000800362E92
@@ -4365,9 +4365,9 @@
 :02001400323484
 :02001600313186
 :02001800313283
-:02001A00313083
-:02001C0030387A
-:02001E00313778
+:02001A0031377C
+:02001C00303280
+:02001E00323975
 :020020000000DE
 :02002200FF00DD
 :020024000000DA

+ 19 - 19
Projects/macro/switch_ota_app_V1.1.06/Objects/HSW_3KEY_APP_V10.tenx.crc2

@@ -32780,22 +32780,22 @@ FFFF-FFFE	7FFF	FFFF	CF2B
 10017-10016	800B	3432	0E31
 10019-10018	800C	3131	8200
 1001B-1001A	800D	3231	A0AC
-1001D-1001C	800E	3031	E347
-1001F-1001E	800F	3830	5B3D
-10021-10020	8010	3731	E82D
-10023-10022	8011	4237	7C55
-10025-10024	8012	003F	097A
-10027-10026	8013	0000	B71F
-10029-10028	8014	0000	324B
-1002B-1002A	8015	0000	2DB9
-1002D-1002C	8016	0000	6D95
-1002F-1002E	8017	0000	6D78
-10031-10030	8018	0000	6F16
-10033-10032	8019	0000	6272
-10035-10034	801A	0000	4D2A
-10037-10036	801B	0000	AEFA
-10039-10038	801C	0000	6615
-1003B-1003A	801D	0000	5478
-1003D-1003C	801E	0000	F916
-1003F-1003E	801F	0000	1678
-10041-10040	8020	0000	F513
+1001D-1001C	800E	3731	7144
+1001F-1001E	800F	3230	8B3E
+10021-10020	8010	3932	AC22
+10023-10022	8011	4237	6472
+10025-10024	8012	003F	59A8
+10027-10026	8013	0000	D5F6
+10029-10028	8014	0000	FC38
+1002B-1002A	8015	0000	089C
+1002D-1002C	8016	0000	B34B
+1002F-1002E	8017	0000	2BB3
+10031-10030	8018	0000	79A9
+10033-10032	8019	0000	15F0
+10035-10034	801A	0000	FC23
+10037-10036	801B	0000	08C6
+10039-10038	801C	0000	B297
+1003B-1003A	801D	0000	2F7B
+1003D-1003C	801E	0000	6319
+1003F-1003E	801F	0000	4A50
+10041-10040	8020	0000	BDE6

BIN
Projects/macro/switch_ota_app_V1.1.06/Objects/STARTUP_TENX52.obj


BIN
Projects/macro/switch_ota_app_V1.1.06/Objects/TM52F1386_bsp.obj


BIN
Projects/macro/switch_ota_app_V1.1.06/Objects/gpio_ctrl.obj


BIN
Projects/macro/switch_ota_app_V1.1.06/Objects/iap.obj


BIN
Projects/macro/switch_ota_app_V1.1.06/Objects/main.obj


BIN
Projects/macro/switch_ota_app_V1.1.06/Objects/mcu_api.obj


BIN
Projects/macro/switch_ota_app_V1.1.06/Objects/protocol.obj


BIN
Projects/macro/switch_ota_app_V1.1.06/Objects/sTimeout.obj


BIN
Projects/macro/switch_ota_app_V1.1.06/Objects/system.obj


BIN
Projects/macro/switch_ota_app_V1.1.06/Objects/time2.obj


BIN
Projects/macro/switch_ota_app_V1.1.06/Objects/uart.obj


BIN
Projects/macro/switch_ota_app_V1.1.06/Objects/uart2.obj


+ 33 - 1
Projects/macro/switch_ota_app_V1.1.06/gpio_ctrl.c

@@ -1303,7 +1303,39 @@ void ScanKeyn(void)
 	static byte row; // 扫描输出列计数
 	unsigned char i;
 	u08 ReadValue;
+#ifdef ZIGBEE_ZTU_T1_SW
+	for (i = 0; i < KEY_MAX_NUM; i++) // 每次(10ms)扫键值,如1号键暂存入1
+	{
+		sScanKey[i].KeyIn = 0xff;
+	}
+	if (KEY1_READ() == 0x00)
+	{
+		sScanKey[0].KeyIn = KEY1; // 键值
+	}
+	if (KEY2_READ() == 0x00)
+	{
+		sScanKey[0].KeyIn = KEY2; // 键值
+	}
+	if (KEY3_READ() == 0x00)
+	{
+		sScanKey[0].KeyIn = KEY3; // 键值
+	}
+	if (KEY4_READ() == 0x00)
+	{
+		sScanKey[0].KeyIn = KEY4; // 键值
+	}
+
+	if (KEY5_READ() == 0x00)
+	{
+		sScanKey[0].KeyIn = KEY5; // 键值
+	}
 
+	if (KEY6_READ() == 0x00)
+	{
+		sScanKey[0].KeyIn = KEY6; // 键值
+	}
+#endif
+#ifndef ZIGBEE_ZTU_T1_SW
 	for (i = 0; i < KEY_MAX_NUM; i++) // 每次(10ms)扫键值,如1号键暂存入1
 	{
 		sScanKey[i].KeyIn = 0xff;
@@ -1334,7 +1366,7 @@ void ScanKeyn(void)
 	{
 		sScanKey[5].KeyIn = KEY6; // 键值
 	}
-
+#endif
 	for (i = 0; i < KEY_MAX_NUM; i++) // 每次(10ms)扫键值,如1号键暂存入1
 	{
 		if (sScanKey[i].KeyIn == 0xff)

File diff suppressed because it is too large
+ 89 - 26
Projects/macro/switch_ota_app_V1.1.06/main.uvgui.CHENSIR


File diff suppressed because it is too large
+ 90 - 27
Projects/macro/switch_ota_app_V1.1.06/main.uvgui_CHENSIR.bak


+ 4 - 4
Projects/macro/switch_ota_app_V1.1.06/main.uvopt

@@ -326,7 +326,7 @@
       <GroupNumber>1</GroupNumber>
       <FileNumber>7</FileNumber>
       <FileType>1</FileType>
-      <tvExp>0</tvExp>
+      <tvExp>1</tvExp>
       <Focus>0</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
@@ -352,7 +352,7 @@
       <GroupNumber>1</GroupNumber>
       <FileNumber>9</FileNumber>
       <FileType>1</FileType>
-      <tvExp>0</tvExp>
+      <tvExp>1</tvExp>
       <Focus>0</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
@@ -417,7 +417,7 @@
       <GroupNumber>1</GroupNumber>
       <FileNumber>14</FileNumber>
       <FileType>1</FileType>
-      <tvExp>0</tvExp>
+      <tvExp>1</tvExp>
       <Focus>0</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
@@ -443,7 +443,7 @@
 
   <Group>
     <GroupName>Driver</GroupName>
-    <tvExp>1</tvExp>
+    <tvExp>0</tvExp>
     <tvExpOptDlg>0</tvExpOptDlg>
     <cbSel>0</cbSel>
     <RteFlg>0</RteFlg>

+ 2 - 2
Projects/macro/switch_ota_app_V1.1.06/main_uvopt.bak

@@ -326,7 +326,7 @@
       <GroupNumber>1</GroupNumber>
       <FileNumber>7</FileNumber>
       <FileType>1</FileType>
-      <tvExp>0</tvExp>
+      <tvExp>1</tvExp>
       <Focus>0</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
@@ -451,7 +451,7 @@
       <GroupNumber>2</GroupNumber>
       <FileNumber>16</FileNumber>
       <FileType>1</FileType>
-      <tvExp>0</tvExp>
+      <tvExp>1</tvExp>
       <Focus>0</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>

+ 2 - 1
Projects/macro/版本记录.txt

@@ -1,7 +1,8 @@
 switch_ota_app_V1.0.12:5秒钟采集一次数据,计量数据有变化就保存
 
 switch_ota_app_V1.1.06:按键和指示灯逻辑修复正确,APP支持断电状态设置;取消按键灯调节,取消点动开关设置。
-
+修改app删除清零计量值,去除备份保存flash
+增加宏,区分一位与二三六位的按键读取处理
 
 
 注意: