I have a fairly simple interface where one node transmits data requests to several nodes. When a node receives a request it replies back. Initially we had a mailbox for every TX and RX message but we're running out of mailboxes. It seems like it would be ok to designate one mailbox as the TX mailbox and send several different messages through that mailbox? Any reason not to do this?
// // // So say I have 3 TX message objects that I set up:
// Msg 1
sTXCANMsg1.ui32MsgID = 1; // CAN message ID
sTXCANMsg1.ui32MsgIDMask = 0; // no mask needed for TX
sTXCANMsg1.ui32MsgLen = sizeof(TxCANMsgData.val.Msg1); // number of data bytes
sTXCANMsg1.pucMsgData = TxCANMsgData.val.Msg1; // ptr to message content
// Msg 2
sTXCANMsg1.ui32MsgID = 2; // CAN message ID
sTXCANMsg1.ui32MsgIDMask = 0; // no mask needed for TX
sTXCANMsg1.ui32MsgLen = sizeof(TxCANMsgData.val.Msg2); // number of data bytes
sTXCANMsg1.pucMsgData = TxCANMsgData.val.Msg2; // ptr to message content
// Msg 3
sTXCANMsg1.ui32MsgID = 3; // CAN message ID
sTXCANMsg1.ui32MsgIDMask = 0; // no mask needed for TX
sTXCANMsg1.ui32MsgLen = sizeof(TxCANMsgData.val.Msg3); // number of data bytes
sTXCANMsg1.pucMsgData = TxCANMsgData.val.Msg3; // ptr to message content
// // // But then I only use one transmit object ID for sending the messages:
// // // Note that I don't have to send messages back to back there will be some time between transmits
#define CAN_TX_OBJ_ID 1
CANMessageSet(can_base_addr, CAN_TX_OBJ_ID, &sTXCANMsg1, MSG_OBJ_TYPE_TX);
CANMessageSet(can_base_addr, CAN_TX_OBJ_ID, &sTXCANMsg2, MSG_OBJ_TYPE_TX);
CANMessageSet(can_base_addr, CAN_TX_OBJ_ID, &sTXCANMsg3, MSG_OBJ_TYPE_TX);