#include "colorcontrol.h" #if (CONTROL_BUS == COMM_CAN) void InitColorControl(ColorControl * pCtrl) { if (pCtrl != NULL) { memset(pCtrl, 0, sizeof(ColorControl)); } } void SendColorCommand(ColorControl * pCtrl, ColorCommand * pCmd) { if (pCtrl != NULL && pCmd != NULL) { memcpy(pCtrl->ctrlCmd.cancomm.data.buff, pCmd->buff, CAN_DATA_LEN); pCtrl->cmdFlag = 1; } } void RequestColorStatus(ColorControl * pCtrl) { if (pCtrl != NULL) { pCtrl->refSta = 1; } } void RequestColorVersion(ColorControl * pCtrl) { if (pCtrl != NULL) { pCtrl->refVer = 1; } } void RequestColorNvPara(ColorControl * pCtrl) { if (pCtrl != NULL) { pCtrl->refNvPara = 1; } } #endif