#include "FunState.h"
#include "math.h"
#include "Init_pwm.h"
#include "adc.h"
#include "gpio.h"
#include "ctrl.h"
#include "FaultDetect.h"
#include "f28x_project.h"
#include "MonitorSci.h"

union 	SYSTEM_COMMAND	SysCmd;
struct	RUNSTATUS	RunState;




void Fun_Status_init(void)
{
    my_memset(&SysCmd,0,sizeof(SysCmd));
    
    my_memset(&RunState,0,sizeof(RunState));
}

void Fun_Status_RUN(void)
{
    RunState.RunStaFlag 		 			= charge_on;
    SysCmd.bit.CharDcdcOn = 1;

	uiSetDataBag[1]            = RunState.LLCRunSta.all;
	uiSetDataBag[2]            = SecProData.SecProtect.all&0xffff;
	uiSetDataBag[3]            = (SecProData.SecProtectFast.all)&0xffff;
	uiSetDataBag[4]            = (Uint16)(VoutCtrMes.Ctrl.fout*10)&0xffff;
	uiSetDataBag[5]            = (Uint16)(IoutCtrMes.Ctrl.fout*10)&0xffff;
	uiSetDataBag[6]            = (Uint16)(CtrlMess.fprd*10)&0xffff;
//	uiSetDataBag[7]            = CtrlMess.uCtrType;

}















































