[riot-notifications] [RIOT-OS/RIOT] cpu: fix returns of i2c_acquire and i2c_release (#10856)
notifications at github.com
Thu Jan 24 10:11:27 CET 2019
NACK, we've had this discussion many times. periph device args get checked on ```init()``` only.
It is forbidden to call any i2c function with a device value that has not been checked through init(). The checks are not necessary and bloat the code. Any code that triggers the fail case is buggy from the start. Hence asserts must be enough.
Adding this error here would basically force any user to actually check for the error, which is just overkill for embedded use.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications