1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/periph/i2c: i2c_acquire() returns void

Since all implementations simply return 0 and most drivers do not check the return value, it is better to return void and use an assert to ensure that the given device identifier and given device parameters are correct.
This commit is contained in:
Gunar Schorcht 2021-11-25 13:37:20 +01:00
parent 7d4a2503c6
commit 3d93b2bcf0

View File

@ -276,11 +276,12 @@ gpio_t i2c_pin_scl(i2c_t dev);
* In case the I2C device is busy, this function will block until the bus is
* free again.
*
* @param[in] dev I2C device to access
* @pre Given device is valid, otherwise an assertion blows up
* (if assertions are enabled).
*
* @return 0 on success, -1 on error
* @param[in] dev I2C device to access
*/
int i2c_acquire(i2c_t dev);
void i2c_acquire(i2c_t dev);
/**
* @brief Release the given I2C device to be used by others