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

Change enum identifiers for C++ compatibility #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jjw2202
Copy link

@jjw2202 jjw2202 commented Apr 24, 2024

Hi,
I use the library for a C++ project. When compiling I get an error because the identifier of the enum (tmcXXXX_regaddr_t) is the same as the name of the type in the line directly before it.

In C the identifier of an enum is irrelevant (except for clarity), but in C++ it is relevant. By changing the identifier, it is also possible to use the library with a C++ compiler.
Despite the change, it is still clear that these are the addresses and that they are used with the type tmcXXXX_regaddr_t.

Since the affected files are header files, it is not possible to specifically compile the affected file with a C compiler.

jjw2202

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

Successfully merging this pull request may close these issues.

None yet

1 participant