- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I would like to access the "CAN1_ReceiveMsg" of the CAN component from an custom component. I know that I can use the "CAN1_RECEIVE_MSG_CALLBACK" define, but only by adding it manually in my project. Is it possible to do this within my custom component so that it is not necessary to do the define by the component user?
How can I read the received data from within the callbackfunktion? (How do I figure out witch mailbox was the one that caused the interrupt?)
regards Konrad
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you embed, your component can control how the CAN component is named, so you can call methods on it (actually I think you need to use a special syntax for the instance name, the docs should help you with that).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You would need to include the CAN component into your own. Otherwise your component doesn't know the correct instance ID, so it cannot call the correct callback.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, thank you for your answer, but I didn't got it. When I include the CAN component in my custom component how do I signal the CAN API to call a callback routine?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you embed, your component can control how the CAN component is named, so you can call methods on it (actually I think you need to use a special syntax for the instance name, the docs should help you with that).