如题,我实在是比较笨的,看ti的datashet的也是云里雾里,请了解的指点一下。先谢过了。
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
可以看看库文档中的这个例程,应该是定义一个
tCANMsgObject sMsgObjectRx;
tCANMsgObject sMsgObjectTx;
然后赋值就可以了
//
// Configure a receive object.
//
sMsgObjectRx.ulMsgID = (0x400);
sMsgObjectRx.ulMsgIDMask = 0x7f8;
sMsgObjectRx.ulFlags = MSG_OBJ_USE_ID_FILTER | MSG_OBJ_FIFO;
// The first three message objects have the MSG_OBJ_FIFO set to indicate // that they are part of a FIFO.
//
CANMessageSet(CAN0_BASE, 1, &sMsgObjectRx, MSG_OBJ_TYPE_RX); CANMessageSet(CAN0_BASE, 2, &sMsgObjectRx, MSG_OBJ_TYPE_RX); CANMessageSet(CAN0_BASE, 3, &sMsgObjectRx, MSG_OBJ_TYPE_RX);