-
Notifications
You must be signed in to change notification settings - Fork 2k
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
periph/timer: API inconstency #4371
Comments
same kind of inconsistency exists in nrf24l01p driver : some functions return 0 (preload, unregister, ...) on success, some return 1 (set_channel, ...). |
all driver interfaces except @OlegHahm: is this enough to close this PR, or do you insist on some macro on top of this? |
It may be a surprise, ;-) but I still recommend using macros. Not sure if there is need to list all the advantages... |
I don't care (though I am not a fan of it). So lets keep this issue open. |
|
Still inconsistent. Let's move it for the next release. |
This somehow flew under my radar. Postponed. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
Reviewing #4089 I realized that
periph/timer
API seems to be inconsistent.timer_init()
returns 0 on success, while all other functions return 1 on success. I think all periph functions which just return a boolean value should return the same one. Ideally this would be rather a macro likePERIPH_SUCCESS
than a literal.The text was updated successfully, but these errors were encountered: