drivers/periph/spi: clean up error codes and doc#15896
drivers/periph/spi: clean up error codes and doc#15896jeandudey merged 1 commit intoRIOT-OS:masterfrom
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
benpicco
left a comment
There was a problem hiding this comment.
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. |
jeandudey
left a comment
There was a problem hiding this comment.
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
@retvalto document specific return values instead of abusing@returnfor 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