如题,我实在是比较笨的,看ti的datashet的也是云里雾里,请了解的指点一下。先谢过了。
xyz549040622:
可以看看库文档中的这个例程,应该是定义一个
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);
Susan Yang:
您可以看一下
e2e.ti.com/…/532199
给出的代码