Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide an example working with two CAN interfaces #1

Open
Voldemaar84 opened this issue Jul 16, 2021 · 1 comment
Open

Provide an example working with two CAN interfaces #1

Voldemaar84 opened this issue Jul 16, 2021 · 1 comment

Comments

@Voldemaar84
Copy link

Hello.
Could you provide an example of code working with two CAN IFs ?
I have Linux x86-64 PC with PCIe dual CAN card.
Interfaces are can0 and can1.
I have two ODs (OD1.c, OD1.h, OD2.c, OD2.h)
OPT += -DCO_MULTIPLE_OD in Makefile.
What to do next?
Example code in "demo" directory cannot be compiled with 'OPT += -DCO_MULTIPLE_OD'

BR

@CANopenNode
Copy link
Owner

It is advanced topic. You can make own main.c or even own CANopen.c file, etc.

Basic example with CO_MULTIPLE_OD enabled (but still one OD) was recently added. See:
https://github.com/CANopenNode/CANopenNode/blob/84487ef6ce6a62d997a1b31362404cfbff23439d/example/main_blank.c#L87
https://github.com/CANopenNode/CANopenLinux/blob/b4c6ba0e132862b5280056d8f9d07db68c9cf5d5/CO_main_basic.c#L440

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants