This function checks, if a free CAN message is available. If yes, this message is set in front of the used list and initialized with the configured message data.
Prototype
CPU_INT16S CanMsgCreate(CANMSG_PARA *cfg);
Parameter | Meaning |
---|---|
cfg | Configuration of CAN message |
Return Value:
One of the following error codes is returned CAN_ERR_MSGCREATE, CAN_ERR_NULLPTR or CAN_ERR_MSGUNUSED, if an error is detected. Otherwise the message identifier is returned.