修改:多联开关场景执行中增加回路判断
多联开关场景执行中增加回路判断,删除部分调试信息
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
#include "SPI_SRAM.h"
|
||||
#include "rw_logging.h"
|
||||
#include "sram_mem_addr.h"
|
||||
#include "debug.h"
|
||||
#include "rtc.h"
|
||||
#include <string.h>
|
||||
|
||||
BLV_AUTHORIZE sys_authorize;
|
||||
@@ -89,4 +91,43 @@ __attribute__((section(".non_0_wait"))) uint32_t Get_Authorize_UnixTime(void)
|
||||
return sys_authorize.expires_time;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : BLV_Authorize_Task
|
||||
* Description : BLV<4C><56>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>
|
||||
*******************************************************************************/
|
||||
__attribute__((section(".non_0_wait"))) void BLV_Authorize_Task(void)
|
||||
{
|
||||
static uint32_t sys_tick = 0;
|
||||
uint32_t temp_unix = 0,curr_unix = 0;
|
||||
|
||||
if(SysTick_1ms - sys_tick > 10000)
|
||||
{
|
||||
sys_tick = SysTick_1ms;
|
||||
|
||||
Dbg_Println(DBG_BIT_SYS_STATUS_bit,"RTCʱ<EFBFBD><EFBFBD>: 20%02X-%02X-%02X %02X:%02X:%02X <20><><EFBFBD><EFBFBD>%X",RTC_Raw_Data.year,RTC_Raw_Data.month,RTC_Raw_Data.day,RTC_Raw_Data.hour,RTC_Raw_Data.minute,RTC_Raw_Data.second,RTC_Raw_Data.week);
|
||||
|
||||
temp_unix = RTC_Conversion_To_Unix(&RTC_Raw_Data);
|
||||
|
||||
BLV_Authorize_Processing(temp_unix);
|
||||
|
||||
if(Get_Authorize_Lock_Status() == 0x01)
|
||||
{
|
||||
Dbg_Println(DBG_BIT_SYS_STATUS_bit,"MCU<EFBFBD><EFBFBD>Ȩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:%08X now:%08X-----",Get_Authorize_UnixTime(),temp_unix);
|
||||
}
|
||||
|
||||
/*<2A><><EFBFBD>в<EFBFBD><D0B2><EFBFBD>12ʱ<32>䱣<EFBFBD>棬<EFBFBD><E6A3AC>ʱ<EFBFBD>䱣<EFBFBD>浽Flash<73><68>*/
|
||||
curr_unix = SRAM_Read_DW(SRAM_Register_Start_ADDRESS + Register_CurrentUsageTime_OFFSET);
|
||||
if(temp_unix - curr_unix > 43200)
|
||||
{
|
||||
SRAM_Write_DW(temp_unix,SRAM_Register_Start_ADDRESS + Register_CurrentUsageTime_OFFSET);
|
||||
Retain_Flash_Register_Data();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user