mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-26 15:03:53 +01:00
drivers/periph/i2c: Fixed i2c_release() signature
i2c_release() should not have a return value, as:
- There is no reasonable error handling possible by the caller, so there is no
value in indicating success/failure via the return value to the caller
- There is no legitimate reason to fail *unless* an invalid I2C bus was released
or an I2C bus that was not previously acquired was released
--> This would indicate a bug in the code and should be tackled by an
assert()
This commit is contained in:
parent
83e092e585
commit
5bba339a7c
@ -231,10 +231,8 @@ int i2c_acquire(i2c_t dev);
|
||||
* @brief Release the given I2C device to be used by others
|
||||
*
|
||||
* @param[in] dev I2C device to release
|
||||
*
|
||||
* @return 0 on success, -1 on error
|
||||
*/
|
||||
int i2c_release(i2c_t dev);
|
||||
void i2c_release(i2c_t dev);
|
||||
|
||||
/**
|
||||
* @brief Convenience function for reading one byte from a given register
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user