Closed OlegHahm closed 5 years ago
same kind of inconsistency exists in nrf24l01p driver : some functions return 0 (preload, unregister, ...) on success, some return 1 (set_channel, ...).
@dkm you're right. As stated in #4389 I think the whole driver could need some rework. But it's not part of this issue :-)
all driver interfaces except spi
and i2c
have been reworked, and including these two they all have the same return values.
@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 might help finding names and applying them. Preferably after this release.
I don't care (though I am not a fan of it). So lets keep this issue open.
timer_init()
still returns 0 on success, while the other functions return 1 on success.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.