CAN Driver - Mailbox name confusion
Posted: Sat Apr 01, 2023 1:15 am
Hi everyone, hi Giovanni. First of all, many thanks for creating this wonderful tool. It's the first RTOS I learnt and it really simplified getting into embedded development after Arduino for me.
Now to my question, is the CAN Driver mailbox related in any way to the OSLIB Mailboxes?
I looked through the hal_can and hal_can_lld files and it looks like what are called rx mailboxes are not related to the OSLIB mailboxes but are more like buffers within the MCU memory where a single CAN frame is stored at a time (per "mailbox"), is this correct?
I was planning on implementing a callback based approach where a simple canRxCallback function receives messages and places them on a mailbox for later processing by a regular thread, does this make sense? The naming of the mailboxes en the CAN driver made me think that there were already existing mailboxes and that I was just copying from one OSLIB mailbox to another thus doing double the work and spending double the memory.
Thanks in advance for the help and for all of the work you've done here.
Now to my question, is the CAN Driver mailbox related in any way to the OSLIB Mailboxes?
I looked through the hal_can and hal_can_lld files and it looks like what are called rx mailboxes are not related to the OSLIB mailboxes but are more like buffers within the MCU memory where a single CAN frame is stored at a time (per "mailbox"), is this correct?
I was planning on implementing a callback based approach where a simple canRxCallback function receives messages and places them on a mailbox for later processing by a regular thread, does this make sense? The naming of the mailboxes en the CAN driver made me think that there were already existing mailboxes and that I was just copying from one OSLIB mailbox to another thus doing double the work and spending double the memory.
Thanks in advance for the help and for all of the work you've done here.