Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Flexcan - what does this line do?

  1. #1
    Junior Member
    Join Date
    Sep 2019
    Location
    UK
    Posts
    13

    Flexcan - what does this line do?

    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?

  2. #2
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,072
    Receive message, its just a struct with the id, data, etc

  3. #3
    Junior Member
    Join Date
    Sep 2019
    Location
    UK
    Posts
    13
    Thanks, but it's still a little over my head. Can you explain 'struct' to me?

  4. #4
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,072
    Its basically like a container that has multiple variables.

    As an example above, these work:

    msg.id;
    msg.buf[0];
    msg.flags.extended,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •