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

CAN Write function overloading #4

Open
nistath opened this issue Mar 13, 2018 · 3 comments
Open

CAN Write function overloading #4

nistath opened this issue Mar 13, 2018 · 3 comments

Comments

@nistath
Copy link
Member

nistath commented Mar 13, 2018

Overload all CAN write functions so that one can do things like:

can0_MSGNM_T msg;
// populate msg here
write_can0(msg);
@nistath
Copy link
Member Author

nistath commented Mar 13, 2018

Change should happen about here.

This macro gets called with things like can0_MSGNM as name, hence why you currently would need to use can0_MSGNM_Write(msg) to write the message.

@nistath
Copy link
Member Author

nistath commented Mar 13, 2018

August Trollbäck [02:20]
how would that work in C?

Nick Stathas [02:33]
get dennis ritchie to git gud
this is for c++ version of canlib
pretty much keep this macro and implement the c++ version under an #if that identifies if we're in C++

@nistath
Copy link
Member Author

nistath commented Mar 13, 2018

__cplusplus info here.

Maybe move the DEFINE macro to the header file.

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

1 participant