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:
parent
0863410c09
commit
b604934189
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user