mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
4a016adebb
Change driver guide to expect drivers to return negative errno codes instead of enums for error codes. Those have the following advantages: - More efficient implementation of POSIX compatibility wrappers: - In case of error, just an `errno = -retval; return -1` is needed - Better interoperability - A lot of code within RIOT and in external code is doing so already. Applying this consistently allows passing error codes through, rather than translating between errno codes and custom enum values - Not reinventing the wheel - Defining and documenting custom error codes for each driver is unneeded effort - The error classes that device driver have to report are largely the same. There is no reason to have dozens of error codes for an input/output error, each with a unique spelling a programmer needs to memorize |
||
---|---|---|
.. | ||
doxygen | ||
memos |