#include "common.h"
#include "userdefine.h"
#include "sys_scheduler.h"
#include "wdt.h"
#include "gpio.h"
#include "PowerManagement_user.h"
#include "Common_Interface.h"
#include "timerA_B_C.h"


extern uint32_t u32ResetFlag;

extern void Power_Sleep_Init(void);
extern void Sys_Enter_Sleep_Mode(void);
extern void Power_Wakeup_Init ( void );
uint8_t socPowerEn = 0;

int main(void)
{
#if HAS_BOOTLOADER
    __disable_irq();   
	  SCB->VTOR = APP_BASE; 
    __DMB(); 
    __enable_irq();  
#endif

	Sys_Init();

    while (1U)
    {
//		if(socPowerEn){
//			(SOC_3V3_en);
//		}
//		else{
//			PORT_ClrBit(SOC_3V3_en);
//		}
        Sys_Scheduling_Service();

			
        WDT_Restart();			
			
//        if(PORT_GetBit(CHECK_KL15_In) == 0){
//            Power_Sleep_Init();
//            Sys_Enter_Sleep_Mode();
//					 Power_Wakeup_Init();
//        }
    }
}

