-
Notifications
You must be signed in to change notification settings - Fork 2.1k
drivers/periph/spi: clean up error codes and doc #15896
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
Conversation
- Use negative errno as error codes, rather than home-grown enums - Update the home-grown enum with negative errno codes for backward compatibility and mark it deprecated - Update API doc to use negative errno codes - Fix various style issues in Doxygen doc - Use `@retval` to document specific return values instead of abusing `@return` for this - Align parameters to proper indent level
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nobody should depend on the exact numeric values of the enum anyway, as long as 0 stays success and errors remain negative.
Restarting CI with compile test re-enabled. The issues has been fixed and this time it should work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Documentation matches the changes. It's very unlikely that someone's else code is depending on magic numbers rather than the provided enum values.
FYI |
Officially I've pressed the green button :P 🎉 |
Hooray! |
Contribution description
@retval
to document specific return values instead of abusing@return
for thisNote on API Change
As this change is fully backward compatible, there should not be any issues. But marking previous behavior (using e.g.
SPI_OK
) as deprecated IMO qualifies this as an API change.Testing procedure
Issues/PRs references
None