

/*INCLUDE HEAD*********************************************************/

#include "BootModule.h"
#include "Common_Define.h"
/*GLOBAL*********************************************************/

/// @brief Boot升级状态
Boot_UpdataControl Boot_UpdataCtrl = {0};

/*FUNCTION*********************************************************/

/**
 * @brief BOOT跳转APP功能
 *
 * @param start_address 选择待跳转的APP地址
 */
void BootModule_Jump2App(UINT32 start_address)
{

}

/**
 * @brief BOOTLOADER参数初始化
 *
 */
void BootModule_Init(void)
{
	uint8_t  JumpAppFlg;
	uint8_t RetValJudge;
	//test
	JumpAppFlg = 0x99;
	RetValJudge = App_EERPOM_Wt1Byte(0x1FFE, JumpAppFlg);
	JumpAppFlg = 0;
	//test
	static UINT32 s_u32RdTick5ms = 0;
	Delay_Init(&s_u32RdTick5ms);
	while(false == Delay_IsTimeout(&s_u32RdTick5ms,5));
	RetValJudge = EepMiddle_Read(0x1FFE, &JumpAppFlg);

	JumpAppFlg = 0xAA;
	RetValJudge = App_EERPOM_Wt1Byte(0x1FFE, JumpAppFlg);
	JumpAppFlg = 0;
	//test
	Delay_Init(&s_u32RdTick5ms);
	while(false == Delay_IsTimeout(&s_u32RdTick5ms,5));
	RetValJudge = EepMiddle_Read(0x1FFE, &JumpAppFlg);//	RetValJudge = App_EERPOM_Rd1Byte(FLAG_ADDRALL, &JumpAppFlg);
}

/**
 * @brief UDS BOOT跳转APP区域选择:判断条件识别跳转A/B区
 *
 */
void BootModule_JumpAppSelect(void)
{

}

/**
 * @brief 主循环实时运行的跳转条件判断函数
 *
 */
void BootModule_Main(void)
{
}

/**
 * @brief BOOT层控制的指示灯状态
 *
 */
void BootModule_LedCtrl(void)
{

}
