Skip to content

Different enumerations for different functions #744

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

Closed
kossnikita opened this issue Sep 21, 2023 · 1 comment
Closed

Different enumerations for different functions #744

kossnikita opened this issue Sep 21, 2023 · 1 comment

Comments

@kossnikita
Copy link

I have fields in registers whose purpose changes depending on other fields. The offset and size of the fields do not change. I can't just list all the options because duplication is not allowed in cmsis. In another case, the manufacturer in svd split the register into two "CM1_INPUT" and "CM1_OUTPUT" with the same address and different fields. Is this the only solution?
What is the best way to solve such problems?
Also a question. How to merge and is it worth the cfghr and cfglr registers?

image

@kossnikita
Copy link
Author

At the moment I decided not to use enumerations for this field, but to implement it in the HAL. It seems CMSIS does not support such a feature. About alternative registers, see #16

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