1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-24 22:13:52 +01:00

cpu/stm32_common: Updated i2c_release()

This commit is contained in:
Marian Buschsieweke 2019-08-22 11:56:40 +02:00
parent 0863410c09
commit b604934189
No known key found for this signature in database
GPG Key ID: 61F64C6599B1539F
2 changed files with 4 additions and 4 deletions

View File

@ -32,6 +32,7 @@
* @}
*/
#include <assert.h>
#include <stdint.h>
#include <errno.h>
@ -145,14 +146,13 @@ int i2c_acquire(i2c_t dev)
return 0;
}
int i2c_release(i2c_t dev)
void i2c_release(i2c_t dev)
{
assert(dev < I2C_NUMOF);
periph_clk_dis(i2c_config[dev].bus, i2c_config[dev].rcc_mask);
mutex_unlock(&locks[dev]);
return 0;
}
int i2c_write_regs(i2c_t dev, uint16_t addr, uint16_t reg,

View File

@ -34,6 +34,7 @@
* @}
*/
#include <assert.h>
#include <stdint.h>
#include <errno.h>
@ -195,7 +196,7 @@ int i2c_acquire(i2c_t dev)
return 0;
}
int i2c_release(i2c_t dev)
void i2c_release(i2c_t dev)
{
assert(dev < I2C_NUMOF);
@ -207,7 +208,6 @@ int i2c_release(i2c_t dev)
#endif
mutex_unlock(&locks[dev]);
return 0;
}
int i2c_read_bytes(i2c_t dev, uint16_t address, void *data, size_t length,