基于dsPIC33FJ128MC506的CAN通信(07-100)
——
写标准报文函数
本文引用地址:http://www.amcfsurvey.com/article/92042.htmvoid ecan1WriteMessage(unsigned int ID,unsigned int Length,unsigned int *Data)
{
ecan1WriteTxMsgBufId(0,ID,0,0);
ecan1WriteTxMsgBufData(0,Length,*Data,*(Data+1),*(Data+2),*(Data+3));
C1TR01CONbits.TXREQ0=1;
}
CAN通信示例程序
评论