[riot-notifications] [RIOT-OS/RIOT] periph/i2c: return values of i2c_aquire and i2c_release (#10673)

Gunar Schorcht notifications at github.com
Mon Sep 16 18:33:10 CEST 2019


+1 I'm fine with dropping the return value from `i2c_aquire`.

But, I'm still convinced that we should also drop the return value from `i2c_aquire` for the following reasons:

- As I understand, `i2c_aquire` can't fail if `i2c_init` doesn't fail, at least at the moment.
- If `i2c_aquire` could fail in future, e.g., because of additional configuration, the problem should already happen during the development phase which could be handled by an assertion.
- The return value isn't checked by 90 % of the drivers.
- Checking the return value by all drivers would increase the complexity and the code size.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/issues/10673#issuecomment-531855458
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190916/2553468b/attachment.htm>


More information about the notifications mailing list