Flexcan - what does this line do?

Status
Not open for further replies.

keith-i

Member
I'm trying to learn some of the Flexcan features and would like to understand what this line in the global section actually does in laymans terms.

Code:
static CAN_message_t msg;

It is sometimes as above and sometimes ends msg, rxmsg;. What does the extra rxmsg do?
 
Its basically like a container that has multiple variables.

As an example above, these work:

msg.id;
msg.buf[0];
msg.flags.extended,
 
Ok thanks, so presumably if you had inMsg in you struct you'd use inMsg.id; etc.
Why might you need two containers such as msg, rxmsg then
 
So does it matter what name you use or is it just rxmsg to help recognise it as a receive function. Could you say use txmsg instead of msg?
 
Name can be anything you want it to be, like a variable, yeah

Txmsg is an example to let you know its a transmit message
 
Status
Not open for further replies.
Back
Top