
#include "headcontrol.h"

#if (CONTROL_BUS == COMM_CAN)




void InitHeadControl(HeadControl * pCtrl)
{
	if (pCtrl != NULL)
	{
		memset(pCtrl, 0, sizeof(HeadControl));
	}
}

void SendHeadCommand(HeadControl * pCtrl, HeadCommand * pCmd)
{
	if (pCtrl != NULL && pCmd != NULL)
	{
		memcpy(pCtrl->ctrlCmd.cancomm.data.buff, pCmd->buff, CAN_DATA_LEN);
		pCtrl->cmdFlag = 1;
	}
}

void RequestHeadStatus(HeadControl * pCtrl)
{
	if (pCtrl != NULL)
	{
		pCtrl->refSta = 1;
	}
}


void RequestHeadVersion(HeadControl * pCtrl)
{
	if (pCtrl != NULL)
	{
		pCtrl->refVer = 1;
	}
}

void RequestHeadNvPara(HeadControl * pCtrl)
{
	if (pCtrl != NULL)
	{
		pCtrl->refNvPara = 1;
	}
}

#endif







